menubar

menubar is a command for coding agents from openclaw/Peekaboo. It costs 0 tokens per session (873 once invoked), scanned A, original, MIT.

A macOS command for viewing and selecting status icons in the menu bar, the row of small controls near the top-right of the screen.

In plain words
What is it for?
Use it to list menu-bar icons, inspect their identifiers, click a matching item, and verify that the expected popover opened.
Why use it?
It lets an automation workflow identify menu-bar items by name or position and requires explicit permission before clicking the visible desktop.

Command

About the project

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.

openclaw/Peekaboo · 5,105 stars · on GitHub

Install

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.

agentmods
npx agentmods add commands/openclaw/peekaboo/menubar
Clone the repo
git clone --depth 1 https://github.com/openclaw/Peekaboo

Wrote 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.

agentmods badge for menubar

README.md
[![agentmods](https://agentmods.dev/badge/commands/openclaw/peekaboo/menubar.svg)](https://agentmods.dev/commands/openclaw/peekaboo/menubar)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 873 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 5d ago against content hash 1a872e69cfa2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

docs/commands/menubar.md · 54 lines

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). list and click are 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.
  • click refuses before status-item lookup unless --foreground is present. Missing names and stale indices then fail before dispatch as MENU_ITEM_NOT_FOUND with effect: refused, retry_safe: true, and mutation_dispatched: false in JSON.
  • Clicking resolves either --index or 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.
  • --verify waits 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 (set PEEKABOO_MENUBAR_OCR_VERIFY=0 to disable) and now requires the popover text to include the target title/owner; AX menu checks remain opt-in via PEEKABOO_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.

Read the full file on GitHub · 54 lines

Changes

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.

  1. 5d ago First seen · 54 lines · 0 tokens per session scan A 1a872e69cfa2

Subscribe to this mod's changes

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.