Skip to main content
--json emits exactly one machine-readable JSON document on stdout with no decoration; progress and diagnostics go to stderr. The one declared exception is a long-lived stream command, which may declare NDJSON (one JSON document per line). Errors go to stderr as { "error": { "code", "message", "status" } }. --json also forces non-interactive mode: a prompt opens only when stdin and stdout are both a terminal AND --json was not passed, so a --json run never prompts and never exits 8 — missing input exits 2 naming the flags to pass. Both halves of the contract are visible in one run:
which puts exactly one document on stdout — the command’s own validated output example: