peekaboo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePeekaboo
Peekaboo
Use for macOS screen capture, UI inspection, and GUI automation.
用于macOS屏幕捕获、UI检查和GUI自动化。
Binary
二进制文件
- Prefer when present; it is Peter's local release copy.
~/bin/peekaboo - Else use .
peekaboo - Check first: .
~/bin/peekaboo --version || peekaboo --version
- 优先使用(如果存在),这是Peter的本地发布副本。
~/bin/peekaboo - 否则使用。
peekaboo - 先检查版本:。
~/bin/peekaboo --version || peekaboo --version
Safety
安全注意事项
- Check permissions before capture/automation: .
peekaboo permissions status --json - Screenshot needs Screen Recording; clicks/typing/window control need Accessibility.
- On remote Macs, Screenshot may be blocked by missing Screen Recording while clicks/typing still work through Accessibility; continue with clicks or DOM automation when the target is otherwise knowable.
- Prefer for machine parsing and
--jsonwhen testing local TCC.--no-remote - Do not click/type/destructively automate unless user asked or target is a controlled test.
- 在捕获/自动化前检查权限:。
peekaboo permissions status --json - 截图需要屏幕录制权限;点击/输入/窗口控制需要辅助功能权限。
- 在远程Mac上,若缺少屏幕录制权限,截图功能可能被阻止,但点击/输入仍可通过辅助功能权限正常工作;当目标可被识别时,可继续使用点击或DOM自动化。
- 机器解析优先使用参数,测试本地TCC时使用
--json参数。--no-remote - 除非用户要求或目标是受控测试环境,否则不要执行点击/输入或破坏性自动化操作。
Common Commands
常用命令
bash
PB="${PEEKABOO_BIN:-$HOME/bin/peekaboo}"
[ -x "$PB" ] || PB="$(command -v peekaboo)"
"$PB" permissions status --json
"$PB" list screens --json
"$PB" list apps --json
"$PB" list windows --app Safari --json
"$PB" image --mode screen --screen-index 0 --path /tmp/screen.png --json --no-remote
"$PB" see --app frontmost --path /tmp/frontmost.png --json --annotate
"$PB" tools --json
"$PB" learn
"$PB" click --coords 100,100 --json
"$PB" type "text" --jsonbash
PB="${PEEKABOO_BIN:-$HOME/bin/peekaboo}"
[ -x "$PB" ] || PB="$(command -v peekaboo)"
"$PB" permissions status --json
"$PB" list screens --json
"$PB" list apps --json
"$PB" list windows --app Safari --json
"$PB" image --mode screen --screen-index 0 --path /tmp/screen.png --json --no-remote
"$PB" see --app frontmost --path /tmp/frontmost.png --json --annotate
"$PB" tools --json
"$PB" learn
"$PB" click --coords 100,100 --json
"$PB" type "text" --jsonWorkflow
工作流程
- Resolve as above and confirm version when install state matters.
PB - Run ; if missing TCC, report exact missing grant.
permissions status --json - For screenshots, use ; include
image,--path, and usually--json.--no-remote - For element targeting, run , then click by element id/snapshot.
see --json --annotate - For long-running/change-aware screen capture, use ; for video frame sampling, use
capture live.capture video - Use for command/tool discovery and
tools --jsonwhen the full agent guide is useful.learn - Verify output files with or view the image.
sips -g pixelWidth -g pixelHeight <path>
Docs: .
~/Projects/Peekaboo/docs/commands/- 按上述方式解析路径,若安装状态重要则确认版本。
PB - 运行;若缺少TCC权限,报告具体缺失的权限项。
permissions status --json - 截图时使用命令;需包含
image、--path参数,通常还需--json参数。--no-remote - 定位元素时,运行,然后通过元素ID/快照进行点击操作。
see --json --annotate - 长期运行/感知变化的屏幕捕获使用;视频帧采样使用
capture live。capture video - 使用进行命令/工具发现,需要完整Agent指南时使用
tools --json命令。learn - 使用验证输出文件,或直接查看图片。
sips -g pixelWidth -g pixelHeight <path>
文档路径:。
~/Projects/Peekaboo/docs/commands/