Loading...
Loading...
macOS native app automation CLI for AI agents. Use when the user needs to interact with macOS desktop applications, including opening apps, clicking buttons, toggling settings, filling forms, reading UI state, automating System Settings, controlling Finder, Safari, or any native app.
npx skill4agent add ericclemmons/agent-native agent-nativeagent-nativeswift build -c release && cp .build/release/agent-native /usr/local/bin/agent-native appsagent-native open <app>agent-native apps # Check what's already running
agent-native snapshot Safari -i # Use the already-open browser
agent-native click @n5 # Interact using refs
agent-native snapshot Safari -i # Re-snapshot after UI changesagent-native open <app> # Open/activate by name or bundle ID
agent-native open "System Settings"
agent-native open com.apple.Safari # Already-running apps just activateagent-native screenshot <app> [path] # Capture app's frontmost window
agent-native screenshot Slack # Saves to /tmp/agent-native-screenshot.png
agent-native screenshot Slack /tmp/slack.png # Custom path
agent-native screenshot Slack --json # {"path": "...", "width": ..., "height": ...}agent-native key <app> <keys...> # Send keystrokes to an app
agent-native key Slack "Hello world" # Type text
agent-native key Slack cmd+k # Send Cmd+K
agent-native key Slack escape # Special keys: escape, return, tab, delete, up, down, left, right, space
agent-native key Slack cmd+a delete # Chain multiple keys
agent-native key Calculator 5 + 3 return # Multiple keystrokescmdcommandctrlcontrolaltoptionoptshiftagent-native paste <app> <path> # Copy file to clipboard and Cmd+V into app
agent-native paste Slack /tmp/screenshot.png # Paste image into Slack
agent-native paste Slack ./report.pdf # Paste any fileagent-native snapshot <app> # Full AX tree with refs
agent-native snapshot <app> -i # Interactive elements only (recommended)
agent-native snapshot <app> -i -c # Interactive + compact
agent-native snapshot <app> -d 3 # Limit depth
agent-native snapshot <app> -i --json # JSON for parsing| Flag | Description |
|---|---|
| Interactive elements only |
| Compact -- remove empty structural elements |
| Limit tree depth |
| JSON output |
agent-native click @n2 # Click / press
agent-native fill @n3 "text" # Clear field and type
agent-native type @n3 "text" # Type without clearing
agent-native select @n5 "Option A" # Select from dropdown
agent-native check @n4 # Check checkbox (idempotent)
agent-native uncheck @n4 # Uncheck checkbox (idempotent)
agent-native focus @n3 # Focus element
agent-native hover @n2 # Move cursor to element
agent-native action @n7 AXIncrement # Any AX actionagent-native get text @n1 # Get text / title / label
agent-native get value @n3 # Get input value
agent-native get attr @n2 AXEnabled # Get any AX attribute
agent-native get title Safari # Frontmost window title
agent-native is enabled @n5 # true / false
agent-native is focused @n3 # true / falseagent-native apps # List running GUI apps
agent-native apps --format json # JSON output
agent-native find <app> --role AXButton # Find elements by filter
agent-native find <app> --title "Submit" # Find by title
agent-native inspect @n3 # All attributes and actions
agent-native tree <app> --depth 3 # Raw AX tree (no refs)agent-native wait <app> --title "Apply" --timeout 5
agent-native wait <app> --role AXSheet --timeout 10snapshotsnapshotagent-native snapshot Arc -i # Auto-detects Chromium, enables AX enhancement
agent-native snapshot "VS Code" -i # Auto-detects Electron, enables AX enhancementsnapshot--remote-debugging-portAXEnhancedUserInterface# Launch Chrome with CDP
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
# Snapshot auto-detects CDP on ports 9222/9229
agent-native snapshot Chrome -i
# Or specify a port explicitly
agent-native snapshot Chrome -i --port 9222agent-native ax-enable Arc # Persistently enable AXEnhancedUserInterface
agent-native snapshot Arc -i # Now shows web page elements
agent-native ax-disable Arc # Restore when doneagent-native key Slack cmd+k # Open quick switcher
agent-native key Slack "channel name" return # Type and confirm
agent-native screenshot Slack /tmp/slack.png # Visual confirmation
agent-native get title Slack # Check navigation stateagent-native paste Slack /path/to/image.png # Copies to clipboard and pastes in one step-icheckuncheckfilltype