Discovery commands
apps
List all running GUI applications.text|json
default:"text"
Output format
find
Find accessibility elements matching filters.string
required
Application name
string
Filter by role (e.g., AXButton, AXTextField)
string
Filter by title (substring match)
string
Filter by label (substring match)
string
Filter by identifier (substring match)
string
Filter by value (substring match)
int
default:"10"
Maximum search depth
int
default:"20"
Maximum results to return
text|json
default:"text"
Output format
tree
Print the accessibility tree for an application.string
required
Application name
int
default:"5"
Maximum tree depth
text|json
default:"text"
Output format
snapshot
Create an accessibility tree snapshot with interactive references (@n1, @n2, etc.).string
required
Application name
flag
Show only interactive elements (buttons, text fields, etc.)
flag
Remove empty structural elements
int
default:"8"
Maximum tree depth
flag
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.string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
string
Filter by identifier
int
default:"0"
Which match (0-indexed)
flag
JSON output
Application commands
open
Open or launch an application.string
required
Application name or bundle identifier
text|json
default:"text"
Output format
screenshot
Capture a screenshot of an app’s frontmost window.string
required
Application name or bundle identifier
string
Output path (defaults to auto-generated temp file)
flag
JSON output
Interaction commands
click
Click an element (performs AXPress action).string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
string
Filter by identifier
int
default:"0"
Which match (0-indexed)
flag
JSON output
fill
Clear a text field and type new text.string
required
Target element:
@ref or app namestring
required
Text to fill
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
type
Type text into an element without clearing existing content.string
required
Target element:
@ref or app namestring
required
Text to type
string
Filter by role (defaults to TextField)
string
Filter by title
string
Filter by label
string
Filter by identifier
int
default:"0"
Which match (0-indexed)
flag
JSON output
focus
Focus an element.string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
string
Filter by identifier
int
default:"0"
Which match (0-indexed)
flag
JSON output
hover
Hover over an element (moves cursor to center).string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
check
Check a checkbox or toggle (idempotent).string
required
Target element:
@ref or app namestring
Filter by role (defaults to CheckBox)
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
uncheck
Uncheck a checkbox or toggle (idempotent).string
required
Target element:
@ref or app namestring
Filter by role (defaults to CheckBox)
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
select
Select an option from a popup button or combo box.string
required
Target element:
@ref or app namestring
required
Option to select (by title)
string
Filter by role (defaults to PopUpButton)
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
action
Perform an arbitrary AX action on an element.string
required
Target element:
@ref or app namestring
required
Action to perform (e.g., AXPress, AXConfirm, AXIncrement)
string
Filter by role
string
Filter by title
string
Filter by label
string
Filter by identifier
int
default:"0"
Which match (0-indexed)
flag
JSON output
Use
inspect to see available actions for an element.Keyboard commands
key
Send keystrokes to an application.string
required
Application name or bundle identifier
string...
required
Keys to send (e.g., cmd+k, escape, “Hello world”)
flag
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.string
required
Application name or bundle identifier
string
Path to file to paste (omit to paste clipboard or stdin)
flag
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.string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
get value
Get the value of an input element.string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
get attr
Get a specific attribute of an element.string
required
Target element:
@ref or app namestring
required
Attribute name (e.g., AXRole, AXValue, AXEnabled)
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
get title
Get the title of the frontmost window of an app.string
required
Application name
flag
JSON output
State checking commands
is enabled
Check if an element is enabled.string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
is focused
Check if an element is focused.string
required
Target element:
@ref or app namestring
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Wait commands
wait
Wait until an element matching filters appears.string
required
Application name
string
Filter by role
string
Filter by title
string
Filter by label
string
Filter by identifier
float
default:"10.0"
Timeout in seconds
float
default:"0.5"
Poll interval in seconds
text|json
default:"text"
Output format
Browser commands
js
Execute JavaScript in a browser’s active tab.string
required
Browser app name (Arc, Google Chrome, Safari)
string
required
JavaScript code to execute
flag
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)