get text
Extract text content from an element.Arguments
string
required
Target element:
@ref (from snapshot) or app nameOptions
string
Filter by accessibility role
string
Filter by title
string
Filter by label
integer
default:"0"
Which matching element to read (0-indexed)
boolean
Output as JSON
Examples
Output
The command reads from
AXValue, AXTitle, or AXDescription attributes in that order, returning the first available value.get value
Get the current value of an input element.Arguments and options
Identical toget text.
Examples
Output
Checkboxes return
0 (unchecked) or 1 (checked). Sliders and steppers return their numeric value.get attr
Retrieve a specific accessibility attribute.Arguments
string
required
Target element:
@ref or app namestring
required
Attribute name (e.g.,
AXRole, AXEnabled, AXFrame, AXPosition)Options
Standard filter options:--role, --title, --label, --index, --json
Examples
Output
Common attributes
- Identity
- State
- Layout
- Content
AXRole- Element typeAXRoleDescription- Human-readable roleAXTitle- Element titleAXDescription- Accessibility descriptionAXIdentifier- Unique identifier
get title
Get the title of the frontmost window of an application.Arguments
string
required
Application name or bundle identifier
Options
boolean
Output as JSON
Examples
Output
is enabled
Check if an element is enabled (interactive).Arguments
string
required
Target element:
@ref or app nameOptions
Standard filter options:--role, --title, --label, --index, --json
Examples
Output
Use this in scripts to conditionally perform actions based on element availability.
is focused
Check if an element currently has keyboard focus.Arguments and options
Identical tois enabled.