Peekaboo is a macOS command-line tool and menu-bar app that captures screens, inspects accessibility information, and controls native user interfaces. AI agents and MCP clients use it to observe applications and carry out interactions on a Mac.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/openclaw/peekaboo/menubargit clone --depth 1 https://github.com/openclaw/PeekabooWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/openclaw/peekaboo/menubar)<a href="https://agentmods.dev/commands/openclaw/peekaboo/menubar"><img src="https://agentmods.dev/badge/commands/openclaw/peekaboo/menubar.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00873 |
| Opus 5 | $0.00000 | $0.00436 |
| Sonnet 5 | $0.00000 | $0.00175 |
| Haiku 4.5 | $0.00000 | $0.00087 |
Grade A, and why
menubar scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.
peekaboo menubar
menubar is a lightweight helper for macOS status items (a.k.a. menu bar extras). It talks directly to MenuServiceBridge so you can list every icon with its index or click one by title/index. Listing is read-only and stays in the background. Clicking opens global menu bar UI and therefore requires explicit --foreground consent. Use the menu command for traditional application menus; this command is strictly for the right-hand side of the menu bar.
Subcommands
| Subcommand | Description |
|---|---|
list |
Prints every visible status item with its index. --json emits the same data plus bundle IDs and AX identifiers. |
click |
Clicks an item by name (case-insensitive fuzzy match) or via --index <n>. |
Key options
| Flag | Description |
|---|---|
[itemName] |
Optional positional argument passed to click. |
--index <n> |
Target by numeric index (matches the ordering from menubar list). |
--foreground |
Required for click; permits Peekaboo to open global status-item UI and interrupt the current foreground workflow. |
--verify |
After clicking, confirm a popover owned by the same PID appears, or that focus moved to the owning app/window (fallback OCR). OCR requires the popover text to include the target title/owner name and anchors verification to the clicked item’s X position when available. |
| Global flags | --json returns structured payloads; --verbose adds descriptions when listing. |
Implementation notes
- The command name is
menubar(no hyphen).listandclickare real Commander subcommands. - Listing uses
MenuServiceBridge.listMenuBarItems, and verbose mode prints extra diagnostics (owner name, hidden state). JSON mode always includes the raw title, bundle ID, owner name, identifier, visibility, and description. clickrefuses before status-item lookup unless--foregroundis present. Missing names and stale indices then fail before dispatch asMENU_ITEM_NOT_FOUNDwitheffect: refused,retry_safe: true, andmutation_dispatched: falsein JSON.- Clicking resolves either
--indexor item text (case-insensitive). Name-based targets remain name-based at dispatch so a status-item reorder cannot redirect the click to a different index. --verifywaits briefly for a popover owned by the same PID, checks for a focused-window change for the owning app, then falls back to any visible owner window (layer 0). OCR verification is on by default (setPEEKABOO_MENUBAR_OCR_VERIFY=0to disable) and now requires the popover text to include the target title/owner; AX menu checks remain opt-in viaPEEKABOO_MENUBAR_AX_VERIFY=1(OCR requires Screen Recording permission).- Coordinate data (if available) is recorded in the click result so you can correlate where on screen the interaction happened.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 54 lines · 0 tokens per session scan A 1a872e69cfa2
menubar is a command published in the GitHub repository openclaw/Peekaboo (5,105 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 873 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
upload
Archive, upload, and submit to external TestFlight (full loop with monitor).
release
Create a new Remarc release using the automated GitHub Actions workflow.
archive
Create xcarchive for TestFlight.
build
Build debug and launch HomeClaw.
install
Build release, install to /Applications, and launch.
imark-review
Open a markdown document in Imark for review and wait for the reviewer's notes.