Discovery commands
apps
List all running GUI applications.Output format
find
Find accessibility elements matching filters.Application name
Filter by role (e.g., AXButton, AXTextField)
Filter by title (substring match)
Filter by label (substring match)
Filter by identifier (substring match)
Filter by value (substring match)
Maximum search depth
Maximum results to return
Output format
tree
Print the accessibility tree for an application.Application name
Maximum tree depth
Output format
snapshot
Create an accessibility tree snapshot with interactive references (@n1, @n2, etc.).Application name
Show only interactive elements (buttons, text fields, etc.)
Remove empty structural elements
Maximum tree depth
JSON output
The snapshot command generates
@n1, @n2, etc. references that can be used with other commands like click, fill, and get.inspect
Inspect all attributes and actions of an element.Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Filter by identifier
Which match (0-indexed)
JSON output
Application commands
open
Open or launch an application.Application name or bundle identifier
Output format
screenshot
Capture a screenshot of an app’s frontmost window.Application name or bundle identifier
Output path (defaults to auto-generated temp file)
JSON output
Interaction commands
click
Click an element (performs AXPress action).Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Filter by identifier
Which match (0-indexed)
JSON output
fill
Clear a text field and type new text.Target element:
@ref or app nameText to fill
Filter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
type
Type text into an element without clearing existing content.Target element:
@ref or app nameText to type
Filter by role (defaults to TextField)
Filter by title
Filter by label
Filter by identifier
Which match (0-indexed)
JSON output
focus
Focus an element.Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Filter by identifier
Which match (0-indexed)
JSON output
hover
Hover over an element (moves cursor to center).Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
check
Check a checkbox or toggle (idempotent).Target element:
@ref or app nameFilter by role (defaults to CheckBox)
Filter by title
Filter by label
Which match (0-indexed)
JSON output
uncheck
Uncheck a checkbox or toggle (idempotent).Target element:
@ref or app nameFilter by role (defaults to CheckBox)
Filter by title
Filter by label
Which match (0-indexed)
JSON output
select
Select an option from a popup button or combo box.Target element:
@ref or app nameOption to select (by title)
Filter by role (defaults to PopUpButton)
Filter by title
Filter by label
Which match (0-indexed)
JSON output
action
Perform an arbitrary AX action on an element.Target element:
@ref or app nameAction to perform (e.g., AXPress, AXConfirm, AXIncrement)
Filter by role
Filter by title
Filter by label
Filter by identifier
Which match (0-indexed)
JSON output
Use
inspect to see available actions for an element.Keyboard commands
key
Send keystrokes to an application.Application name or bundle identifier
Keys to send (e.g., cmd+k, escape, “Hello world”)
JSON output
cmdorcommandctrlorcontrolalt,option, oroptshift
return,enter,tab,spacedelete,backspace,escape,escleft,right,up,downhome,end,pageup,pagedownf1throughf12
paste
Paste clipboard contents or a file into an app via Cmd+V.Application name or bundle identifier
Path to file to paste (omit to paste clipboard or stdin)
JSON output
-
Paste current clipboard:
-
Pipe file to clipboard then paste:
-
Copy file to clipboard then paste:
Data retrieval commands
get text
Get the text content of an element.Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
get value
Get the value of an input element.Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
get attr
Get a specific attribute of an element.Target element:
@ref or app nameAttribute name (e.g., AXRole, AXValue, AXEnabled)
Filter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
get title
Get the title of the frontmost window of an app.Application name
JSON output
State checking commands
is enabled
Check if an element is enabled.Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
is focused
Check if an element is focused.Target element:
@ref or app nameFilter by role
Filter by title
Filter by label
Which match (0-indexed)
JSON output
Wait commands
wait
Wait until an element matching filters appears.Application name
Filter by role
Filter by title
Filter by label
Filter by identifier
Timeout in seconds
Poll interval in seconds
Output format
Browser commands
js
Execute JavaScript in a browser’s active tab.Browser app name (Arc, Google Chrome, Safari)
JavaScript code to execute
JSON output
You must enable “Allow JavaScript from Apple Events” in the browser’s developer settings.
- Arc
- Google Chrome (use “Chrome” as shorthand)
- Safari
- Chromium
- Brave Browser
- Microsoft Edge (use “Edge” as shorthand)