serve-sim
Streams a booted iOS Simulator to your browser, with touch, keyboard, screen recording and accessibility refs, so agents such as Codex, Cursor and Claude can see and drive it. By Evan Bacon, who develops Expo.
View on GitHub ↗- Stars
- ★ 2,974
- Last commit
- 1 Dec 2026
- Maintenance
- Active
- Licence
- Apache-2.0
- Category
- Other
- GitHub
- EvanBacon/
serve-sim
Overview
serve-sim describes itself as the "npx serve of Apple Simulators". It starts a small Swift helper that captures the simulator's framebuffer through xcrun simctl io and exposes it as a video stream with a WebSocket control channel. A React preview page is served on top. It works with any booted iOS Simulator and needs no Xcode plugin or changes to your app. You can use it locally, over your LAN, or on a remote Mac behind a tunnel.
For agents, the repo also ships an Agent Skill that teaches them to use the serve-sim command line. The CLI can print the screen's accessibility tree with short element refs. The author develops Expo, but says the tool is not tied to React Native.
serve-sim is licensed under the Apache License 2.0.
Features
- A live browser preview of the simulator. The README describes a 60 fps stream, swipe from the bottom to go home, pinch gestures (hold the Option key), drag and drop of images and videos, and keyboard shortcuts forwarded to the simulator.
- Simulator logs forwarded to the browser, so browser-use MCP tools can read them, plus a recent-actions panel and serve-sim event-log.
- Commands to tap, send gestures as JSON, press hardware buttons, rotate, type text, paste Unicode text, toggle Core Animation debug overlays and simulate a memory warning.
- serve-sim ax --refs prints a compact snapshot of the screen with refs such as @e2. serve-sim tap @e2 --settle taps that element and prints what changed. A ref that has gone stale or scrolled off screen is refused rather than tapped.
- Screen recording to MP4 with serve-sim record, plus commands to pull a frame, diff two moments or list changed frames from the recording's index file, and an opt-in rolling buffer of recent frames.
- Camera injection: replace the simulator camera for one app with a placeholder, an image, a video or your Mac's webcam.
- Support for Apple Watch, iPad and iOS simulators, and fold controls for the iPhone Duo simulator on Xcode 27.1 (the README says this depends on private beta APIs).
- Remote use needs an --auth-token. The host shell and .ipa installs from the preview are off unless you start the server with --allow-exec.
- Connectors: the agent skill, a Claude Code plugin marketplace entry, a Claude Code Desktop launch configuration, an Expo Metro middleware and a Connect-style middleware to embed the preview in your own dev server.
Requirements
- A Mac with Apple Silicon (the bundled helper is an arm64 binary) and the Xcode command line tools.
- Node.js 20 or later.
- macOS 14 or later for camera injection.
- On Xcode 27, the README says Device Hub must be running with the simulator window visible and in front, and your terminal may need Accessibility permission for keyboard input.
Install
Boot a simulator, then run npx serve-sim. The preview opens at http://localhost:3200.
To teach your agent to use it, run bunx add-skill EvanBacon/serve-sim or npx skills add EvanBacon/serve-sim. In Claude Code you can instead run /plugin marketplace add EvanBacon/serve-sim, then /plugin install serve-sim.
Example
With a simulator booted and serve-sim running, ask your agent to open Settings and check a screen. The agent can run serve-sim ax --refs to read the screen, serve-sim tap @e2 --settle to tap an element and see what changed, and serve-sim record -o demo.mp4 -t 10 to capture ten seconds of video. The README's agent guide also covers what to do when a tap is not delivered.
Works with
Listed in
- github.com/EvanBacon/serve-sim
- github.com/EvanBacon/serve-sim/blob/main/README.md
- github.com/EvanBacon/serve-sim/tree/main/skills/serve-sim
Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.
More in this category
Osaurus
A native Swift agent harness for macOS on Apple silicon, with local MLX or Foundation Models, optional cloud providers, persistent memory, skills, tools, automations and a local OpenAI-compatible server.
MCP Swift SDK
The official Swift SDK for building MCP clients and servers.
sim-use
A Swift command-line tool from LY Corporation that lets AI agents read and tap the screen of the iOS Simulator and Android emulators, using compact accessibility outlines instead of screenshots. Real iPhone support is experimental.
SwiftAgents