Skip to content

setup

/rn-dev-agent:setup

/setup does two things in sequence: diagnoses your environment, then proposes the project-side wiring the plugin needs. Each proposed change is shown as a diff and asks for confirmation before writing.

PhaseStepAction
1. DiagnoseARun /doctor — check Node, CDP bridge, agent-device, maestro-runner, simulators, Metro, ffmpeg
2. InjectBAppend the plugin’s tool-routing rules to your project CLAUDE.md (or create one)
2. InjectCAdd a small dev-only bridge call to your app entry — exposes the navigation ref + Zustand stores in __DEV__ only
2. InjectDScaffold .rn-agent/ — the plugin’s home in your project (README, .gitignore, dev-bridge.ts, globals.d.ts, starter folders)
2. VerifyERun cdp_status to confirm the bridge is reachable

Re-running /setup is idempotent. Already-applied blocks are detected and skipped — safe to run any time you want to confirm everything is wired.

  • First time using the plugin in a project
  • After SessionStart shows WARNING messages
  • When cdp_status fails to connect
  • When device_* tools fail
  • After cloning a project that already had /setup run by someone else (will detect existing wiring and skip)
| Check | Status | Action Needed |
|-----------------|-----------------------|-----------------------------------------|
| Node.js | OK (v22.15.0) | — |
| CDP bridge | OK | — |
| agent-device | MISSING | Run: npm install -g agent-device |
| maestro-runner | OK (v1.0.9) | — |
| iOS Simulator | BOOTED (iPhone 16) | — |
| Android | NOT RUNNING | Boot an emulator |
| Metro | RUNNING (port 8081) | — |
| CDP connection | CONNECTED | — |
| ffmpeg | OK (v7.1) | — |
CLAUDE.md — append plugin tool-routing rules? [diff shown] (y/n)
App entry — add getBridge()?.registerNavRef(...)? [diff shown] (y/n)
App entry — add getBridge()?.registerStores(...)? [diff shown] (y/n)
.rn-agent/ — scaffold (8 files)? [list shown] (y/n)
  • /doctor — read-only diagnostic sibling. /doctor reports; /setup fixes and instruments.
  • Getting Started — installation and first run
  • Actions — what .rn-agent/ is for after /setup scaffolds it