Skip to content

feat(cli): name the command ajs cloud in hints, help and docs - #7

Merged
dada-sudo merged 3 commits into
mainfrom
feat/ajs-cloud-command-name
Nov 11, 2026
Merged

dada-sudo merged 3 commits into
mainfrom
feat/ajs-cloud-command-name

Conversation

@dada-sudo

Copy link
Copy Markdown
Contributor

Why

The command is run as ajs cloud: the ajs command of @antelopejs/core finds the ajs-cloud binary in the nearest node_modules/.bin, then on the PATH, and runs it as a plugin. Every hint, help example, usage line and problem fix still said ajs-cloud ….

What changes

  • cli/src/invocation.ts: commandName() is ajs cloud, or npx @antelopejs/cloud when npx runs the package (npm_command=exec). asInvoked(text) writes the binary's name in a text that way.
  • The texts are unchanged and pass through asInvoked where they leave: problem texts (error-messages.ts), messages (i18n.ts), help examples and the help footer (command.ts), next steps and prompts (deploy.ts, actions.ts), and the program name (bin.ts).
  • READMEs describe ajs cloud, how ajs loads the plugin, and that npx must be given the scoped name.
  • The binary keeps its name, ajs-cloud.

Why the npx case

A person who started with npx @antelopejs/cloud login has neither ajs nor ajs-cloud on the PATH. A hint naming a bare command leads to npx <that name>, which fetches whatever package holds the name on the registry. Hints printed under npx therefore always name the scoped package.

Tests

  • cli/test/invocation.test.ts: both forms, and no bare name under npx.
  • Expected texts in the ux suites now read ajs cloud ….
  • Local run on Windows: all pass except the existing Ctrl+C test, which fails there before this change too.

Follow-ups outside this repository

  • @antelopejs/core lists dms as its only official plugin. Listing cloud (@antelopejs/cloud, ajs-cloud) lets ajs cloud install the package when it is missing and drops the "third-party plugin" line.
  • A plugin cannot tell that ajs started it, so the hints say ajs cloud to someone who ran ajs-cloud directly as well.

dada-sudo and others added 3 commits November 11, 2026 16:30
The command is run as `ajs cloud`: the `ajs` command of @antelopejs/core
loads the `ajs-cloud` binary as a plugin. Every hint, help example and
problem fix still told the user to run `ajs-cloud …`.

The texts keep writing the binary's name and pass through `asInvoked`,
which writes it the way the person runs the command: `ajs cloud`, or
`npx @antelopejs/cloud` when npx runs it. A person who came through npx has
neither `ajs` nor `ajs-cloud` on the PATH, and a bare name given to npx
fetches whatever package holds that name on the registry, so those hints
always name the scoped package.

The binary keeps its name, `ajs-cloud`: it is what `ajs` looks for.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@dada-sudo
dada-sudo merged commit 14050d9 into main Nov 11, 2026
8 checks passed
@dada-sudo
dada-sudo deleted the feat/ajs-cloud-command-name branch November 11, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant