Commands

Full reference for every agent-click command.

Interaction

CommandDescription
agent-click click [selector] -a AppClick an element (AXPress, no focus steal)
agent-click type "text" -s @e3Clear and type into a field (AXSetValue)
agent-click type "text" -a AppType into focused field (keyboard sim)
agent-click key cmd+k -a SlackPress a key or combo
agent-click scroll down -a MusicScroll within an app
agent-click scroll-to @e42Scroll element into view (headless)
agent-click drag @e5 @e10 -a FinderDrag from one element to another

Discovery

CommandDescription
agent-click snapshot -a App -i -cGet accessibility tree with refs
agent-click find 'selector' -a AppFind elements matching a selector
agent-click get-value @e5Get element value, name, role, position
agent-click text -a AppGet all visible text
agent-click tree -a AppRaw accessibility tree (JSON)
agent-click windows -a AppList windows with positions
agent-click appsList running applications
agent-click focusedGet the focused element

Window Management

CommandDescription
agent-click open App --waitLaunch an application
agent-click move-window -a App --x 100 --y 100Move window position (headless)
agent-click resize-window -a App --width 800 --height 600Resize window (headless)
agent-click screenshot -a App --path shot.pngTake a screenshot

Wait & Verify

CommandDescription
agent-click wait-for 'selector'Wait for an element to appear
agent-click ensure-text @e3 "hello"Only types if current value differs
agent-click click @e5 --expect 'name="Done"'Click then verify a result appeared

Automation

CommandDescription
agent-click batch --bailExecute commands from stdin JSON array
agent-click run workflow.yamlRun a multi-step YAML workflow
agent-click observe -a AppInteractive TUI tree explorer

System

CommandDescription
agent-click check-permissionsVerify accessibility access

Snapshot Options

agent-click snapshot -a Calculator              # full tree
agent-click snapshot -a Calculator -i           # interactive elements only
agent-click snapshot -a Calculator -c           # compact (skip empty containers)
agent-click snapshot -a Calculator -d 3         # limit depth
agent-click snapshot -a Calculator -i -c -d 5   # combine options
OptionDescription
-a, --appTarget application
-i, --interactiveOnly interactive elements (buttons, inputs, links)
-c, --compactRemove empty structural elements
-d, --depthLimit tree depth

Global Options

OptionDescription
--humanHuman-readable output
--compactCompact single-line JSON
--timeout <s>Global timeout in seconds (default: 5)
-v, --verboseDebug traces
--cdpForce CDP mode for Electron apps
--cdp-port <port>Override CDP port
--no-cdpDisable CDP auto-detection