# simfleet > One control plane for parallel React Native work on macOS: slimmed iOS simulators and Android emulators, a live dashboard, leased Metro ports, a shared native build cache, and per-agent device attribution. This document contains the full content of all documentation pages for AI consumption. --- ## Agent skill **URL:** https://entropyconquers.github.io/simfleet/docs/agent-skill **Description:** Teach Claude Code and Codex to use the fleet safely. simfleet ships an [agent skill](https://github.com/entropyconquers/simfleet/tree/main/skills/simfleet): a `SKILL.md` plus a full API reference that coding agents load when a task involves simulators, emulators, Metro, or running a branch. It encodes the rules that keep many agents from stepping on each other. ## Install ```bash simfleet skill install # ~/.claude/skills/simfleet and ~/.codex/skills/simfleet simfleet skill install --project # ./.claude/skills and ./.codex/skills — commit it with your app simfleet skill install --claude # only Claude Code simfleet skill install --codex # only Codex ``` Re-run it after upgrading simfleet. To have new worktrees link the skill automatically, list it in the project config: ```json "worktrees": { "skills": [".claude/skills/simfleet"] } ``` ## What it teaches - **Boot slim.** Use `simfleet sim boot` / `emu boot`, never `simctl`, Xcode, or another tool's boot command. Stock only when you ask for it. - **Claim what you hold.** `simfleet claim` before a long task, `release` after, and never drive a device another live session has claimed. - **Lanes own ports.** No hand-picked ports, no killing unknown Metro processes. - **JS-first.** Start a lane and launch; build natively only through `native plan` / `native ensure`. - **Prove it.** Report the lane, device, environment, port, slim state, and whether the native build was reused, with UI evidence of the feature itself. ## Always-slim policy for every project The skill applies inside simfleet projects. To make agents boot slim devices everywhere, add a policy to your global instructions — `~/.claude/CLAUDE.md` for Claude Code, `~/.codex/AGENTS.md` for Codex: ```md title="~/.claude/CLAUDE.md" ## Simulators and emulators: always slim Boot iOS simulators and Android emulators slim unless I explicitly ask for stock. In projects with .sim-fleet/project.json use `simfleet sim boot` / `simfleet emu boot`. Elsewhere use `simslim on ` (iOS) and `avdslim start ` / `avdslim on ` (Android). ``` ## Other agents Any agent can use the fleet through the CLI or HTTP API. Set `SIMFLEET_AGENT` and `SIMFLEET_SESSION_ID` (or send `x-simfleet-agent` and `x-simfleet-session` headers) so its activity is attributed. --- ## Agent attribution **URL:** https://entropyconquers.github.io/simfleet/docs/agents **Description:** See which Claude Code or Codex session is driving each device, and let sessions claim devices. When several agents share a Mac, the question "who is using this simulator?" matters. simfleet answers it for every device. ## Automatic attribution The `simfleet` CLI detects the session it runs in and sends it with every request: | Agent | Detected from | | --- | --- | | Claude Code | `CLAUDE_CODE_SESSION_ID` | | Codex | `CODEX_THREAD_ID` or `CODEX_SESSION_ID` | | Anything else | `SIMFLEET_AGENT` and `SIMFLEET_SESSION_ID` | A device request (tap, boot, screenshot, lane start, …) from a session records a **touch** on that device. Touches expire after 30 minutes without activity. A lane whose worktree matches an agent session's working directory is attributed to that session too. ## Claims A claim makes ownership explicit and lasts until it is released, or until the Claude Code session exits: ```bash simfleet claim "reviewing the checkout flow" simfleet release simfleet agents # live sessions and the devices attached to each ``` ## Where you see it - **Dashboard.** Each device tile shows its agents; the Agents view lists every live Claude Code and Codex session with its devices. - **Menu bar.** Right-click the icon for a list of running devices and who is attached to each. Left-click opens the dashboard. - **API.** `GET /api/v1/agents`. See [Agents](/docs/api-reference/agents). ## Session discovery simfleet finds live sessions without any agent plugin: Claude Code sessions from `~/.claude/sessions` (checking that each process is alive), and Codex threads from its local state database (recently active ones). --- ## Always slim **URL:** https://entropyconquers.github.io/simfleet/docs/always-slim **Description:** Every simulator and emulator runs trimmed unless you explicitly ask for stock. A stock iOS simulator runs about 200 processes and holds 3–6 GB. Most of that is Apple services a React Native app never touches: Siri, Photos analysis, App Store, iCloud sync. Android images ship the same kind of background weight. simfleet's rule is simple: **every device is slim unless someone explicitly asks for stock.** ## What slimming does ## Auto-slim While `simfleet serve` runs, it checks every 15 seconds for devices that are booted but not slim — for example, ones started from Xcode, Android Studio, `xcrun simctl boot`, or another tool. | Platform | Behaviour | | --- | --- | | Android | Slimmed in place, no reboot. Typically takes about 5 seconds. | | iOS, booted less than 4 minutes ago | Slimmed (this reboots it). | | iOS, running longer | Reported as `needs-reboot` and shown as **Unslimmed** in the dashboard, with a Slim button. It is not rebooted automatically, because something may be mid-test on it. | `status.autoSlim` lists what the loop is doing: ```json { "enabled": true, "iosFreshBootSeconds": 240, "devices": [ { "deviceId": "763B…", "platform": "ios", "status": "needs-reboot", "reason": "running unslimmed; slimming reboots it, so it is not interrupted automatically" } ] } ``` Failed attempts back off for 10 minutes per device. ## Stock devices Sometimes you need the full platform, for example to reproduce a bug with Apple Pay or Google services. Ask for it explicitly: ```bash simfleet sim boot --stock simfleet emu boot --stock simfleet sim restore # restore a running simulator to stock simfleet emu restore ``` Each of these records an **opt-out** that auto-slim respects. `simfleet sim slim` or `emu slim` clears it again. --- ## Android emulators **URL:** https://entropyconquers.github.io/simfleet/docs/android **Description:** Boot, slim, stream, and drive Android emulators alongside your simulators. Android devices are addressed by **AVD name** (for example `Pixel_8_API_35`). The `emulator-5554` style serial exists only while an emulator runs, so the fleet never uses it as an identity. ## Lifecycle ```bash simfleet emu list # AVDs, state, slim status, footprint, agents simfleet emu boot [--window] [--cold] [--stock] simfleet emu slim # re-slim a running emulator, no reboot simfleet emu restore # stock packages (records an opt-out) simfleet emu shutdown simfleet emu tune # shut-down AVD only: low-memory config.ini ``` `boot` is headless by default (the dashboard is the screen); `--window` opens the emulator window. Boots are serialized so avdslim never races for a console port, and a boot returns only after the slim state is verified on the device. ## Inspect and drive Coordinates are device pixels from the UIAutomator tree: ```bash simfleet emu ui [x y] simfleet emu tap simfleet emu long-press simfleet emu swipe simfleet emu type "ascii text" simfleet emu key Enter simfleet emu button back|home|app-switcher|menu|lock|power|volume-up|volume-down simfleet emu rotate landscape-left simfleet emu open-url 'myapp://path' simfleet emu dev-menu simfleet emu screenshot /absolute/out.png ``` ## Lanes ```bash simfleet lane start "$PWD" simfleet lane launch ``` The fleet leases a Metro port, runs `adb reverse` for it, and opens your dev client with the `expo-development-client` deep link for that port. It prefers your configured scheme, then the `exp+` scheme Expo registers. The development build must already be installed on the emulator; Android lanes are debug-only. ## Performance - **Guest RAM.** simfleet boots with 2 GB (`SIM_FLEET_ANDROID_RAM_MB`). At 1.5 GB, Android 15 images swap hundreds of megabytes and input feels sluggish. - **Live video.** Install `scrcpy`. The dashboard then streams H.264 and injects touch directly — typically 15–80 ms from input to frame on Apple silicon, versus about two seconds with screenshot polling. - **Images.** Google APIs (non-Play) system images let avdslim disable the most packages. --- ## CLI **URL:** https://entropyconquers.github.io/simfleet/docs/cli **Description:** Every simfleet command. The CLI is a thin client over the local API. It talks to `SIM_FLEET_URL` (default `http://127.0.0.1:8790`), prints JSON, and exits non-zero on errors. `simfleet help` prints the full usage. ## Server and setup | Command | Description | | --- | --- | | `simfleet serve [--no-tray]` | Start the dashboard, API, auto-slim loop, and menu-bar icon | | `simfleet tray` | Run only the menu-bar icon | | `simfleet init` | Write a starter `.sim-fleet/project.json` | | `simfleet skill install [--claude\|--codex] [--project]` | Install the agent skill | | `simfleet version` | Print the version | ## Fleet state | Command | Description | | --- | --- | | `simfleet status` | Host memory, worktrees, lanes, Metros, simulators, emulators, agents, auto-slim | | `simfleet ports` | Environment port ranges and live leases | | `simfleet agents` | Live Claude Code / Codex sessions and their devices | | `simfleet claim [note]` | Attach this agent session to a device | | `simfleet release ` | Release a claim | ## iOS simulators | Command | Description | | --- | --- | | `simfleet sim list` | Simulators with state, memory, and slim status | | `simfleet sim creation-options` | Installed device types and runtimes | | `simfleet sim create ` | Create a simulator (left shut down) | | `simfleet sim boot [--stock]` | Boot slim (or stock) and verify | | `simfleet sim slim\|restore\|shutdown\|open ` | Lifecycle | | `simfleet sim ui [x y]` | Accessibility tree, or hit-test a point | | `simfleet sim tap [w h]` | Tap in points | | `simfleet sim swipe [w h]` | Swipe | | `simfleet sim type ` | Type text | | `simfleet sim key [modifier,…]` | Press a key (W3C `KeyboardEvent.code`) | | `simfleet sim button