bronto is meant to be called from shell scripts, CI jobs, and AI agents. Data goes to
stdout and everything else to stderr, in the formats described on this page.
Piping output from the bronto CLI into jq and back
Output when piped
You usually donβt need-o. The CLI checks whether stdout is a terminal:
Parse that JSON document as a whole. For one row per line from a non-streaming command,
pass
-o jsonl.
-o forces a format: table, json, jsonl, csv, or raw. raw prints each eventβs
original @raw line, for piping logs into other tools. The full rules
are in Output formats.
64-bit numbers such as metadata.sequence come through json, jsonl, and --jq
unchanged, without float rounding.
Pick fields
--fields a,b,c keeps only those keys (or table columns). --fields '?' prints the
available field names instead of the data:
message_kvs.. --fields accepts the bare name: status finds message_kvs.status
when the event has no top-level status key, and the output key is the name you typed.
The full name message_kvs.status works too, and keeps that key:
--select asks the server for just the named fields. It takes the names youβd write in a
query, and the result uses them as keys:
jq built in
--jq '<expr>' runs a jq expression over json or jsonl output and prints each result
on its own line. It uses gojq, so you donβt need jq
installed.
Results print as JSON, so strings keep their quotes. Add -r (--raw-output), as with
jq -r, to print strings without quotes; other values still print as compact JSON.
--jq runs after --fields. On its own it sees the whole event, so search fields keep
their message_kvs. names. With --fields host,trace_id it sees only those output keys,
and you write .host instead.
jq CLI:
- A value that makes the expression fail is skipped, and the other rows still print.
-ris the only jq option. It needs--jq.- At a terminal the default format is a table, so add
-o jsonor-o jsonl. Piped,--jqworks without-o.
Errors
Errors go to stderr. When stderr is a terminal you get a readable message and a hint. When it isnβt, you get one line of JSON:codeis a stable identifier such asauth_invalid_keyorresource_not_found. Match oncode.messagecan change.retryableistruefor rate limits, timeouts, network errors, and server errors.hintholds a suggested fix, when there is one. Agents should read it.
Exit codes
Exit codes maps every error code to its exit status.
Safe automation
--dry-runstops before any request that changes something. Every mutating command,deleteand action verbs such asgroups add-membersincluded, prints the request as a plan on stdout,{"body":{...},"dry_run":true,"method":"POST","path":"/monitors"}. Reads still run, so names resolve and the planβs path carries the resolved id. An agent can show the plan to a human before running the real command.- Destructive commands refuse to run without a terminal unless you pass
--yes(usage_confirmation_required, exit code 2). --debugtraces each API request and response on stderr: method, URL, status, latency, and truncated bodies. The API key header is never printed, and secret fields in bodies, such as the keysapi-keys listreturns, show asREDACTED. Treat the trace as sensitive anyway: bodies can contain log data.--quietsuppresses notices on stderr, so only data and errors remain.--timeout <seconds>and--max-retries <n>tune the HTTP client. Retries apply to idempotent requests that get a 429, 502, 503, or 504.--no-color(orNO_COLOR) turns off ANSI colors.
Credentials for scripts
On a machine where someone has runbronto auth login, a script can reuse that key
without reading the keychain itself:
bronto auth token prints the key the CLI would use, from wherever it resolved.
In CI, set BRONTO_API_KEY directly. See CI/CD.
For AI agents
skill.mdin the repository is a short guide for agents such as Claude Code. It covers the main commands, the output contract, and the exit codes. Point your agent at it, or drop it into your agentβs skills directory.llms.txtin the repository is a short summary of the CLI.- Every page of these docs is also available as Markdown: add
.mdto its URL, or use the page menu next to the title to copy it or open it in an AI assistant. The docs site serves/llms.txt, an index of all pages, and/llms-full.txt, every page in one file. bronto --helpandbronto <command> --helpalways match the installed binary.bronto askwithout--yesprints a query plan as JSON when piped, so an agent can review a generated query before running it. See Ask.

