Two output modes
By default the CLI prints human-readable output: lists render as tables, single resources as aligned key/value lines. Pass--json to get the raw API response as pretty-printed JSON instead.
--json in scripts. It is the stable, structured shape; the human layout is meant for reading, not parsing.
Exit codes
Every command exits0 on success and 1 on any error (an API error or a local failure). API errors print a clean Error: <message> to stderr with no stack trace; with --json, the error envelope is also written to stderr.
gcai auth status exits 1 when you are not authenticated or the key is invalid, so you can gate a script on it:
0.