REA --json output (unofficial)

Last updated: · By the RepoRead editorial team · Unofficial guide
Quick answer

REA’s CLI is built for both humans and agents. In a TTY the default presentation is TOON; add --json when you want stable structured output for scripts, MCP consumers or Evidence capture.

Habits that work

# Human-readable exploration (default TOON on a terminal)
rea providers

# Machine-readable
rea providers --json
rea doctor --json
rea analyze /absolute/path/to/program --provider ghidra --json > evidence.json
# README-style one-shot
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json

Pipes vs TTY

Upstream documents that --json is indented on a terminal and compact when piped or redirected — useful when grepping CI logs vs pretty-printing locally.

Combinations that fail closed

If you request an unsupported output mix, REA fails before running the heavy command (example class: UNSUPPORTED_OUTPUT_COMBINATION). Read the error code; do not retry with the same illegal flag pair.

RepoRead is unofficial. Prefer docs/cli.md for the full output contract.

FAQ

What is the default terminal format?

Upstream CLI docs say the default terminal format is TOON. Use --json when saving results for a program.

Is --json pretty-printed?

Docs note --json is indented on a terminal and compact when piped or redirected.

Can I combine --json with every flag?

No. Some combinations fail early (example called out upstream: UNSUPPORTED_OUTPUT_COMBINATION for --json with --token-limit).

Does --json change exit codes?

Exit-status rules still apply (0 ok, 1 fail, 128+N signal). See the exit-codes page.

Version checked?

rea-agents 6.7.0, re-checked 2026-10-24.

Sources