# sim-on

**Agentic mobile testing CLI + your iOS simulator in the browser.**
Explore an app with an LLM once, save the session as a deterministic
Maestro-compatible flow, replay it forever for free.

```sh
npx @szdziedzic/sim-on    # → http://localhost:3300
```

Requires macOS (Apple Silicon) with Xcode command line tools.

## What you get

- **Simulator in the browser** — 60fps WebRTC stream, click/swipe/type
  forwarding, works headless (no Simulator.app window needed).
- **Unified event log** — every action (agent, flow, your clicks in the
  browser, CLI) lands in one ordered stream with source attribution.
- **Deterministic flows** — record any session (`sim-on record start/stop`)
  and it compiles into Maestro-dialect YAML with multi-facet `anchors` per
  step; replays are free and self-heal when selectors go stale.
- **Maestro interop** — `sim-on export flow.yaml` emits plain Maestro YAML
  runnable by the upstream `maestro test` CLI.
- **Agentic testing** — `sim-on explore "verify login works" --save` drives
  the app with Claude (needs `ANTHROPIC_API_KEY`) and saves the passing run
  as a flow.
- **MCP server** — `sim-on mcp` exposes the same tools to Claude Code,
  Cursor, or any MCP client:
  `claude mcp add simon -- npx @szdziedzic/sim-on mcp`

## Commands

```
sim-on                       # start daemon + browser UI (default)
sim-on devices | boot
sim-on record start <name> / stop
sim-on run <flow.yaml> [--heal]
sim-on explore "<goal>" [--app <bundleId>] [--save <file>]
sim-on export <flow.yaml>    # plain Maestro YAML
sim-on snapshot | tap | screenshot | events --follow
sim-on mcp
```

Remote mode: run `sim-on serve --remote --json` on the machine that hosts
the simulators and point any command at it with `SIMON_REMOTE_URL` +
`SIMON_REMOTE_TOKEN` — one port carries the API, the event stream, and the
browser UI, so it tunnels cleanly.

Built by [Expo](https://expo.dev). Streaming/input layer shares its
lineage (and wire protocol) with
[serve-sim](https://github.com/EvanBacon/serve-sim).
