Chapter 01Installation & Prerequisites

How to Use REA: Install & Configure rea-agents

Reverse engineer apps, binaries and browser behavior with your coding agent.

AI Overview Direct AnswerHow to Use REA (Installation & Setup)

Learn how to use REA (rea-agents by morluto) with your coding agent. Run 'npx rea-agents setup' to configure Claude Code, Cursor, and Windsurf in 60 seconds. Reverse engineer apps, binaries and browser behavior with automated MCP tool registration and built-in doctor diagnostics.

Zero-Barrier OnboardingYour First 5 Minutes

From Zero to First Deconstruction in 3 Steps

You do not need to understand assembly, compilers, or register states to begin reverse engineering. Here is how any frontend or fullstack developer can deconstruct their first commercial app right now:

Step 1: Pick Any App

Find any Electron app installed on your machine: Notion, Slack, Discord, or VS Code.

app.asar bundle
Step 2: Run One Command

REA inspects the in-memory AST and extracts all IPC channels, preload bridges, and internal API routes into JSON.

npx -y rea-agents analyze...
Step 3: Let AI Explain

Ask Claude or Cursor in natural language. The AI reads the evidence and explains the architecture in plain English.

No assembly needed
Dependency GuideOnly Install What You Need

Demystifying REA's Dependencies: The Target Matrix

The biggest complaint among new REA users is: <em>'There are too many languages, compilers, and tools to install!'</em> The secret is: <strong>you do not need everything installed at once</strong>. REA uses a progressive dependency architecture—install only the single runtime matching your current target:

Tier 1: Web & Electron0 Extra Tools

Inspecting desktop apps (Notion, Slack), .asar bundles, and Webpack JS.

Node: v22.19+ (or Bun)
Java: Not needed
Python: Not needed
Disassembler: Not needed
Tier 2: Android APKsJava + JADX

Decompiling APK DEX bytecode and decoding AndroidManifest.xml.

Java: JDK 21+ (OpenJDK)
Decompiler: jadx, apktool
Install: brew install jadx
Tier 3: macOS NativeHopper Only

Mach-O binaries (ARM64 & x86_64), Objective-C and Swift demangling.

Engine: Hopper Disassembler
Java: Not needed
Auto-Setup: REA can download
Tier 4: PC & LinuxJava 21 + Ghidra

Windows PE, Linux ELF, 16-bit DOS games, and MIPS/ARM binaries.

Java: OpenJDK 21+
Engine: NSA Ghidra 11+
Install: winget install Ghidra
The Most Common Setup Pitfall: Node.js Version Check

REA requires <strong>Node.js >= 22.19</strong> (or Bun >= 1.2.17). If you run on Node 18 or 20 (still standard on many developer laptops), the setup script will exit with an error. Fix it in 15 seconds with your package manager:

Option A: Switch Node via NVM / FNMnvm install 22 && nvm use 22
Option B: Run via Bun (Zero Node issues)bunx rea-agents setup

One-Command Environment Setup by Operating System

macOS (Apple Silicon & Intel via Homebrew):brew install node@22 openjdk@21 jadx apktool
Ubuntu / Debian Linux (APT):sudo apt update && sudo apt install -y openjdk-21-jdk python3-pip curl && nvm install 22
Windows 10/11 (Winget):winget install OpenJDK.OpenJDK.21 && winget install NationalSecurityAgency.Ghidra
The rea doctor Diagnostic Tool: Auto-Detect Environment Health

If you ever wonder why a disassembler or agent connection is failing, never guess. Run <code>rea doctor</code> to get an instant diagnosis of missing paths, socket permissions, and client configuration status:

# Check global environment and agent registrations
rea doctor
# Check specific provider readiness (e.g. Hopper or Ghidra)
rea doctor --provider hopper
rea doctor --provider ghidra

Installation & Setup

Method 1: Automated Agent Setup (Recommended)

Run the official interactive agent setup script to register the REA MCP server across your coding agents:

One-Step Agent Setup
npx rea-agents setup

Method 2: Global CLI Installation

Install the persistent <code>rea</code> command for regular terminal analysis:

Global CLI Install & Update
# Install globally via npm
npm install --global rea-agents

# Or via Bun
bun add --global rea-agents

# Verify CLI readiness
rea --help

# Keep installation up to date
rea update

Method 3: Ad-hoc Electron & JavaScript Inspection

Inspect an unpacked application or .asar archive on-demand without installing anything globally:

Ad-hoc Analysis
npx -y rea-agents@latest analyze-javascript-application /path/to/app --json

Method 4: Skill-Only Agent Installation (skills.sh)

If you only need agent prompt instructions and workflow reasoning without installing local disassemblers:

Install Agent Skill
npx skills add morluto/rea --skill reverse-engineer-anything

Supported Targets (What You Can Analyze)

REA provides specialized extraction pipelines across 14 target categories. Static JavaScript and .NET analysis run 100% locally with zero external decompiler dependencies, while native and mobile targets leverage dedicated bridges:

Target EcosystemWhat REA ReturnsEngine & Prerequisites
Native BinariesPseudocode, assembly instructions, strings, symbols, call graphs & cross-referencesHopper, Ghidra, or IDA Pro
JavaScript / ElectronModules, imports, source maps, routes, IPC boundaries and native add-on linksNode.js 22+ & npm (Zero native engine needed)
.NET AssembliesMetadata, CIL instructions, declared native dependencies & build comparisonsBuilt-in static PE/CLI parser
Android APKsManifest declarations, Java/Kotlin classes, decompiled methods & referencesHeadless JADX & JDK
Android DevicesConnected devices, packages, processes, dumps, screen captures & transfersCaller-supplied adb (Hardware or Emulator)
Android ResourcesDecoded AndroidManifest.xml, string tables, locales & version factsApktool launcher
EVM BytecodeDispatch selectors, byte offsets, inferred arguments & contract mutabilityBuilt-in EVMole WASM engine
Firmware ImagesMemory regions, extraction results & native analysis handoffsBinwalk / Unblob on Linux
WebsitesDOM structure, scripts, network observations & full-page screenshotsChrome-family browser via CDP
Network CapturesHTTP requests, responses, exposed JSON payloads & source locationsHAR or mitmdump on Linux
Offline ELF LayoutSections, segments, original symbols, relocations & mitigation flagspwntools on Linux x64
Linux CrashesRegisters, signals, core thread dumps & optional mapping candidatespwntools & GDB / pwndbg
Apple PackagesFile inventories, digests, plists, Apple bundle anatomy & resourcesBuilt-in Mach-O / plist parser
Process BehaviorTerminal interactions, exit statuses, filesystem changes & runtime diffsLinux / macOS native PTY

CLI Command Reference

The core REA binary accepts the following flags for ad-hoc inspection and MCP server hosting:

FlagTypeDefaultDescription
--mcpBooleanfalseLaunches REA in Model Context Protocol stdio server mode for Claude/Cursor.
--target, -tPath.Target executable binary, .app bundle, or .asar file to introspect.
--format, -fStringjsonOutput serialization: json, ast, typescript, or rust.
--depth, -dInteger3Maximum traversal depth for dependency resolution and export tracing.
--clean-roomBooleantrueSanitizes proprietary bytecode and extracts only abstract interface schemas.

Verify CLI Environment

Run the healthcheck command to verify that REA and its underlying introspection engines are operational:

Verify Installation
rea --version
rea doctor

Expected diagnostic output:

Output: rea doctor
{
  "rea_version": "0.4.2",
  "node_runtime": "v20.12.0",
  "mcp_protocol": "2024-11-05",
  "supported_targets": ["electron-asar", "macho-universal", "pe32-pe64", "elf64"],
  "status": "READY"
}