Reference

CLI Command Reference

CLI Command Reference

This source-tree reference covers all 33 root commands in the upcoming v4 registry and is checked against the built binary's --help output. Use peekaboo <command> --help for every option and peekaboo tools for the separate MCP/agent tool catalog.

#Core commands

CommandPurpose / subcommands
bridgeInspect Bridge connectivity; status is the default subcommand.
captureaction, live, and video capture workflows.
cleanRemove snapshot cache data, with --dry-run support.
completionsGenerate zsh, bash, or fish completion scripts.
configConfiguration plus credential and provider subcommand trees.
daemonrun, start, status, and stop the headless daemon.
learnPrint the agent guide, tool catalog, and live command signatures.
permissionsstatus, grant, or request <kind>.
screenlist connected displays.
toolslist MCP tools or describe <name> for one schema.

#Interaction commands

CommandPurpose
actionInvoke a named accessibility action.
clickClick an element/query or --at x,y.
dragDrag between element IDs or coordinates using --from and --to.
moveMove the physical pointer to --on or --at.
pastePaste current clipboard content or atomically set, paste, and restore.
pressPress xdotool-style chords or chord sequences.
scrollScroll by direction, optionally on an element.
set-valueSet an accessibility element value directly.
typeType text; standalone keys and chords belong to press.

#System commands

CommandPurpose / subcommands
appfocus, hide, launch, list, quit, relaunch, switch, and unhide.
clipboardget, set, clear, save, and restore.
dialogclick, dismiss, file, input, and list.
dockhide, launch, list, right-click, and show.
menuclick or list application menus.
menubarclick or list menu-bar status items.
spacelist, move-window, and switch Spaces.
visualizerExercise the agent cursor, input HUD, and capture indicators.
windowclose, focus, list, maximize, minimize, move, resize, restore, and set-bounds.

#Vision, AI, and MCP commands

CommandPurpose / subcommands
seeCapture pixels and element maps; use --tree, --no-screenshot, or --no-elements to select the observation shape.
verifyPoll stable window/element predicates; results are satisfied, unsatisfied, or unknown.
agentrun, resume, sessions, and chat; run is the default.
browserControl Chrome page content through the browser MCP tool.
mcpStart the MCP server; serve is the default subcommand.

#Shared grammar

Durations accept bare milliseconds, ms, or s: 500, 500ms, 2s, and 1.5s are equivalent forms. Coordinate input is --at x,y; with an app/window target it is target-relative unless --global is present. Modifier lists use comma-separated values such as cmd,shift.

Interaction commands share foreground/focus controls where relevant. Background delivery is the default when Peekaboo can resolve an exact process target; physical pointer gestures and intentional global input require --foreground.

#JSON result envelope

Pass --json (or the Commander-provided --json-output alias) for one stable result shape. Every response has success, data (null when unavailable), optional error, and debug_logs. Failed responses exit nonzero and include error.code, error.message, and an actionable error.hint when the command already knows the next step.

Once the command path identifies an action request, its result also includes a top-level effect: confirmed when existing AX/readback verification proves the result, partial for a partly completed multi-step action, unverifiable when input was dispatched without an application-level signal, suspected_noop when a post-check found no change, or refused when a safety gate prevented dispatch. Commander parse/bind failures for recognized action commands report effect: refused; read-only commands omit effect. MCP action tools expose the same canonical fields in result metadata.

When an interaction, window mutation, or application lifecycle command returns a native action receipt, JSON also includes a top-level outcome object. This includes click, type, scroll, press, action, set-value, background window geometry/lifecycle operations, and application launch, relaunch, quit, hide, unhide, focus, and switch. The object is the validated canonical projection: state, route, delivery, evidence, dispatch state/count, retry safety, escalation, refusal reason, and the derived mutation_dispatched, retry_safe, and requires_fresh_observation compatibility fields. The legacy top-level effect and failure safety fields derive from that same object. Read-only commands, older hosts, and actions without native receipts omit outcome rather than fabricating a receipt.