How ask works

Phrase catalogs, not
language models.

xnpm ask resolves intent phrases to real xnpm commands using a known, finite catalog. There is no model inference, no probability, and no guessing involved.

LLM shell May invent commands. Output varies per run.
xnpm ask Same phrase → same command. Deterministic. Always.
  • Same input, same outputThe phrase catalog is static. Identical inputs always resolve to the same command.
  • Unknown input fails safelyIf the phrase is not in the catalog, xnpm returns an error and suggests the closest known commands.
  • Dangerous operations require approvalIrreversible commands (publish, push) show the plan and require explicit confirmation before running.
No hallucinated shell. No guessing. No magic.
known phrase
$ xnpm ask "publish all @x12i packages and push" → Resolved: xnpm --filter "@x12i/*" --build --test --publish --push --report Publish and push are irreversible. Continue? y/N > y
unknown phrase
$ xnpm ask "deploy to staging and pray" ✕ No safe match found. Did you mean: xnpm --publish xnpm --push xnpm --full-flow

Three guarantees

What ask always does.

Deterministic
Same phrase, same command

No variance between runs. No model drift. Scripting and automation can rely on ask output.

Safe failure
Unknown = error, not guess

If a phrase is not in the catalog, ask returns an error with the closest matching suggestions — never an invented command.

Transparent
Shows the plan before running

Irreversible operations always print the resolved command and ask for confirmation. No silent destructive actions.


ask-cli library

Build your own
deterministic ask command.

@x12i/ask-cli is the library behind xnpm ask. Any CLI can use it to add deterministic natural-language resolution without adding an LLM dependency.

@x12i/ask-cli
import { createAskCli } from '@x12i/ask-cli'; const askCli = createAskCli({ catalog }); const result = await askCli.resolve({ input, context, });
Install
npm install @x12i/ask-cliStandalone library, no LLM dependency