作者:互联网 时间: 2026-08-09 10:25:01
Peekaboo 是一款专为全方位 macOS UI 自动化量身定制的强大命令行界面,是 Openclaw Skills 中需要桌面交互功能的关键桥梁。它允许用户和 AI Agent 精确地捕获和检查屏幕、定位特定的 UI 元素,并管理应用程序窗口或系统菜单。通过提供快照缓存和结构化的 JSON 输出,它简化了涉及视觉识别和程序化输入模拟的复杂工作流脚本编写过程。
Peekaboo 专为现代开发工作流设计,可与基于视觉的 AI 模型无缝集成。它可以提取帧、标注 UI 映射,并执行诸如点击、拖动和输入等高级命令。无论您是在构建自动化测试套件,还是赋予 AI 导航本地环境的能力,Peekaboo 都能在 Openclaw Skills 生态系统中提供实现复杂 macOS 控制所需的底层钩子。
下载入口:https://github.com/openclaw/skills/tree/main/skills/steipete/peekaboo从源直接安装技能的最快方式。
npx clawhub@latest install peekaboo
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 peekaboo。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
要开始使用 Openclaw Skills 库中的此工具,请通过 Homebrew 安装:
brew tap steipete/tap/peekaboo
brew install peekaboo
# 验证权限
peekaboo permissions
安装完成后,您可以使用以下命令验证连接并查看可用工具:
peekaboo bridge
peekaboo tools
Peekaboo 通过快照缓存和结构化 CLI 输出组织数据。关键数据特性包括:
| 数据类型 | 描述 |
|---|---|
| 快照 (Snapshots) | 以 JSON 或图像文件 (PNG/JPG) 形式存储的缓存 UI 状态。 |
| UI 映射 (UI Maps) | 带有元素 ID(如 B1, T2)的屏幕标注视觉表示。 |
| JSON 输出 | 应用程序、窗口和菜单项的标准机器可读数据。 |
| 配置 (Config) | 用于管理服务商、模型和凭据的本地配置文件。 |
name: peekaboo
description: Capture and automate macOS UI with the Peekaboo CLI.
homepage: https://peekaboo.boo
metadata: {"clawdbot":{"emoji":"??","os":["darwin"],"requires":{"bins":["peekaboo"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/peekaboo","bins":["peekaboo"],"label":"Install Peekaboo (brew)"}]}}
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.
Core
bridge: inspect Peekaboo Bridge host connectivitycapture: live capture or video ingest + frame extractionclean: prune snapshot cache and temp filesconfig: init/show/edit/validate, providers, models, credentialsimage: capture screenshots (screen/window/menu bar regions)learn: print the full agent guide + tool cataloglist: apps, windows, screens, menubar, permissionspermissions: check Screen Recording/Accessibility statusrun: execute .peekaboo.json scriptssleep: pause execution for a durationtools: list available tools with filtering/display optionsInteraction
click: target by ID/query/coords with smart waitsdrag: drag & drop across elements/coords/Dockhotkey: modifier combos like cmd,shift,tmove: cursor positioning with optional smoothingpaste: set clipboard -> paste -> restorepress: special-key sequences with repeatsscroll: directional scrolling (targeted + smooth)swipe: gesture-style drags between targetstype: text + control keys (--clear, delays)System
app: launch/quit/relaunch/hide/unhide/switch/list appsclipboard: read/write clipboard (text/images/files)dialog: click/input/file/dismiss/list system dialogsdock: launch/right-click/hide/show/list Dock itemsmenu: click/list application menus + menu extrasmenubar: list/click status bar itemsopen: enhanced open with app targeting + JSON payloadsspace: list/switch/move-window (Spaces)visualizer: exercise Peekaboo visual feedback animationswindow: close/minimize/maximize/move/resize/focus/listVision
see: annotated UI maps, snapshot IDs, optional analysisGlobal runtime flags
--json/-j, --verbose/-v, --log-level <level>--no-remote, --bridge-socket <path>peekaboo permissions
peekaboo list apps --json
peekaboo see --annotate --path /tmp/peekaboo-see.png
peekaboo click --on B1
peekaboo type "Hello" --return
--app, --pid, --window-title, --window-id, --window-index--snapshot (ID from see; defaults to latest)--on/--id (element ID), --coords x,y--no-auto-focus, --space-switch, --bring-to-current-space, --focus-timeout-seconds, --focus-retry-count--path, --format png|jpg, --retina--mode screen|window|frontmost, --screen-index, --window-title, --window-id--analyze "prompt", --annotate--capture-engine auto|classic|cg|modern|sckit--duration (drag/swipe), --steps, --delay (type/scroll/press)--profile human|linear, --wpm (typing)--direction up|down|left|right, --amount <ticks>, --smoothpeekaboo see --app Safari --window-title "Login" --annotate --path /tmp/see.png
peekaboo click --on B3 --app Safari
peekaboo type "[email protected]" --app Safari
peekaboo press tab --count 1 --app Safari
peekaboo type "supersecret" --app Safari --return
peekaboo list windows --app "Visual Studio Code" --json
peekaboo click --window-id 12345 --coords 120,160
peekaboo type "Hello from Peekaboo" --window-id 12345
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"
peekaboo capture live --mode region --region 100,100,800,600 --duration 30 r
--active-fps 8 --idle-fps 2 --highlight-changes --path /tmp/capture
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
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
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
peekaboo hotkey --keys "cmd,shift,t"
peekaboo press escape
peekaboo type "Line 1
Line 2" --delay 10
Notes
peekaboo see --annotate to identify targets before clicking.