Skip to main content
Complete reference for all commands in the agent-native CLI toolkit.

Discovery commands

apps

List all running GUI applications.
text|json
default:"text"
Output format
Example:

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
Example:

tree

Print the accessibility tree for an application.
string
required
Application name
int
default:"5"
Maximum tree depth
text|json
default:"text"
Output format
Example:

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
Example:
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 name
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
Example:

Application commands

open

Open or launch an application.
string
required
Application name or bundle identifier
text|json
default:"text"
Output format
Example:

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
Example:

Interaction commands

click

Click an element (performs AXPress action).
string
required
Target element: @ref or app name
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
Examples:

fill

Clear a text field and type new text.
string
required
Target element: @ref or app name
string
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
Examples:

type

Type text into an element without clearing existing content.
string
required
Target element: @ref or app name
string
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
Example:

focus

Focus an element.
string
required
Target element: @ref or app name
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
Example:

hover

Hover over an element (moves cursor to center).
string
required
Target element: @ref or app name
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

check

Check a checkbox or toggle (idempotent).
string
required
Target element: @ref or app name
string
Filter by role (defaults to CheckBox)
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

uncheck

Uncheck a checkbox or toggle (idempotent).
string
required
Target element: @ref or app name
string
Filter by role (defaults to CheckBox)
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

select

Select an option from a popup button or combo box.
string
required
Target element: @ref or app name
string
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
Example:

action

Perform an arbitrary AX action on an element.
string
required
Target element: @ref or app name
string
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
Example:
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
Examples:
Supported modifiers:
  • cmd or command
  • ctrl or control
  • alt, option, or opt
  • shift
Special keys:
  • return, enter, tab, space
  • delete, backspace, escape, esc
  • left, right, up, down
  • home, end, pageup, pagedown
  • f1 through f12

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
Three input modes:
  1. Paste current clipboard:
  2. Pipe file to clipboard then paste:
  3. 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 name
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

get value

Get the value of an input element.
string
required
Target element: @ref or app name
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

get attr

Get a specific attribute of an element.
string
required
Target element: @ref or app name
string
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
Example:

get title

Get the title of the frontmost window of an app.
string
required
Application name
flag
JSON output
Example:

State checking commands

is enabled

Check if an element is enabled.
string
required
Target element: @ref or app name
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

is focused

Check if an element is focused.
string
required
Target element: @ref or app name
string
Filter by role
string
Filter by title
string
Filter by label
int
default:"0"
Which match (0-indexed)
flag
JSON output
Example:

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
Example:

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
Examples:
You must enable “Allow JavaScript from Apple Events” in the browser’s developer settings.
Supported browsers:
  • Arc
  • Google Chrome (use “Chrome” as shorthand)
  • Safari
  • Chromium
  • Brave Browser
  • Microsoft Edge (use “Edge” as shorthand)