Peekaboo
Peekaboo is a full macOS UI automation CLI: capture/inspect screens, target UI
elements, drive input, and manage apps/windows/menus. Commands share a snapshot
cache and support --json/-j for scripting. Run peekaboo or
peekaboo <cmd> --help for flags; peekaboo --version prints build metadata.
Tip: run via polter peekaboo to ensure fresh builds.
Features (all CLI capabilities, excluding agent/MCP)
Core
bridge: inspect Peekaboo Bridge host connectivity
capture: live capture or video ingest + frame extraction
clean: prune snapshot cache and temp files
config: init/show/edit/validate, providers, models, credentials
image: capture screenshots (screen/window/menu bar regions)
learn: print the full agent guide + tool catalog
list: apps, windows, screens, menubar, permissions
permissions: check Screen Recording/Accessibility status
run: execute .peekaboo.json scripts
sleep: pause execution for a duration
tools: list available tools with filtering/display options
Interaction
click: target by ID/query/coords with smart waits
drag: drag & drop across elements/coords/Dock
hotkey: modifier combos like cmd,shift,t
move: cursor positioning with optional smoothing
paste: set clipboard -> paste -> restore
press: special-key sequences with repeats
scroll: directional scrolling (targeted + smooth)
swipe: gesture-style drags between targets
type: text + control keys (--clear, delays)
System
app: launch/quit/relaunch/hide/unhide/switch/list apps
clipboard: read/write clipboard (text/images/files)
dialog: click/input/file/dismiss/list system dialogs
dock: launch/right-click/hide/show/list Dock items
menu: click/list application menus + menu extras
menubar: list/click status bar items
open: enhanced open with app targeting + JSON payloads
space: list/switch/move-window (Spaces)
visualizer: exercise Peekaboo visual feedback animations
window: close/minimize/maximize/move/resize/focus/list
Vision
see: annotated UI maps, snapshot IDs, optional analysis
Global runtime flags
--json/-j, --verbose/-v, --log-level <level>
--no-remote, --bridge-socket <path>
Quickstart (happy path)
peekaboo permissions
peekaboo list apps --json
peekaboo see --annotate --path /tmp/peekaboo-see.png
peekaboo click --on B1
peekaboo type "Hello" --return
Common targeting parameters (most interaction commands)
- App/window:
--app, --pid, --window-title, --window-id, --window-index
- Snapshot targeting:
--snapshot (ID from see; defaults to latest)
- Element/coords:
--on/--id (element ID), --coords x,y
- Focus control:
--no-auto-focus, --space-switch, --bring-to-current-space,
--focus-timeout-seconds, --focus-retry-count
Common capture parameters
- Output:
--path, --format png|jpg, --retina
- Targeting:
--mode screen|window|frontmost, --screen-index,
--window-title, --window-id
- Analysis:
--analyze "prompt", --annotate
- Capture engine:
--capture-engine auto|classic|cg|modern|sckit
Common motion/typing parameters
- Timing:
--duration (drag/swipe), --steps, --delay (type/scroll/press)
- Human-ish movement:
--profile human|linear, --wpm (typing)
- Scroll:
--direction up|down|left|right, --amount <ticks>, --smooth
Examples
See -> click -> type (most reliable flow)
peekaboo see --app Safari --window-title "Login" --annotate --path /tmp/see.png
peekaboo click --on B3 --app Safari
peekaboo type "user@example.com" --app Safari
peekaboo press tab --count 1 --app Safari
peekaboo type "supersecret" --app Safari --return
Target by window id
peekaboo list windows --app "Visual Studio Code" --json
peekaboo click --window-id 12345 --coords 120,160
peekaboo type "Hello from Peekaboo" --window-id 12345
Capture screenshots + analyze
peekaboo image --mode screen --screen-index 0 --retina --path /tmp/screen.png
peekaboo image --app Safari --window-title "Dashboard" --analyze "Summarize KPIs"
peekaboo see --mode screen --screen-index 0 --analyze "Summarize the dashboard"
Live capture (motion-aware)
peekaboo capture live --mode region --region 100,100,800,600 --duration 30 \
--active-fps 8 --idle-fps 2 --highlight-changes --path /tmp/capture
App + window management
peekaboo app launch "Safari" --open https://example.com
peekaboo window focus --app Safari --window-title "Example"
peekaboo window set-bounds --app Safari --x 50 --y 50 --width 1200 --height 800
peekaboo app quit --app Safari
Menus, menubar, dock
peekaboo menu click --app Safari --item "New Window"
peekaboo menu click --app TextEdit --path "Format > Font > Show Fonts"
peekaboo menu click-extra --title "WiFi"
peekaboo dock launch Safari
peekaboo menubar list --json
Mouse + gesture input
peekaboo move 500,300 --smooth
peekaboo drag --from B1 --to T2
peekaboo swipe --from-coords 100,500 --to-coords 100,200 --duration 800
peekaboo scroll --direction down --amount 6 --smooth
Keyboard input
peekaboo hotkey --keys "cmd,shift,t"
peekaboo press escape
peekaboo type "Line 1\nLine 2" --delay 10
Notes
- Requires Screen Recording + Accessibility permissions.
- Use
peekaboo see --annotate to identify targets before clicking.
1---2name: peekaboo3description: Automates macOS UI via a CLI: capture screens, inspect and target UI elements, drive mouse and keyboard input, and manage apps, windows, menus, and dialogs.4---5# Peekaboo67Peekaboo is a full macOS UI automation CLI: capture/inspect screens, target UI8elements, drive input, and manage apps/windows/menus. Commands share a snapshot9cache and support `--json`/`-j` for scripting. Run `peekaboo` or10`peekaboo <cmd> --help` for flags; `peekaboo --version` prints build metadata.11Tip: run via `polter peekaboo` to ensure fresh builds.1213## Features (all CLI capabilities, excluding agent/MCP)1415Core1617- `bridge`: inspect Peekaboo Bridge host connectivity18- `capture`: live capture or video ingest + frame extraction19- `clean`: prune snapshot cache and temp files20- `config`: init/show/edit/validate, providers, models, credentials21- `image`: capture screenshots (screen/window/menu bar regions)22- `learn`: print the full agent guide + tool catalog23- `list`: apps, windows, screens, menubar, permissions24- `permissions`: check Screen Recording/Accessibility status25- `run`: execute `.peekaboo.json` scripts26- `sleep`: pause execution for a duration27- `tools`: list available tools with filtering/display options2829Interaction3031- `click`: target by ID/query/coords with smart waits32- `drag`: drag & drop across elements/coords/Dock33- `hotkey`: modifier combos like `cmd,shift,t`34- `move`: cursor positioning with optional smoothing35- `paste`: set clipboard -> paste -> restore36- `press`: special-key sequences with repeats37- `scroll`: directional scrolling (targeted + smooth)38- `swipe`: gesture-style drags between targets39- `type`: text + control keys (`--clear`, delays)4041System4243- `app`: launch/quit/relaunch/hide/unhide/switch/list apps44- `clipboard`: read/write clipboard (text/images/files)45- `dialog`: click/input/file/dismiss/list system dialogs46- `dock`: launch/right-click/hide/show/list Dock items47- `menu`: click/list application menus + menu extras48- `menubar`: list/click status bar items49- `open`: enhanced `open` with app targeting + JSON payloads50- `space`: list/switch/move-window (Spaces)51- `visualizer`: exercise Peekaboo visual feedback animations52- `window`: close/minimize/maximize/move/resize/focus/list5354Vision5556- `see`: annotated UI maps, snapshot IDs, optional analysis5758Global runtime flags5960- `--json`/`-j`, `--verbose`/`-v`, `--log-level <level>`61- `--no-remote`, `--bridge-socket <path>`6263## Quickstart (happy path)6465```bash66peekaboo permissions67peekaboo list apps --json68peekaboo see --annotate --path /tmp/peekaboo-see.png69peekaboo click --on B170peekaboo type "Hello" --return71```7273## Common targeting parameters (most interaction commands)7475- App/window: `--app`, `--pid`, `--window-title`, `--window-id`, `--window-index`76- Snapshot targeting: `--snapshot` (ID from `see`; defaults to latest)77- Element/coords: `--on`/`--id` (element ID), `--coords x,y`78- Focus control: `--no-auto-focus`, `--space-switch`, `--bring-to-current-space`,79 `--focus-timeout-seconds`, `--focus-retry-count`8081## Common capture parameters8283- Output: `--path`, `--format png|jpg`, `--retina`84- Targeting: `--mode screen|window|frontmost`, `--screen-index`,85 `--window-title`, `--window-id`86- Analysis: `--analyze "prompt"`, `--annotate`87- Capture engine: `--capture-engine auto|classic|cg|modern|sckit`8889## Common motion/typing parameters9091- Timing: `--duration` (drag/swipe), `--steps`, `--delay` (type/scroll/press)92- Human-ish movement: `--profile human|linear`, `--wpm` (typing)93- Scroll: `--direction up|down|left|right`, `--amount <ticks>`, `--smooth`9495## Examples9697### See -> click -> type (most reliable flow)9899```bash100peekaboo see --app Safari --window-title "Login" --annotate --path /tmp/see.png101peekaboo click --on B3 --app Safari102peekaboo type "user@example.com" --app Safari103peekaboo press tab --count 1 --app Safari104peekaboo type "supersecret" --app Safari --return105```106107### Target by window id108109```bash110peekaboo list windows --app "Visual Studio Code" --json111peekaboo click --window-id 12345 --coords 120,160112peekaboo type "Hello from Peekaboo" --window-id 12345113```114115### Capture screenshots + analyze116117```bash118peekaboo image --mode screen --screen-index 0 --retina --path /tmp/screen.png119peekaboo image --app Safari --window-title "Dashboard" --analyze "Summarize KPIs"120peekaboo see --mode screen --screen-index 0 --analyze "Summarize the dashboard"121```122123### Live capture (motion-aware)124125```bash126peekaboo capture live --mode region --region 100,100,800,600 --duration 30 \127 --active-fps 8 --idle-fps 2 --highlight-changes --path /tmp/capture128```129130### App + window management131132```bash133peekaboo app launch "Safari" --open https://example.com134peekaboo window focus --app Safari --window-title "Example"135peekaboo window set-bounds --app Safari --x 50 --y 50 --width 1200 --height 800136peekaboo app quit --app Safari137```138139### Menus, menubar, dock140141```bash142peekaboo menu click --app Safari --item "New Window"143peekaboo menu click --app TextEdit --path "Format > Font > Show Fonts"144peekaboo menu click-extra --title "WiFi"145peekaboo dock launch Safari146peekaboo menubar list --json147```148149### Mouse + gesture input150151```bash152peekaboo move 500,300 --smooth153peekaboo drag --from B1 --to T2154peekaboo swipe --from-coords 100,500 --to-coords 100,200 --duration 800155peekaboo scroll --direction down --amount 6 --smooth156```157158### Keyboard input159160```bash161peekaboo hotkey --keys "cmd,shift,t"162peekaboo press escape163peekaboo type "Line 1\nLine 2" --delay 10164```165166Notes167168- Requires Screen Recording + Accessibility permissions.169- Use `peekaboo see --annotate` to identify targets before clicking.