Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(docs): allow README installation wording to vary

morluto92617f965720
diff --git a/README.md b/README.md
index 5efb49bc9..947555053 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@
<br />
-<code>npm install --global rea-agents && rea setup</code>
+<code>npx rea-agents setup</code>
<br />
@@ -94,13 +94,15 @@ REA shows how it reached its conclusions. It does not claim to recover original
### Run setup (recommended)
+Set up REA with your agent:
+
```bash
-npx --yes rea-agents@latest setup
+npx rea-agents setup
```
Choose **Agent Integration**, select your agents, then review and approve the plan. Setup configures MCP access and installs REA's guided workflow. It can connect an existing Hopper or Ghidra installation, or offer to install Hopper if you need it.
-Setup shows its changes before applying them and backs up existing configuration. It does not install or upgrade Node.js, npm, Homebrew, Ghidra, or Java. See [Installation and setup](docs/installation.md) for requirements, setup options, and the optional curl installer.
+Setup shows its changes before applying them and backs up existing configuration. See [Installation and setup](docs/installation.md) for requirements and setup options.
### With an agent (recommended)
@@ -119,16 +121,22 @@ npx -y rea-agents@latest analyze /Applications/Notes.app
### Install the rea command
-If you prefer a global command:
+Install the command-line interface:
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash
+```
+
+The installer adds `rea` to your system and starts setup when run in a terminal. It requires Node.js and npm to be installed already.
+
+Alternatively, install with npm, then run setup:
```bash
npm install --global rea-agents
rea setup
-rea doctor
-rea analyze /Applications/Notes.app
```
-Update it with `rea upgrade`. For project-local installations or one-off runs, use `npx`.
+Update either installation with `rea upgrade`.
### Requirements
diff --git a/docs/installation.md b/docs/installation.md
index cc904e54f..efab46209 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -4,22 +4,27 @@ REA separates installing its CLI from configuring external software and agents.
## Start setup
-The recommended setup entrypoint is:
+Start setup with:
```bash
-npx --yes rea-agents@latest setup
+npx rea-agents setup
```
-If npm asks to download and run the package, that approval applies only to the
-current package-runner invocation. REA still prints its own setup plan and asks
-for separate approval before changing agent configuration or installing a
-product-owned component.
+If npm asks to download and run REA, that approval applies only to downloading
+the package. REA shows its own plan and asks before changing agent configuration
+or installing Hopper.
-The explicit `@latest` request prevents a project dependency or stale npx cache
-entry from choosing the setup version.
-REA runs the version npm selected and never silently replaces an intentional
-version request after launch. To repair registrations written by an older
-release, rerun the command above and review the resulting setup plan.
+The short command can use a REA version installed in the current project. To
+request the latest release explicitly, use:
+
+```bash
+npx rea-agents@latest setup
+```
+
+REA runs the version npm selects. To update older agent registrations, run the
+latest-version command and review its setup plan. For unattended package
+downloads, add `--yes` before the package name; this does not approve REA's
+setup changes.
For an intentional rollback, make the package request explicit:
@@ -35,7 +40,7 @@ REA supports Node.js 22.19+ and 24.11+ (including newer releases). It uses the n
Running `npm install rea-agents` without `--global` installs the executable only
in the current project's `node_modules/.bin`; it does not make `rea` available
-on the shell `PATH`. Use the explicit setup command above for the guided setup
+on the shell `PATH`. Use the setup command above for the guided setup
journey, `npx -y rea-agents@latest` for unattended one-off commands, or install globally
with `npm install --global rea-agents` for a shell-visible `rea` command.
diff --git a/tests/conformance/readmeConsistency.test.ts b/tests/conformance/readmeConsistency.test.ts
index fce4ba9fb..8f0d913bb 100644
--- a/tests/conformance/readmeConsistency.test.ts
+++ b/tests/conformance/readmeConsistency.test.ts
@@ -16,20 +16,29 @@ const readmes = [
const normalizedProse = (content: string): string =>
content.replace(/\s+/gu, " ").trim();
+const jsonExamples = (content: string): unknown[] =>
+ [...content.matchAll(/```json\s*([\s\S]*?)```/gu)].map((match): unknown =>
+ JSON.parse(match[1] ?? ""),
+ );
+
describe("localized README product facts", () => {
it.each(readmes)(
- "keeps commands and requirements aligned in %s",
+ "keeps requirements and versioned MCP configuration aligned in %s",
async (path) => {
const content = await readFile(resolve(path), "utf8");
- expect(content).toContain(
- "curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash",
- );
- expect(content).toContain("npx rea-agents setup");
- expect(content).toContain("npx --yes rea-agents@latest setup");
- expect(content).toContain("npx -y rea-agents@latest doctor");
- expect(content).toContain("rea uninstall");
- expect(content).toContain(
- `"args": ["-y", "${PRODUCT_IDENTITY.registrationPackageSpecifier}", "mcp"]`,
+ expect(jsonExamples(content)).toContainEqual(
+ expect.objectContaining({
+ mcpServers: expect.objectContaining({
+ rea: expect.objectContaining({
+ command: "npx",
+ args: [
+ "-y",
+ PRODUCT_IDENTITY.registrationPackageSpecifier,
+ "mcp",
+ ],
+ }),
+ }),
+ }),
);
expect(content).toContain("Node.js 22");
expect(content).toContain("macOS 12");
@@ -38,27 +47,42 @@ describe("localized README product facts", () => {
expect(content).toContain("Arch Linux");
for (const client of SUPPORTED_CLIENT_DEFINITIONS)
expect(content).toContain(client.displayName);
- if (path === "README_ar.md")
- expect(content).toContain("Windows غير مدعوم حاليًا");
expect(content).toContain("MCP-tool_catalog");
},
);
it("keeps both English CLI onboarding paths discoverable", async () => {
const content = await readFile(resolve("README.md"), "utf8");
- expect(content).toContain("npx -y rea-agents@latest analyze");
- expect(content).toContain("npm install --global rea-agents");
+ expect(content).toMatch(
+ /\bnpx(?:\s+(?:--yes|-y))?\s+rea-agents(?:@[^\s]+)?\s+setup\b/u,
+ );
+ expect(content).toMatch(
+ /\bnpm\s+install\s+(?:--global|-g)\s+rea-agents\b/u,
+ );
expect(content).toContain("rea setup");
- expect(content).toContain("--install-hopper");
- expect(content).toContain("docs/installation.md");
- expect(content).toContain("npx --yes rea-agents@latest setup");
+ });
+
+ it("links to optional installer and unattended setup instructions", async () => {
+ const [readme, installation] = await Promise.all([
+ readFile(resolve("README.md"), "utf8"),
+ readFile(resolve("docs/installation.md"), "utf8"),
+ ]);
+ expect(readme).toMatch(/\]\(docs\/installation\.md(?:#[^)]+)?\)/u);
+ const prose = normalizedProse(installation);
+ expect(prose).toContain(
+ "curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash",
+ );
+ expect(prose).toMatch(/\brea setup\b[^\n`]*--install-hopper\b/u);
});
it("documents explicit setup freshness and rollback", async () => {
const content = await readFile(resolve("docs/installation.md"), "utf8");
const prose = normalizedProse(content);
- expect(prose).toContain(
- "npm exec --yes [email protected] -- rea setup",
+ expect(prose).toMatch(
+ /\bnpx(?:\s+(?:--yes|-y))?\s+rea-agents@latest\s+setup\b/u,
+ );
+ expect(prose).toMatch(
+ /\bnpm exec (?:--yes|-y) --package=rea-agents@\d+\.\d+\.\d+ -- rea setup\b/u,
);
});
@@ -66,7 +90,15 @@ describe("localized README product facts", () => {
const content = await readFile(resolve("docs/installation.md"), "utf8");
expect(content).toContain("MCP Registry");
expect(content).toContain("io.github.morluto/rea");
- expect(content).toContain('"command": "npx"');
- expect(content).toContain('"args": ["-y", "rea-agents@latest", "mcp"]');
+ expect(jsonExamples(content)).toContainEqual(
+ expect.objectContaining({
+ mcpServers: expect.objectContaining({
+ rea: expect.objectContaining({
+ command: "npx",
+ args: ["-y", "rea-agents@latest", "mcp"],
+ }),
+ }),
+ }),
+ );
});
});