| name | peekaboo-cli |
| description | macOS UI automation CLI tool for screen capture, window control, element clicking, text input, and more. Use when users need macOS desktop automation, UI testing, screen capture, window management, or app control. |
| allowed-tools | Bash(peekaboo:*) |
Peekaboo CLI
macOS UI automation command-line tool providing complete desktop control capabilities.
Installation
Copy this skill to your agent's skills directory:
mkdir -p ~/.claude/skills/peekaboo-cli
cp -r . ~/.claude/skills/peekaboo-cli/
mkdir -p ~/.openclaw/skills/peekaboo-cli
cp -r . ~/.openclaw/skills/peekaboo-cli/
Prerequisites
- Peekaboo CLI installed (
brew install steipete/tap/peekaboo)
- macOS Screen Recording and Accessibility permissions granted
Pre-execution Validation
Before executing any CLI commands, verify permission status first.
1. Check Permission Status
peekaboo permissions status
2. Grant Permissions (if needed)
If permissions are not granted, guide the user to enable them:
Peekaboo requires the following macOS permissions:
- Screen Recording: For capturing UI screenshots
- Accessibility: For controlling UI elements
System Settings → Privacy & Security → Screen Recording/Accessibility → Add Terminal app
Then verify:
peekaboo permissions grant
3. Verify Configuration
peekaboo list apps
Quick Start
peekaboo list apps
peekaboo see --annotate --path /tmp/ui.png
peekaboo click --on elem_42
peekaboo type "Hello World" --return
Core Commands
UI Capture & Analysis
peekaboo see --json --annotate --path /tmp/ui.png
peekaboo see --app "Safari" --window-title "GitHub"
peekaboo see --menubar
peekaboo see --mode screen
Element Interaction
peekaboo click --on elem_42
peekaboo click "Submit" --wait-for 8000
peekaboo click --coords 100,200
peekaboo click --on elem_42 --double
peekaboo click --coords 100,200 --right
peekaboo type "user@example.com" --return
peekaboo type --clear "new text"
peekaboo press return
peekaboo hotkey "cmd,w"
App Management
peekaboo app launch "Safari"
peekaboo app launch "Xcode" --open ~/Projects/MyApp.xcodeproj
peekaboo app quit --app "Safari"
peekaboo app quit --all --except "Finder,Terminal"
peekaboo app switch --to Safari --verify
Window Management
peekaboo list windows --app "Safari" --include-details bounds,ids
peekaboo window move --app Safari -x 100 -y 100
peekaboo window resize --app Safari -w 1200 --height 800
peekaboo window focus --app Terminal --space-switch
peekaboo window close --app Safari
Menu Operations
peekaboo menu click --app Safari --path "File,New Tab"
peekaboo list menubar
Scroll & Drag
peekaboo scroll --direction down --amount 3
peekaboo drag --from 100,100 --to 300,300
peekaboo move --coords 500,500
Common Workflows
Form Filling
peekaboo see --json --annotate --path /tmp/form.png
peekaboo click --on elem_10
peekaboo type "username" --tab
peekaboo type "password" --return
App Automation
peekaboo app launch "Safari" --wait-until-ready
peekaboo sleep 2
peekaboo hotkey "cmd,l"
peekaboo type "https://github.com" --return
Output Format
Most commands support --json output:
peekaboo see --json | jq '.data.ui_elements[] | {id, label, role}'
peekaboo list apps --json | jq '.data[] | select(.frontmost == true)'
Troubleshooting
Permission Errors
peekaboo permissions status
peekaboo permissions grant
Element Not Found
- Re-capture UI:
peekaboo see --json
- Use
--wait-for to increase wait time
- Use
--coords for coordinate-based targeting
Focus Issues
- Use
--space-switch for cross-Space windows
- Use
peekaboo app switch --to <app> --verify to confirm focus
- Use
--no-auto-focus when already focused manually
Detailed Documentation