AXe documentation
AXe is a command-line tool that automates iOS simulators, including the dual-screen iPhone Duo simulator, and connected iPhones and iPads. It reads the accessibility tree, sends taps, typing, gestures and hardware buttons, captures screenshots and video, and changes device settings. Agent mode gives AI agents checked, stateful control of the UI.
What AXe does
AXe is one binary you install with Homebrew. Every command names its target with --udid, and the same commands work on a simulator, an iPhone Duo simulator and a paired iPhone or iPad. Use it from a terminal, a shell script, a CI job or an AI agent.
Inspect the UI
describe-ui prints the accessibility tree as JSON, or the element at one point. Agent mode returns compact rows with a ref for each control.
Tap, type, swipe and draw
Tap by point or by --id, --label or --value, long press, double tap, scroll until an element appears, pinch, rotate, drag, draw and type.
Screenshots and video
Save PNGs, record H.264 MP4s, stream MJPEG, JPEG or BGRA frames, and native H.264 from a physical device.
Change device settings
Set dark mode, text size, accessibility display settings, VoiceOver, a simulated location and the simulator status bar.
Simulators and hardware
Automate connected iPhones and iPads, and every screen, fold and orientation of the iPhone Duo simulator.
Built for AI agents
--agent checks every action against the screen the agent saw and returns the settled screen. The AXe skill teaches agents to use it.
A first session
axe list-simulators # find a booted simulator's UDID
export UDID=<UDID>
axe describe-ui --udid "$UDID" # accessibility tree as JSON
axe tap --label "Continue" --udid "$UDID"
axe type 'Hello world' --udid "$UDID"
axe screenshot --udid "$UDID" --output screen.pngFor a physical device, use axe list-devices and axe doctor instead of list-simulators; the rest is the same. See Physical iPhone & iPad.
Coordinates are logical points in the current orientation, the units axe displays reports. A screenshot contains pixels. AXe handles rotation and letterboxing for you.
Two ways to drive the UI
| Route | Use it for | How it works |
|---|---|---|
| Plain commands | Scripts, CI and known flows | Send input by point or selector. Fast and simple; you check the result with a separate read. |
Agent mode (--agent) | AI agents and flows that must not hit the wrong control | Capture the screen as rows with refs, act on a ref, and get the settled screen back. AXe refuses input if the control changed. |
Read Agent Mode before connecting an AI agent to AXe, and install the AI skill so the agent knows the workflow.