How ask works

Phrase catalogs, not
language models.

xops ask resolves intent phrases to real xops 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.
xops 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, xops 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
$ xops ask "publish all @x12i packages and push" → Resolved: xops --filter "@x12i/*" --build --test --publish --push --report Publish and push are irreversible. Continue? y/N > y
unknown phrase
$ xops ask "deploy to staging and pray" ✕ No safe match found. Did you mean: xops --publish xops --push xops --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.


Browse the catalog

Don't know the phrase?
Browse by category instead.

Every catalog entry is grouped — install, release, validate, git, ops, recommendations, agent, upstream. List the categories, then list the phrases inside one.

browse, don't guess
$ xops ask --categories install · release · validate · git · ops recommendations · agent · upstream $ xops ask --list git xops ask "show parallel branches" [no approval needed] xops ask "show branch workflow diff" [no approval needed]

Add --json to either command for machine-readable output. Same browsing experience as the in-browser simulation — backed by the same catalog.


Order modifiers & xgit

Phrases that compose.
Catalog order by CLI.

ask-cli 1.1.0 recognizes modifier phrases like in the right order without duplicating catalog entries. Order modifiers attach to publish/install intents and show in the resolved plan as Recognized: ….

dependency order
$ xops ask "publish everything in the right order" → Resolved: xops --build --test --publish --report Recognized: in dependency order
xgit — git catalog first
$ xgit ask "commit and push" → git phrases resolve first; xops/npm catalogs cross-solve monorepo steps $ xgit ask "publish all packages and push"

xops resolves xops → npm → git catalogs. xgit resolves git → xops → npm. Same engine, different default intent. Install both with npm install -g @x12i/ops — see Install → xgit.


Code-agent-safe ask — 2.30.0

Resolve intent without
risking a stuck shell.

For code agents, ask is a resolver first. Use --plan --json to get the matched command, argv, risks, explanation, and suggested execution command without running anything. In non-TTY mode xops will not wait for approval; if approval is needed, it exits with code 4 instead of blocking on stdin.

  • --plan resolves without executingReturns the matched command, argv, and risk assessment — nothing runs.
  • --json for machine-readable outputSame resolution, structured for a calling agent instead of a human reading a terminal.
  • Never blocks on stdin in agent contexts--agent, XOPS_AGENT=1, CI=true, or non-TTY mode skip the interactive approval prompt entirely.
  • Deterministic refusal, not a hangIf execution needs approval and approval was not provided, xops prints the plan and exits with code 4. TTY behavior for humans is unchanged.
agent plan, then execute
$ xops ask "release the stack" --plan --json → { command, argv, risks, explanation, suggestedYesCommand } $ XOPS_AGENT=1 xops ask "release the stack" ✕ exit 4 — approval required, plan printed $ xops ask "release the stack" --yes ✓ executes — approval given explicitly

ask-cli library

Build your own
deterministic ask command.

@x12i/ask-cli is the library behind xops 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

Expanded command surface — in progress

Natural language for
repository operations.

xops ask is still deterministic. It is still phrase-catalog based. It is still not an LLM. The change is scope: ask can now resolve supported operational intents, not only npm/git release intents.

$ xops ask "show ops status" $ xops ask "show recommendations" $ xops ask "check dependency update PR" $ xops ask "run affected tests" $ xops ask "run API tests" $ xops ask "show magit live diff" $ xops ask "check mongo status" $ xops ask "check utilitix status" $ xops ask "prepare safe release" $ xops ask "add API runner for Postman collections"
If a phrase maps to a mutating action, ask returns a plan first. In agent mode, approval-required work exits instead of waiting.