--json is not a global flag — it is a per-subcommand option declared on the commands that support machine-readable output (see below).
--json
--json is a per-subcommand flag, not a program-level option. Most commands have a default human-readable output and an opt-in JSON output. When --json is set:
- Tables become arrays of objects
- Status messages move to stderr
- Exit codes still indicate success or failure
--token-stdin
Override the bearer session token the CLI would normally use (the daemon-held operator session). Useful for one-off API calls in scripts where you don’t want to log in interactively.
Environment variables
Exit codes
Error output
When the API returns an error, the CLI prints:code, message, hint, meta) comes straight from the API. With --json the CLI prints the envelope as JSON instead.