- Reverse Engineer Anything CLI: terminal-first entry point for analyzing apps, sites, JavaScript, Electron packages, and native binaries.
- Two interfaces: REA ships both a CLI and an MCP Server, letting humans and AI coding agents share the same analysis workflow.
- Fast start: run
npx rea-agents@latest setupto install, configure agents, and diagnose the environment. - Evidence-first: every investigation records hashes, tool output, and reasoning so conclusions stay reproducible.
- Local by design: analysis runs on your machine; REA does not recover original source code or copy software.
What the Reverse Engineer Anything CLI Does
Reverse Engineer Anything (REA) is an open-source reverse engineering toolkit built for AI coding agents. Its CLI gives you terminal commands for inspecting software targets, while its companion MCP Server exposes the same capabilities to agents like Claude, Cursor, Codex, Gemini CLI, Windsurf, and Devin. The project emphasizes local analysis, evidence chains, and reproducible investigations over one-click "decompile to source" promises.
The CLI covers the full investigation lifecycle: environment setup, target identification, static inspection, function and cross-reference search, tracing, and evidence export. Official showcases include Chrome Dino, the Windows Calculator, Android APKs, Electron applications, and native binaries.
CLI Interface
- Terminal commands for humans
analyze,inspect,search,function,xrefs,trace- Scriptable, batch-friendly
MCP Interface
- Tool calls for AI coding agents
- Same evidence-backed operations
- Claude, Cursor, Codex, Gemini CLI support
Local & Reproducible
- Analysis stays on your machine
- Hashes and tool logs recorded
- Evidence chain per investigation
REA is an analysis and investigation toolkit. It does not automatically reconstruct original source code, and using it to copy proprietary software may violate licenses or law. Stick to targets you own or are authorized to study.
Installation and Setup Workflow
REA bootstraps itself through a single command. The setup flow installs the CLI, checks agent configurations, and prepares your environment; the doctor command then diagnoses anything that went wrong.
Verify prerequisites
Confirm you have a supported Node.js runtime and npm. Check your OS version and available disk space before starting, and create a dedicated working directory for analysis projects.
Run the installer
Execute npx rea-agents@latest setup. The command downloads the current package, presents an installation plan, and asks you to confirm before making changes.
Configure your coding agent
The setup flow detects installed agents such as Claude Code or Cursor and registers REA's MCP server or skills for each one you select.
Diagnose the environment
Run rea doctor to check dependencies, paths, and tool integration. Resolve any reported issues before starting an investigation.
Run a first analysis
Pick a small, safe target and run a basic analyze command to confirm the pipeline works end to end.
| Setup Stage | Command / Action | What It Verifies | Common Fix |
|---|---|---|---|
| Install | npx rea-agents@latest setup | CLI downloads, plan confirmed | Check Node.js version and network |
| Diagnosis | rea doctor | Dependencies, paths, agent config | Install missing runtime or fix PATH |
| Agent link | Setup agent selection | MCP registration in Claude/Cursor | Restart agent after config change |
| First run | rea analyze <target> | End-to-end pipeline | Confirm target path and permissions |
Keep your analysis workspace separate from personal files. Give the CLI and MCP server access only to the directories containing your targets and reports; this makes investigations easier to audit and safer to run.
CLI Command Reference
The REA CLI splits into investigation commands and environment commands. Investigation commands follow the standard reverse engineering arc: identify, inspect statically, locate functions, trace relationships, and observe runtime behavior.
| Command | Purpose | Typical Use |
|---|---|---|
rea setup | Install and configure | First-time installation and agent linking |
rea doctor | Diagnose environment | Fixing missing dependencies and path errors |
rea analyze <target> | Full analysis pass | Initial triage of an unknown binary or app |
rea inspect <target> | File-level inspection | Format, architecture, sections, imports |
rea search <pattern> | String/symbol search | Finding messages, URLs, identifiers |
rea function <id> | Function detail | Decompilation summary of one function |
rea xrefs <address> | Cross-references | Finding callers and callees |
rea trace | Runtime tracing | Observing execution paths and evidence |
Alongside the REA commands, most investigations lean on standard system utilities that pair naturally with the CLI:
| Utility | Role | Example |
|---|---|---|
file | Identify format and architecture | file ./targets/sample.bin |
sha256sum | Evidence preservation | sha256sum sample.bin |
strings | Printable string discovery | strings -a -n 6 sample.bin |
objdump | Disassembly | objdump -d -M intel sample.bin |
gdb | Dynamic analysis | gdb -q sample.bin |
tee | Context export | objdump -d sample.bin | tee report.txt |
Ask the CLI (or an agent driving it) for one focused operation at a time: a single function, one string's references, one address range. Narrow queries produce bounded output that is easier to validate than whole-file dumps.
Targets: What You Can Analyze
REA organizes its documentation and tooling around target categories. Each category needs different preparation and commands.
| Target Type | Key Artifacts | Analysis Focus |
|---|---|---|
| Native binaries | ELF, PE, Mach-O files | Functions, strings, xrefs, disassembly, pseudocode |
| Electron apps | ASAR archives, package.json | Main/Renderer/Preload processes, IPC, source maps |
| JavaScript | Bundles, scripts | Module structure, minified code mapping |
| Websites | Browser runtime | Network behavior, scripts, browser runtime state |
| Android APKs | APK packages | Manifest, resources, dex analysis |
| Games | Game binaries | Speed rules, parameters, logic (e.g., Chrome Dino) |
Analyze unknown native executables inside a disposable VM or container. Keep the original target read-only, record its SHA-256 hash before and after analysis, and disable network access unless the workflow requires it.
Before You Start an Investigation:
- Dedicated working directory created and isolated
- Target SHA-256 hash recorded
- rea doctor reports a clean environment
- Coding agent connected via MCP (optional)
- Output directory reserved for reports and evidence
Evidence Chains and the Investigation Workflow
What separates a solid REA investigation from guesswork is the evidence chain. Every conclusion should trace back to a command result, an address, a trace, or a runtime observation that another researcher can reproduce.
| Workflow Phase | Goal | Output |
|---|---|---|
| Identify | Know the target before interpreting it | Profile with hash, format, architecture |
| Static analysis | Map code and data without executing | Function inventory, strings, xrefs |
| Locate | Reduce binary to relevant functions | Call relationship map |
| Dynamic analysis | Compare runtime with hypotheses | Traces, breakpoints, register evidence |
| Validate | Confirm and document | Report linking conclusions to evidence |
A practical tip for agent-driven sessions: ask the agent to separate directly observed behavior from inferred intent, and require it to cite the code pattern, string reference, or API usage supporting each inference. Recheck important conclusions yourself in the disassembler or debugger before treating them as fact.
Save the command list, exit codes, timestamps, and tool versions alongside your findings. A report tied to a target hash and preserved artifacts can be independently verified, which is the standard REA aims for.
FAQ
Q: What is the Reverse Engineer Anything CLI used for?
The REA CLI is a terminal interface for analyzing applications, websites, JavaScript, Electron packages, and native binaries. It handles target identification, static inspection, function and cross-reference search, tracing, and evidence export, and pairs with an MCP Server so AI coding agents can run the same workflow.
Q: How do I install Reverse Engineer Anything?
Run `npx rea-agents@latest setup`. The setup command installs the CLI, presents an installation plan, and configures supported coding agents. Follow up with `rea doctor` to verify dependencies, paths, and agent integration.
Q: Which AI coding agents work with REA?
REA supports MCP-compatible agents including Claude (Claude Code and Claude Desktop), Cursor, Codex, Gemini CLI, Windsurf, and Devin. Setup can register the REA MCP server for each agent you have installed.
Q: Does REA recover original source code?
No. REA focuses on analysis, evidence recording, and reproducible investigation. It does not directly recover original source code or automate copying software. Use it on software you own or are authorized to study.
Q: What should I do if rea doctor reports problems?
Check that Node.js and npm are installed and up to date, verify the rea command is on your PATH, and confirm your agent configuration files reference the correct server path. Rerun `rea doctor` after each fix until the environment reports clean.