Reverse Engineer Anything CLI: Commands & Setup Guide - 설치

Reverse Engineer Anything CLI: Commands & Setup Guide

Master the Reverse Engineer Anything CLI: install rea-agents, run setup and doctor, analyze binaries, Electron apps, and connect AI agents.

2026-10-18
reverse engineer anything Wiki Team
Quick Guide
  • 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 setup to 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
Know the Boundaries

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.

1

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.

2

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.

3

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.

4

Diagnose the environment

Run rea doctor to check dependencies, paths, and tool integration. Resolve any reported issues before starting an investigation.

5

Run a first analysis

Pick a small, safe target and run a basic analyze command to confirm the pipeline works end to end.

Setup StageCommand / ActionWhat It VerifiesCommon Fix
Installnpx rea-agents@latest setupCLI downloads, plan confirmedCheck Node.js version and network
Diagnosisrea doctorDependencies, paths, agent configInstall missing runtime or fix PATH
Agent linkSetup agent selectionMCP registration in Claude/CursorRestart agent after config change
First runrea analyze <target>End-to-end pipelineConfirm target path and permissions
Pro Tip

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.

CommandPurposeTypical Use
rea setupInstall and configureFirst-time installation and agent linking
rea doctorDiagnose environmentFixing missing dependencies and path errors
rea analyze <target>Full analysis passInitial triage of an unknown binary or app
rea inspect <target>File-level inspectionFormat, architecture, sections, imports
rea search <pattern>String/symbol searchFinding messages, URLs, identifiers
rea function <id>Function detailDecompilation summary of one function
rea xrefs <address>Cross-referencesFinding callers and callees
rea traceRuntime tracingObserving execution paths and evidence

Alongside the REA commands, most investigations lean on standard system utilities that pair naturally with the CLI:

UtilityRoleExample
fileIdentify format and architecturefile ./targets/sample.bin
sha256sumEvidence preservationsha256sum sample.bin
stringsPrintable string discoverystrings -a -n 6 sample.bin
objdumpDisassemblyobjdump -d -M intel sample.bin
gdbDynamic analysisgdb -q sample.bin
teeContext exportobjdump -d sample.bin | tee report.txt
Narrow Queries Win

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 TypeKey ArtifactsAnalysis Focus
Native binariesELF, PE, Mach-O filesFunctions, strings, xrefs, disassembly, pseudocode
Electron appsASAR archives, package.jsonMain/Renderer/Preload processes, IPC, source maps
JavaScriptBundles, scriptsModule structure, minified code mapping
WebsitesBrowser runtimeNetwork behavior, scripts, browser runtime state
Android APKsAPK packagesManifest, resources, dex analysis
GamesGame binariesSpeed rules, parameters, logic (e.g., Chrome Dino)
Isolate Unknown Binaries

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 PhaseGoalOutput
IdentifyKnow the target before interpreting itProfile with hash, format, architecture
Static analysisMap code and data without executingFunction inventory, strings, xrefs
LocateReduce binary to relevant functionsCall relationship map
Dynamic analysisCompare runtime with hypothesesTraces, breakpoints, register evidence
ValidateConfirm and documentReport 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.

Reproducible by Default

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.

Related Articles