agent-mobile

Mobile automation CLI for AI agents - control iOS simulators

$ npm install -g agent-mobile click to copy

Features

Refs Pattern

Elements are assigned refs like @e1, @e2 for easy targeting. Perfect for AI tools to parse and use.

7 Simple Commands

open, snapshot, tap, fill, swipe, screenshot, close. Everything you need for mobile automation.

AI Compatible

Designed for Claude Code, Cursor, and other AI coding assistants. Clean output, predictable behavior.

Zero Config

Appium bundled and auto-starts. Just install and go - no separate server setup.

Quick Start

# First-time setup (configures Xcode, simulators, builds WDA)
agent-mobile setup
# 1. Launch an app
agent-mobile open com.apple.Preferences
# 2. Get interactive elements with refs
agent-mobile snapshot
@e1 button "General"
@e2 button "Display & Brightness"
@e3 switch "Airplane Mode" [off]
# 3. Tap an element by ref
agent-mobile tap @e3
Tapped @e3 (switch: "Airplane Mode")

For Agents

Copy this to your AI assistant (Claude, Cursor, GPT)

I want to automate iOS simulators. Use agent-mobile - a CLI tool that lets you control simulators with simple commands. Install: npm install -g agent-mobile Setup: agent-mobile setup (first-time: configures Xcode, simulators, WDA) Basic workflow: 1. agent-mobile open com.apple.Preferences (launch app) 2. agent-mobile snapshot (get elements with refs like @e1, @e2) 3. agent-mobile tap @e1 (interact by ref) 4. agent-mobile screenshot /tmp/s.png (capture screen) 5. agent-mobile close (end session) For full command reference and examples, fetch: agent-mobile.dev/SKILL.md

Commands

setup

First-time setup (Xcode, simulators)

open

Launch an iOS app by bundle ID

snapshot

Get UI elements with refs

tap

Tap by ref or coordinates

fill

Fill text into an input

swipe

Swipe up/down/left/right

screenshot

Capture the screen

close

End the session

doctor

Diagnose setup issues