CLI command and flag reference
本頁內容尚未翻譯。
The installed xcsh <COMMAND> --help output is the command-line interface (CLI) authority for its release. This page lists the command and flag names that release exposes so you can find one without starting a session.
Which top-level commands exist?
Section titled “Which top-level commands exist?”| Area | Commands |
|---|---|
| Resources | validate, diff, create, apply, update, get, export, delete |
| Runtime | config, setup, sandbox, shell, ssh, stats, search |
| Files and code | read, grep, jupyter |
| Extensibility | agents, plugin, worker, manager |
| Interfaces | chrome, chrome-host, office, herdr |
| Repository | commit, grievances |
| Maintenance | self-update, update --check |
search also answers to q. On update, -f names a resource manifest; an executable force-update uses --force.
Which global flags does a session accept?
Section titled “Which global flags does a session accept?”These flags configure an agent launch. They precede the prompt and do not apply to a subcommand.
| Group | Flags |
|---|---|
| Model | --model, --smol, --slow, --plan, --provider, --models, --thinking, --list-models |
| Credentials and context | --api-key, --context |
| Prompt | --system-prompt, --append-system-prompt, --no-title |
| Mode | --mode (text, json, rpc, acp), -p/--print |
| Session | -c/--continue, -r/--resume, --fork, --session-dir, --no-session, --no-memories, --export |
| Filesystem | --allow-home, --allow-path, --no-sandbox |
| Capabilities | --tools, --no-tools, --no-mcp, --no-lsp, --no-pty |
| Discovery | -e/--extension, --hook, --plugin-dir, --no-extensions, --skills, --no-skills, --no-rules |
packages/coding-agent/src/cli/flag-spec.ts is the single source that renders --help and drives the parser, so the two cannot disagree.
How do I script a command safely?
Section titled “How do I script a command safely?”Run these steps against the pinned executable:
- Read
xcsh <COMMAND> --helpfor the release you pinned. - Write long flags rather than single-character aliases.
- Request
--result-fileor--mode jsonwherever the command supports it. - Pass
--allow-pathonce per additional directory; it accumulates rather than replacing.
Treat xcsh --help and each subcommand’s --help as the version-matched authority. Global flags
must precede or follow arguments exactly as that help permits; protocol modes reserve stdout for
framed data. Before scripting a mutating command, pin the xcsh version, pass the context and
resource identifiers explicitly, and exercise the read or validation form. Exit status is the
automation contract; terminal color and progress text are not.