CLI & exit codes
Subcommands
Section titled “Subcommands”askx [ask] [PROMPT...] [flags]askx init [--force]askx doctoraskx catalog [--category CAT] [--json]askx profile list | show | create | edit | import | remove | useaskx template list | show NAME | pathaskx session list [--long] | delete ID | pathaskx warm start [--ttl 10m] | status | stopaskx audit list [-n N] | show ID | pathaskx skill [--profile NAME | --template NAME] [--format skill|claude|codex|opencode]askx install [--subagents] [--skills-only] [--dir DIR] [--agents-dir DIR]askx uninstall [--subagents] [--dir DIR] [--agents-dir DIR]askx help [TOPIC] | versionNamed templates (-t NAME)
Section titled “Named templates (-t NAME)”Store reusable tasks in ~/.config/askx/templates/<name>.md with optional YAML frontmatter:
---profile: claude-clicategory: reviewdescription: Review a Go diff for concurrency bugswhen_to_use: Before merging changes touching goroutines, channels, or mutexesschema: '{"type":"object","properties":{"issues":{"type":"array"}},"required":["issues"]}'---Review the attached diff strictly for data races, deadlocks, and leaked goroutines.Run with askx -t go-race -f diff.patch.
Warm daemon (askx warm)
Section titled “Warm daemon (askx warm)”Keep local ACP (devin acp, opencode acp) and stream-json CLI sessions warm across separate askx invocations:
askx warm start --ttl 10maskx warm statusaskx warm stopUses a 0600 Unix domain socket on macOS/Linux and an authenticated loopback TCP socket (127.0.0.1 + 0600 token file) on Windows.
Exit codes
Section titled “Exit codes”| Exit | Meaning |
|---|---|
0 |
Success |
1 |
Model, endpoint, tool, or schema validation error |
2 |
CLI usage / invalid flags / empty input |
3 |
Profile, template, fallback cycle, or config error |
4 |
Stopped by limit (--max-turns or token/cost budget) |
5 |
File I/O error reading input or writing -o |
6 |
Permission policy denied a tool call (run hard-stopped; never triggers fallback) |