Command categories
Discovery commands
Find and explore application UI elements:apps- List all running GUI applicationsfind- Search for elements matching specific criteriainspect- View detailed element attributes and actionstree- Display the accessibility hierarchysnapshot- Create an interactive element reference map
Interaction commands
Perform actions on UI elements:click- Click buttons and interactive elementsfill- Clear and fill text fieldstype- Type text into elementscheck/uncheck- Toggle checkboxesselect- Choose options from dropdownsfocus- Set keyboard focushover- Move cursor to elementaction- Execute arbitrary accessibility actions
State commands
Read element properties and values:get text- Extract text contentget value- Read input valuesget attr- Query specific attributesget title- Get window titleis enabled- Check if element is enabledis focused- Check if element has focus
Wait commands
Pause execution until conditions are met:wait- Wait for element to appear with timeout
Keyboard commands
Send keyboard input:key- Send keystrokes and shortcutspaste- Paste clipboard or file content
Screenshot commands
Capture visual output:screenshot- Capture app window images
Common patterns
Using element references
Many commands support@ref syntax for targeting elements from a snapshot:
Filter-based element selection
Commands accept filters to locate elements:JSON output
Most commands support--json flag for structured output:
Command syntax
Target specification
Commands use two target types:Element reference from snapshot (e.g.,
@n1, @n42)Application name or bundle identifier (e.g.,
Safari, com.apple.Safari)Common options
These options appear across multiple commands:Filter by accessibility role (e.g.,
Button, TextField, CheckBox)Filter by element title (substring match)
Filter by accessibility label (substring match)
Filter by accessibility identifier (substring match)
Which matching element to use (0-indexed)
Output results as JSON
Next steps
Discovery commands
Learn how to find and explore UI elements
Interaction commands
Control apps by clicking and typing
State commands
Read element properties and values
Keyboard commands
Send keystrokes and shortcuts