REA CLI cheat sheet
REA 6.5.0 (October 2026) ships the rea CLI with the same workflows as its MCP server, including analyze, search, function, decompile, xrefs and trace.
REA's CLI binary is rea (also rea-agents). Without a global install:
npx -y rea-agents@latest <command>
Native example (authorized binary only):
rea analyze /absolute/path/to/program --provider ghidra --json
rea decompile /absolute/path/to/program 0x1000 --provider ghidra --json
JavaScript / Electron (no native engine):
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json
Default terminal format is TOON; use --json for agents and scripts.
Run without a global install
| Goal | Command |
|---|---|
| Setup agents | npx rea-agents@latest setup |
| One-off JS analysis | npx -y rea-agents@latest analyze-javascript-application /abs/path --json |
| Help | npx -y rea-agents@latest --help |
JavaScript / Electron
rea analyze-javascript-application /absolute/path/to/app --json
# directories or .asar; generic `rea analyze PATH` selects this lane when no --provider/--snapshot
Large Evidence — save then project a view:
rea analyze-javascript-application /absolute/path/to/app --json > app-evidence.json
jq -c '{source: {kind: "inline", evidence: .}, view: {kind: "summary"}}' app-evidence.json > app-view.json
rea inspect-analysis-view app-view.json
Upstream example: a 334 MB Obsidian Evidence file yields an ~10 KB summary view.
Native analysis (provider required)
Configure Hopper, Ghidra or IDA first. Examples with Ghidra:
rea analyze /absolute/path/to/program --provider ghidra --json
rea search /absolute/path/to/program "search" --provider ghidra --json
rea function /absolute/path/to/program main --provider ghidra --json
rea decompile /absolute/path/to/program 0x1000 --provider ghidra --json
rea xrefs /absolute/path/to/program 0x1000 --provider ghidra --json
rea trace /absolute/path/to/program "search" --provider ghidra --json
| Command | Returns (summary) |
|---|---|
analyze / inspect | Native overview |
function | Function dossier |
decompile | Pseudocode |
instructions | Assembly only |
search / trace / xrefs | Navigation aids |
macOS .app bundles can be supplied directly. Paths should be absolute.
Metadata without a decompiler
rea inspect-go-binary /absolute/path/to/program --json
rea inspect-rust-binary /absolute/path/to/program --json
Providers and capabilities
rea providers --json
rea capabilities --json
export REA_ANALYSIS_PROVIDER=ghidra # standing preference; --provider overrides
Doctor, update, uninstall
rea doctor --json
rea update
rea uninstall
rea uninstall --purge-data # also removes ~/.rea cache/state
Output and exit status
| Status | Meaning |
|---|---|
0 | Completed (may include partial evidence / warnings) |
1 | Could not complete |
130 / 143 | SIGINT / SIGTERM after handled cancel on supported commands |
--json is indented on a TTY and compact when piped.
Related on RepoRead
FAQ
Absolute paths — why?
Upstream examples use absolute paths so MCP/CLI sessions resolve the same target regardless of cwd.
TOON vs JSON?
Default terminal format is TOON; pass --json for machine consumers.
Where is the full command list?
MCP contracts catalog and rea --help.
Can I analyze pirated apps?
No. Authorized targets only.