Community编程与开发github.com

Peekaboo

使用 Peekaboo CLI 捕获并自动化 macOS 用户界面。

Peekaboo 是什么?

Peekaboo 是一款功能强大的 macOS UI 自动化 CLI 工具,允许 AI 代理或开发者检查应用程序 UI、执行点击、拖拽、输入等操作,并验证结果。它通过 OpenClaw Bridge 与 macOS 进行通信,支持 v4 语法(例如 `app list`、`see`、`press`),并且能够返回结构化的 JSON 输出。该工具支持视网膜截图、元素检测以及键盘快捷键触发,并提供了详细的故障排除指南。Peekaboo 特别适用于需要精细控制 macOS 用户界面并验证操作结果的场景,但它要求用户理解权限管理、桥接套接字配置和命令选项。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/peekaboo

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Peekaboo 是做什么的?

使用 Peekaboo 检查 macOS UI,对预期目标执行操作,并验证结果。 以下示例使用 v4 语法。请检查 peekaboo --version 和已安装命令的 --help;对于旧版本,请遵循该版本的帮助。

OpenClaw Bridge

当启用计算机控制且其提供者为 Peekaboo 且 Peekaboo Bridge 已启用时,OpenClaw macOS 应用会托管 Peekaboo Bridge。通过该主机运行时,请保留现有的 OpenClaw 套接字选择:

export PEEKABOO_BRIDGE_SOCKET="${PEEKABOO_BRIDGE_SOCKET:-$HOME/Library/Application Support/OpenClaw/bridge.sock}"
peekaboo bridge status --json

确认所选主机和套接字是预期的。保留显式的 PEEKABOO_BRIDGE_SOCKET 或 --bridge-socket 选择。如果所需主机不可用,请报告该结果;不要清除选择或切换计算机控制提供者以使命令成功。

权限属于执行操作的进程或 Bridge 主机。 除非调用方具有所需权限,否则不要传递 --no-remote。

查找已安装的命令

使用叶子命令的帮助来获取标志和定位要求,而不是在命令之间复制标志。使用根命令帮助来发现可用命令:

peekaboo --help
peekaboo app list --help
peekaboo see --help
peekaboo press --help
peekaboo drag --help

V4 移除了这些旧命令根:

旧命令V4 命令
list appsapp list
imagesee --no-elements 用于无元素检测的像素
hotkeypress 使用和弦,例如 cmd+shift+t
swipedrag --from … --to …

对于其他操作,包括点击、输入、滚动以及管理窗口或菜单,请使用 peekaboo <command> --help。将命令选项放在叶子命令之后;--json 请求结构化输出。

检查、执行、验证

从应用程序清单和目标的新鲜视图开始:

peekaboo app list --json
peekaboo see --app Safari --window-title "Example" --annotate \
  --path /tmp/peekaboo-example.png --json

在执行操作之前读取返回的元素。将操作绑定到预期的应用程序、窗口和新鲜快照上;不要重复使用示例元素 ID。执行操作后,再次检查 UI 并验证请求的结果。当窗口发生变化或目标过时时,刷新观察。

对于无元素检测的屏幕截图:

peekaboo see --mode screen --screen-index 0 --no-elements --retina \
  --path /tmp/peekaboo-screen.png --json

原始键盘和弦需要显式的前景交互或被 press 接受的精确窗口凭证。拖拽总是移动共享光标并且需要 --foreground。当前景交互被授权时:

peekaboo press cmd+shift+t --app Safari --foreground --json
peekaboo drag --from 100,500 --to 100,200 --duration 800ms --foreground --json

使用来自当前观察的实际目标和坐标。首选显式持续时间单位,例如 800ms;查阅每个命令的帮助以了解其选项和先决条件。

故障排除

  • 对于已移除命令的错误,请使用已安装 CLI 指定的替代命令。
  • 对于主机或权限失败,请检查所选主机的 peekaboo bridge status --json 和 peekaboo permissions status --json。
  • 对于定位失败,请阅读叶子命令的帮助并使用 see 获取新的 UI 状态。
  • 在 macOS 15+ 上,私有窗口选择器提示与基本的屏幕录制授权是分开的,即使 Bridge 权限正确,也可能会出现。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相关技能