Metadata-Version: 2.5
Name: rocketwright
Version: 3.12.0
Summary: Mirror and drive iOS Simulators, real iPhones, Android devices and macOS apps from Claude Code, CLI agents and the browser.
Project-URL: Homepage, https://github.com/Soflutionltd/rocketwright
Project-URL: Documentation, https://github.com/Soflutionltd/rocketwright/tree/main/docs
Project-URL: Issues, https://github.com/Soflutionltd/rocketwright/issues
Project-URL: Changelog, https://github.com/Soflutionltd/rocketwright/blob/main/CHANGELOG.md
Author: Soflution Ltd
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
License-File: THIRD_PARTY_LICENSES.md
Keywords: ai-agents,claude-code,ios-simulator,mcp,screen-mirroring,simulator,ui-automation
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: MacOS X
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: fastapi<1,>=0.115
Requires-Dist: grpclib<0.5,>=0.4.9
Requires-Dist: pillow<13,>=11.1
Requires-Dist: protobuf<8,>=7.36
Requires-Dist: tomli>=2; python_version < '3.11'
Requires-Dist: tomlkit>=0.13
Requires-Dist: uvicorn[standard]>=0.35
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.Soflutionltd/rocketwright -->

<h1 align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/media/brand/rocketwright-logo-dark.svg">
    <img src="docs/media/brand/rocketwright-logo.svg" alt="Rocketwright" width="520">
  </picture>
</h1>

**Playwright stops at the browser. Rocketwright puts the whole phone in your AI agent's hands.**

iOS Simulators, real iPhones and iPads, Android emulators and phones, and macOS apps -- driven by Claude Code, Codex,
Cursor or any MCP agent, watched live in a browser tab, at the speed of a few milliseconds a step. One tool, every
device, no glue.

*Formerly Simtrail: the `simtrail` command still works, and an existing install is taken up as it is.*

[![CI](https://github.com/Soflutionltd/rocketwright/actions/workflows/ci.yml/badge.svg)](https://github.com/Soflutionltd/rocketwright/actions/workflows/ci.yml)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![Release](https://img.shields.io/github/v/release/Soflutionltd/rocketwright?include_prereleases&sort=semver)](https://github.com/Soflutionltd/rocketwright/releases)

<img src="docs/media/hero.gif" width="100%"
  alt="A Claude Code session driving a calendar app on an iPhone 17 simulator in the viewer: it opens an event, scrolls
through its notes, then fills in and saves a new one, the agent's cursor gliding to each spot before it taps">

## Fast where an agent feels it

Measured on an Apple Silicon Mac with an iOS 26.5 simulator, Rocketwright 3.11 (November 2026):

| What the agent does | Time | Calls |
|---|---|---|
| Act, then read the screen that resulted | **41 ms** | 1 -- the answer carries the new screen |
| First screen of a session | **57 ms** | the device is attached while the agent is still thinking |
| Launch an app and read its real first screen | **~2 s** | 1 -- not the splash screen, the app |
| A new project's own simulator, ready | **17 s** | copied from a booted template instead of 31 s from blank |
| Hot reload of a Flutter change on the device | **~1 s** | each compile error as `file:line` |
| The viewer, after the daemon restarts | **4.4 s** | back by itself, no click |

Snapshots are a few lines of text -- `e2 button "General" (201,319)` -- instead of screenshots, so an agent spends a
fraction of the tokens to read a screen, and reaches for a picture only when a question is visual.

## Everything, in one tool

| | Rocketwright | Playwright | Maestro | mobile-mcp |
|---|:---:|:---:|:---:|:---:|
| iOS Simulator apps | ✅ | ❌ browsers only | ✅ | ✅ |
| Real iPhones and iPads | ✅ | ❌ | ❌ not yet supported | ✅ |
| Android emulators and phones | ✅ | Chrome and WebView only, experimental | ✅ | ✅ |
| macOS apps | ✅ | ❌ | -- | -- |
| Live viewer in any browser tab, with the agent's cursor | ✅ | -- | ✅ | ✅ |
| Builds, tests and installs (Xcode, Gradle, Flutter hot reload) | ✅ | -- | -- | -- |
| Signs in from 1Password, Bitwarden or the Keychain; the agent never sees the password | ✅ | -- | -- | -- |
| Reads a game or a canvas from its pixels | ✅ | -- | -- | -- |
| Each project its own simulator; several agents at once, never on each other's device | ✅ | -- | -- | -- |
| Records any flow as an MP4 or a GIF, every touch drawn in | ✅ | ✅ video | -- | -- |

✅ documented · ❌ documented as unsupported · -- not documented. Checked against each project's own documentation on
26 November 2026: [Playwright](https://playwright.dev/docs/api/class-android),
[Maestro](https://github.com/mobile-dev-inc/maestro), [mobile-mcp](https://github.com/mobile-next/mobile-mcp).
Something out of date? Open an issue and we fix it.

## Why Rocketwright

- **See the simulator anywhere.** A live H.264 or JPEG stream in a Chrome tab, an iframe or a `<rocket-wright>` web
  component, with touch, scrolling, typing, hardware buttons and light and dark mode.
- **Watch what the agent does.** Every agent gesture is announced before it lands, and the viewer's cursor glides to
  the spot first -- so you can follow along, and step in: an agent waits for your hand to be still.
- **Spend fewer tokens.** Agents read accessibility snapshots with stable element refs and diffs between screens, act
  in batches with waits, and reach for a screenshot only when a question is visual.
- **Read screens accessibility cannot.** A game or a canvas reads from its pixels, and an app under development can
  share its own views, so icon-only buttons and hand-drawn controls read by name.
- **Test on a real iPhone.** Plug it in and it sits beside the simulators: live over the cable at up to 60 fps, touched
  and typed on from the browser or by an agent, and given back everything Rocketwright changed on it.
- **Type like a person, on any keyboard.** Text goes in as the real keys of the Mac's own layout -- AZERTY, QWERTZ,
  US -- with no paste prompt, on iOS 26 and 27.
- **Show what happened.** Record a flow as an MP4 or a GIF with every touch drawn in -- at 60 or 120 frames a second
  for a short animation, or only the part of the screen that matters -- and put it in a pull request.

## Install

**Claude Code**, with the plugin (tools, a skill that teaches snapshot-first use, and `/rocketwright:open`):

```
/plugin marketplace add Soflutionltd/rocketwright
/plugin install rocketwright@rocketwright
```

**Any MCP client**, as a stdio server:

```sh
claude mcp add rocketwright -- uvx --from git+https://github.com/Soflutionltd/rocketwright rocketwright mcp
```

Configurations for [Codex](docs/clients/codex.md), [Cursor](docs/clients/cursor.md) and
[other clients](docs/clients/other-mcp.md).
The plugin includes four [workflow skills](docs/clients/skills.md); the release also packages them for Codex and Cursor.

**The command**, for `rocketwright open`, `doctor` and the rest:

```sh
uv tool install git+https://github.com/Soflutionltd/rocketwright
```

**The viewer library**, for your own pages, is in [`viewer/`](viewer/README.md).

**Requirements:** an Apple Silicon Mac, Xcode 26 or later, and [uv](https://docs.astral.sh/uv/). Nothing
else: Rocketwright drives a simulator with its own helper, which comes in the package. A real iPhone needs Developer Mode,
and an Apple development team to be touched. Details in [Installation](docs/installation.md).

## Quickstart

```sh
rocketwright doctor     # check this Mac, ending with a real tap on a simulator
rocketwright open       # this project's simulator, live in a browser tab
```

Then ask your agent:

> Open Settings → General → About and tell me which iOS version this simulator runs. Use sim_snapshot rather than
> screenshots.

With an iPhone plugged in, unlocked and in Developer Mode:

> Switch to my iPhone, build and run the app on it, walk through sign-up and record it as a GIF.

The first time, press **Set up touch** in the viewer: it builds WebDriverAgent with your project's own signing team.

[Getting started](docs/getting-started.md) explains what happens along the way.

## Features

**Live viewer.** H.264 through WebCodecs where the page can decode it, JPEG otherwise, negotiated per connection.
Touch, drag, scroll, typing and paste, Home and Lock, light and dark, and a device picker. It reconnects by itself
after a blip and says plainly when the simulator is off. Its menus, toolbar, settings panel and messages are in
English.

**Agent cursor.** Every agent gesture -- tap, long press, swipe, drag, typing -- reaches the viewer before it lands, and
the viewer's own pointer glides there first (`agent.cursor_lead_ms`), labelled with what the agent is doing --
Tapping “Add”, Reading the screen, Thinking…, Building. After a real break it waits in a corner. Never the Mac's pointer. On a macOS app the same
pointer is drawn over the app's own window on the Mac too, click-through and out of every capture.

**Screen understanding.** A snapshot is a few lines -- `e2 button "General" (201,319)` -- with refs that stay with their
elements across scrolls, a digest, and diffs. `sim_act` plays up to 20 steps in one call and waits for text, its
absence, or the screen to settle -- past a spinner or a pulsing dot that never stops. An app turned to landscape is
read and touched in its own points, `sim_device rotate` turns a simulator, and a tap on what a tab bar, a toolbar or
the keyboard covers is refused with how to reach it. See [Screen understanding](docs/screen-understanding.md).

**Observe mode.** For a walkthrough on an account the agent must not change, `agent.observe` refuses a tap on what
reads like Delete, Save, Send or Sign out -- in English and a dozen other languages, or styled destructive by its app --
unless the call confirms it. See [Security](docs/security.md).

**Reading pixels.** A screen whose accessibility says nothing -- a game, a canvas, an app still loading -- reads as the
text macOS's Vision finds in it, with refs to tap and text to wait for, and the viewer can outline what was read
(`perception.ocr`). See [Read from pixels](docs/screen-understanding.md#read-from-pixels).

**App SDK.** An app under development can link **RocketwrightKit**, a small Swift package, and call `Rocketwright.start()`:
in a Debug build on the simulator it shares its own UIKit and SwiftUI views, so an icon-only button, a card with a tap
gesture or a hand-drawn control reads by name, and `.rocketwright("Settings")` names a SwiftUI view. Optional, and nothing
of it is in a Release build. See [The app SDK](docs/app-sdk.md).

**Real devices.** A cabled iPhone or iPad shows up beside the simulators, and an agent can switch to it
(`sim_device list` and `choose`): its live screen over the cable; its apps, logs, look and
location through Xcode's `devicectl`; and touching, typing and its element tree through WebDriverAgent, set up once
with a click and signed by your project's own team -- a tap lands in about a third of a second. It is reached only over
the cable, and what Rocketwright changes on it is put back when it is let go. See [Real devices](docs/real-devices.md).

**Android.** Android emulators and phones sit beside the simulators, with the same viewer, cursor and tools: adb
lists, starts and drives them, scrcpy's server -- set up once with a click -- shows the screen live, UI Automator reads
it for snapshots, and `sim_build_run` and `sim_test` build a Gradle project with its own wrapper. A phone is never
started or shut down, and what Rocketwright changes on it is put back. See [Android](docs/android.md).

**Flutter.** A Flutter app is built, tested and installed by the same tools -- `flutter build`, `flutter test` and
its integration tests on the device, with a flavor and dart-defines kept off the command line -- and `sim_flutter`
keeps it running for hot reload: each saved change on the device in about a second, or each compile error as
`file:line` while the app keeps the code it had. See [Flutter](docs/flutter.md).

**Recording.** The viewer's Record button, `sim_record` or `rocketwright record` keep a device's screen as an MP4, a GIF
or both, with each touch drawn where it landed and a 9:41 status bar, and `preset: "pr"` keeps one small enough for
a pull request. See [Recording](docs/recording.md).

**Replayable flows.** `sim_flow save` keeps a walkthrough under a name -- steps and waits exactly as `sim_act` takes
them -- as a readable JSON file in the project's state folder, and `sim_flow run` plays it again in one call, by any
agent: each ref is found again by what it named, long flows are split into calls of 20 steps, and `{{email}}`-style
variables are given at run time. A step that types into a secure field must type a variable, so a password is never
kept, and the answer says each value as its name.

**Device matrix.** `sim_matrix` captures the same screen on several devices -- UDIDs, or presets such as
`small_iphone`, `large_iphone`, `ipad` and `android` -- in light and dark and at a chosen text size, launching the app
and playing a saved flow first. Each screenshot is saved in one folder beside a captioned contact sheet, every device
gets back the look it had, and one another agent holds is skipped unless the call steals it.

**Connectors.** Rocketwright's own native helper gives full control with nothing to install; idb_companion still can,
and the simctl connector mirrors the screen view-only when neither is there, and says why. `auto` uses the fastest that
works and falls back when one fails. More connectors plug in through an entry point. See
[Connectors](docs/connectors.md).

**Embedding.** An [iframe](docs/embedding/iframe.md) with a one-shot ticket, the
[`<rocketwright>` element](docs/embedding/web-component.md) themed with CSS custom properties, or Rocketwright
[inside a Python application](docs/embedding/python-fastapi.md) with its own sign-in.

**Settings panel.** `rocketwright open --settings` puts every setting a click away in the viewer, a tab per section,
saved for one project or all of them and applied before it says so. Settings that decide what runs or who may reach
the daemon wait for a code from `rocketwright settings confirm`. See [The settings panel](docs/settings.md).

**Doctor.** Checks Xcode, its Simulator frameworks, runtimes, the native helper and idb_companion, Device Hub and the
desktop session, the text reader and an app's shared hierarchy, then proves a tap reaches a simulator. See [the doctor](docs/doctor.md).

**Security.** Loopback only, a Host allowlist, exact Origin checks, CORS and framing only for origins you list, hashed
scoped tokens, and one-shot codes in URL fragments. See [Security](docs/security.md).

**Sign-in from a password manager.** `sim_login` signs an app in with a login saved in 1Password -- or Bitwarden, or
a program of yours -- searching every vault, for the account the person named and no other, and the agent never sees
the password: it is typed straight into the app's secure field, masked in every answer and in the viewer, and refused
in observe mode, while recording and on real devices unless allowed. Off until `login.sources` names a password manager.
See [Signing in](docs/login.md).

**Build and test.** `sim_build_run` and `sim_test` build with xcodebuild for the agent's simulator, install and
launch, and answer with only what failed and where -- each failing test named so it can be run again alone, and on
another simulator when asked -- and with the folder, branch and commit they built. They build the git worktree the
agent works in, with the configuration its scheme runs. Off by default, since they run commands: `rocketwright config
set build.tools true`.

## Measure the token cost

`benchmarks/tool_budget.py` calls each read-only tool through the same MCP relay a client uses and prints each answer's
bytes, estimated tokens and latency on your own screens; see [the token budget example](examples/token-budget/).
Measured with Rocketwright 2.4.0 on an iOS simulator using the native connector, showing Settings → General:
30 calls per tool after a separate initial round and 3 warmup rounds (2026-10-29). Host and device details are omitted
from the public report for privacy.

| Call | Tool | Bytes | Tokens (est.) | p50 ms | p95 ms |
|---|---|---:|---:|---:|---:|
| device info | `sim_device` | 275 | 49 | 260.1 | 282.9 |
| snapshot, full | `sim_snapshot` | 561 | 112 | 74.3 | 83.3 |
| snapshot, diff of an unchanged screen | `sim_snapshot` | 83 | 5 | 66.5 | 73.5 |
| screenshot, 400 px wide | `sim_screenshot` | 55958 | 469 | 15.5 | 17.0 |
| screenshot, 1200 px wide | `sim_screenshot` | 251484 | 4181 | 24.2 | 25.8 |

On a physical iOS device over USB with WebDriverAgent, the same 30-round run measured 199 estimated tokens for a
full snapshot (p50 859.1 ms), 5 for an unchanged-screen diff (817.9 ms), and 469 for a 400-pixel screenshot (31.4 ms).

Bytes are the whole answer, an image's base64 included; tokens are estimates (text at about 4 characters a token,
an image at about 750 pixels a token), not billed usage or whole-task costs. All measured calls succeeded. See the
[performance report](docs/performance.md) for real-iPhone results, initial-call timings, raw samples and the older
baseline. Different connectors and environments make these separate observations, not a before/after speedup claim.

## Compatibility

| | Expected to work |
|---|---|
| macOS | 26 (15 with Xcode 16.4, view-only) |
| Xcode | 26 and 27 |
| Connectors | native helper (full control), idb_companion 1.5 (full control), simctl (view-only) |
| Real devices | an iPhone or iPad that Xcode's `devicectl` reaches, by cable (view-only without WebDriverAgent) |
| Android | emulators and phones adb reaches, with the Android SDK; scrcpy 5.0.1 for the live screen; Gradle builds |
| App SDK | Debug builds on the iOS Simulator, iOS 16 or later |
| Clients | Claude Code, Codex, Cursor, any stdio MCP client |
| Browsers | Chrome, Safari, Firefox, Edge |

Rows checked on real hardware are marked verified, with the date, in [Compatibility](docs/compatibility.md).

From 1.0 the tools, the protocol, the embedding API, the viewer package, settings and the command line are held to
[what Rocketwright promises not to break](docs/stability.md): a release adds, and never breaks; 2.0 broke nothing.
Connectors are the exception, and pin a minor version.

## Documentation

[Everything](docs/README.md): getting started, clients, embedding, screen understanding, connectors, security,
architecture, and the reference for [tools](docs/reference/tools.md), [configuration](docs/reference/configuration.md),
the [command line](docs/reference/cli.md) and the [protocol](docs/reference/protocol.md).

## Roadmap

How Rocketwright relates to other tools is in [Comparison](docs/comparison.md).

## Contributing

Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md); AI
coding agents read [AGENTS.md](AGENTS.md). Report security issues privately as described in [SECURITY.md](SECURITY.md).
Questions go to [Discussions](https://github.com/Soflutionltd/rocketwright/discussions).

## License

[Apache-2.0](LICENSE). See [NOTICE](NOTICE) and [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md).

Rocketwright is an independent project, not affiliated with Apple or Anthropic. iOS, iPhone, Xcode and Simulator are
trademarks of Apple Inc.; Claude and Claude Code are trademarks of Anthropic PBC.
