Reference
CLI conventions
Global flags, output modes, and standard exit codes shared by every ak command.
Every ak command follows the same conventions for flags, output, and exit
codes. Command pages in the CLI reference list only what is specific
to that command; everything on this page applies everywhere.
Global flags
| Flag | Description |
|---|---|
--json | Emit machine-readable JSON (implies --no-interactive) |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
-y, --yes | Assume yes for all prompts |
-h, --help | Print help for the command |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
Every runnable command reports the same three base outcomes:
| Code | Meaning |
|---|---|
0 | success |
1 | command failure |
2 | invalid flags or arguments |
Codes 3 and above are command-specific, and the same number can mean
different things on different commands. A command page's Exit codes section
lists only those: 3 is user cancel on ak recover, ak backups restore, and
ak setup, but reports a completed preview on the ak analytics subcommands.