Global flags
These work on every command. Command-specific options are documented on each command’s
page and in chainpatrol <command> --help.
--json and --output cannot be combined unless they agree. --json --output csv
fails with Use either --json or --output, not both.
human
The default. Formatted for reading in a terminal, with color when the terminal supports it.
json
Every command supports --json, and JSON is the format to build on — it is the only one
guaranteed to carry the full result rather than a summary of it.
Errors are JSON too, so a parser never has to deal with a mixed stream:
markdown
A table you can paste into a ticket, a Slack message, or a doc.
csv
For spreadsheets and further processing. Commands that have no meaningful tabular shape
fall back to JSON.
Exit codes
Exit codes are stable and specific, so a script can tell “nothing to do” apart from
“credentials expired” without parsing text.
Code 6 is a result, not a crash: detections healthcheck and healthchecks run
return it when the checks ran fine but something is unhealthy. Treat it as a failing CI
gate, not as an error to retry.