--json flag. Successful data goes to stdout
as one JSON object; progress, browser instructions, warnings, and errors go
to stderr.
- Terminal
- JSON
Envelopes
Collections use a named plural envelope and single resources use the singular form:
Paginated collections add
nextPageToken when more records remain. Context
results add source. Destructive results add an explicit deleted,
disconnected, left, removed, released, or revoked boolean.
Declining a confirmation prints this and exits 0:
Errors
Errors are one JSON object on stderr in a stable shape:
A shorter example with HTTP diagnostics:
Exit codes
Exit code
2 is what you get when a script forgets --force on a command that
confirms. It is an argument error, not implicit approval — nothing was changed.
Debug traces
Global--debug buffers sanitized HTTP exchanges and emits one ordered trace
to stderr when the command finishes:
--json command keeps its single result object on stdout and
writes a separate {"debug":{"http":...}} object to stderr. A failed JSON
command stays one error object, with the exchanges and sanitized cause chain
under error.debug. Commands that make no HTTP requests emit no trace.
Each exchange records the method, sanitized endpoint, query-parameter names,
safe headers, JSON bodies when safe, status, request ID, and duration. Long
traces keep the first three and latest 22 exchanges and report how many were
dropped in between.
Color
Human output uses compact tables and labeled detail views. ANSI styling is enabled only for terminal streams, and text labels and symbols always carry the same meaning without color. Styling is disabled for JSON, for redirected output, forTERM=dumb, for a
non-empty NO_COLOR or NO_COLORS, and for --no-color. FORCE_COLOR=1
enables it for a non-terminal stream unless --no-color or --json disables
it.