REA CLI cheat sheet

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

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

GoalCommand
Setup agentsnpx rea-agents@latest setup
One-off JS analysisnpx -y rea-agents@latest analyze-javascript-application /abs/path --json
Helpnpx -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
CommandReturns (summary)
analyze / inspectNative overview
functionFunction dossier
decompilePseudocode
instructionsAssembly only
search / trace / xrefsNavigation 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

StatusMeaning
0Completed (may include partial evidence / warnings)
1Could not complete
130 / 143SIGINT / SIGTERM after handled cancel on supported commands

--json is indented on a TTY and compact when piped.

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.

Sources