
Peekaboo
CLImacOS 截屏与界面自动化 CLI:截图、读取无障碍树拿到结构化界面元素,再点击、输入、切换窗口与菜单;也可作为 MCP 服务器接入 Claude Code、Codex。需要 macOS 15+ 及屏幕录制、辅助功能权限。
Peekaboo 🫣 — Mac automation that sees the screen and does the clicks.
Peekaboo is a macOS CLI and menu-bar app for screen capture, accessibility inspection, and native UI automation. Use it directly, let its agent plan multi-step work, or expose the same toolset to MCP clients.

Install
The released CLI and app require macOS 15 or later.
CLI with Homebrew
brew install openclaw/tap/peekaboo
MCP package with npm
The npm package requires Node.js 22 or later and includes the CLI plus its MCP launcher.
npx -y @steipete/peekaboo --version
See MCP setup to connect it to Codex, Claude Code, Cursor, or another MCP client.
Mac app
Download the signed DMG from the latest GitHub release. The menu-bar app provides permission onboarding, visual feedback, and agent sessions; install the CLI separately when you also need peekaboo on PATH.
For source builds and alternative install details, see the installation guide.
Quick start
Check the permissions available to Peekaboo, then take a screenshot:
peekaboo permissions status
peekaboo see --no-elements --mode screen --path /tmp/peekaboo-screen.png
Screen capture requires Screen Recording permission. Accessibility permission enables UI inspection and control; the permissions guide covers setup and the additional permission used for synthetic input.
Inspect a running app to get a structured UI map with opaque element IDs:
peekaboo see --app Finder --json
That is the core loop: observe the current screen, choose an element from the result, and act on it.
What's new in 4.9.5
Peekaboo 4.9.5 is a fix release. Unsigned source builds, such as Homebrew core's peekaboo formula, now run commands in-process immediately instead of waiting on or aborting at a daemon they cannot trust, and developers can opt in to trusting their own exact-binary daemon with PEEKABOO_ALLOW_UNSIGNED_DAEMON=1. Commands no longer start an on-demand daemon that a granted Peekaboo.app would outrank, see stops flagging complete Accessibility reads as incomplete, and released CLI binaries no longer carry the build machine's toolchain path. See the changelog for details.
Automate an app
List Safari's windows, copy the intended window_id (12345 below), then keep the entire interaction pinned to
that exact window:
peekaboo window list --app Safari --json
peekaboo click "Address and search bar" --app Safari --window-id 12345
peekaboo type "github.com/openclaw/Peekaboo" --app Safari --window-id 12345
peekaboo press Return --app Safari --window-id 12345
Targeted semantic and typed CLI input uses background delivery when Peekaboo can resolve the process, so the app does
not have to become frontmost. Raw CLI press chords can also stay background with an exact window selector. The CLI
also accepts a fresh exact non-dialog snapshot; that snapshot is required by background-only Agent/MCP policy.
App/PID-only and targetless chords require explicit foreground consent, as do window-selector-only Agent/MCP chords.
Prefer a semantic action such as menu click when one exists. See the
automation guide for element IDs, coordinates, snapshots, waits, and input behavior.
Agent and MCP
The agent combines the same observation and action tools into a natural-language run:
peekaboo agent "Open Safari, go to github.com, and search for Peekaboo" --allow-foreground
Agent runs need a configured model provider. See agent setup for providers and sessions, or MCP setup to expose Peekaboo's tools to another client.
Command map
| Goal | Commands | Guide |
|---|---|---|
| Observe the desktop | see, screen list, window list | Capture and inspection |
| Interact with UI | click, type, press, scroll, drag, set-value, action | Automation |
| Control macOS | app, window, menu, menubar, dock, dialog, space | Command reference |
| Run workflows | agent, capture | Agent · Capture |
| Integrate with clients | mcp, browser, tools | MCP |
Run peekaboo help <command> for live CLI help. The complete command index links to flags, examples, and troubleshooting for every command.
Configuration
Peekaboo stores provider credentials and settings under ~/.peekaboo. Use peekaboo config to inspect or change them, and consult the configuration guide for profiles, environment variables, and custom providers. The provider reference covers hosted, compatible, and local model backends.
Shell completions for zsh, bash, and fish come from peekaboo completions; see the completion guide for persistent setup.
Learn more
- Project direction
- Platform support
- Architecture
- Building from source
- Testing
- Agent chat loop
- Command reference
Community
- PeekabooWin — Windows-first rewrite of the Peekaboo automation loop (JavaScript + PowerShell) by @FelixKruger
- PeekabooX — Linux-first rewrite of the Peekaboo automation loop (Rust + Python) by @nordbyte
Development
Source builds require macOS 15 or later, Swift 6.2 or later, Node.js 22 or later, and the repository's submodules.
pnpm install --frozen-lockfile
pnpm run build:cli
pnpm run lint:docs
pnpm run test:safe
More build, signing, and test details live in docs/building.md.
License
MIT. See LICENSE.
相關資源

Peekaboo
MCPmacOS 截屏、无障碍树检查与原生界面自动化工具,可作为 MCP 服务让 agent 看屏幕并点击、输入、操作菜单。需 macOS 15+ 并授予屏幕录制与辅助功能权限。
openclaw/Peekaboo5.3k
Mole
CLImacOS 系统清理与维护命令行 mo:清理缓存和日志、彻底卸载应用、分析磁盘占用、清理项目构建产物、查看系统状态;删除类命令可先用 --dry-run 预览,磁盘分析与状态支持 JSON 输出。需要 macOS 12+。
tw93/Mole71.1k
agent-browser
Skillagent-browser 浏览器自动化 CLI 的配套技能:引导 agent 加载与已装版本匹配的用法,完成导航、填表、截图与探索式测试,也能操作 Electron 桌面应用。需先安装 agent-browser CLI,Vercel Labs 出品。
vercel-labs/agent-browser44.2k
Midscene Skills
Skill基于 Midscene.js 视觉识别的跨平台 UI 自动化技能合集:用自然语言操控浏览器、桌面、Android、iOS 与鸿蒙设备,并可搭建 Vitest + Midscene E2E 测试。需自备视觉模型 API Key,Midscene 官方维护。
web-infra-dev/midscene-skills320
Windows-MCP
MCP让 agent 直接操作 Windows 桌面:启动应用、切换窗口、模拟键鼠、读取界面元素、执行 PowerShell,不依赖视觉模型。仅支持 Windows。
CursorTouch/Windows-MCP9.4k
Playwright
CLI微软官方的跨浏览器端到端测试框架:一套 API 驱动 Chromium、Firefox 与 WebKit,npx playwright test 并行隔离跑测,自带自动等待与 Trace 回放排查失败。
microsoft/playwright98k