Skip to main content
Inspect CLI gives coding agents direct access to mobile browsers on physical devices and iOS simulators. The canonical, copy-pasteable setup guide is inspect.dev/agent.md. Once installed, prefer inspect agent-context and inspect skills get mobile-debugging: both are generated from the installed CLI version and cannot drift from its commands.

Install and preflight

The simulator-provisioning workflow below requires CLI 3.2.0 or newer. If inspect devices create is absent, the registry has not supplied that release yet: use an existing simulator or update the CLI before continuing. Do not mix the foreground inspect server with typed commands on the same ports; typed commands start and reuse their own daemon automatically. Every command supports --json. Successful and failed responses use stable {ok, command, data | error} envelopes, and errors include recovery suggestions and meaningful exit codes.

Zero-hardware iOS quickstart (macOS)

The optional third devices create argument accepts an installed runtime name, version, or identifier—for example "iOS 26.5", "26.5", or com.apple.CoreSimulator.SimRuntime.iOS-26-5. Omit it to let Xcode choose the newest compatible runtime. Simulator creation requires macOS and Xcode.

Physical devices

  • iPhone/iPad: connect over USB, unlock, trust the computer, and enable Settings → Safari → Advanced → Web Inspector.
  • Android: enable Developer options and USB debugging, then accept the ADB authorization prompt.
  • Run inspect devices list --json. If the device is absent or not ready, run inspect doctor --json and follow its suggestions.

Agent debugging loop

Use --session <name> to keep an agent’s selected device, target, snapshot references, and evidence checkpoints separate from other concurrent tasks. inspect devtools opens Chrome DevTools for a human handoff without changing the command workflow.

Raw CDP and Chrome DevTools MCP

inspect cdp returns browser and page WebSocket URLs for custom CDP scripts. See MCP integrations for the supported iOS/WebKit capability matrix. Inspect returns explicit unsupported-capability errors where Chromium features have no honest WebKit or host equivalent; callers must not treat error text returned as MCP content as success.

Current access model

Login is optional for the free tier. Every debugging capability is available inside two free 15-minute sessions per day; device discovery, simulator provisioning, target listing, diagnostics, status, and account commands never open a session. SUBSCRIPTION_REQUIRED reports why access stopped and when a new free session becomes available. Run inspect upgrade --json only when the user wants a checkout link.

Recovery

  • No devices: inspect doctor --json.
  • No targets: inspect launch safari --url <url> --json.
  • Upgrade/daemon mismatch: rerun the command; the CLI follows the daemon sidecar and replaces an older daemon automatically. If a foreground server owns the ports, stop that server first.
  • Stale snapshot ref: rerun inspect snapshot --interactive --json and use the new @eN reference.
  • Need the exact installed contract: inspect agent-context.