menu

A command set for inspecting and selecting items in classic macOS application menus through accessibility controls. It can work with an app in the background unless foreground access is explicitly needed.

In plain words
What is it for?
Use it to list an application's menu tree or click items such as File > Export > PDF in a specified app.
Why use it?
It avoids unreliable coordinate clicks and lets commands target menu items or nested paths by name.

Command

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/menu
Clone the repo
git clone --depth 1 https://github.com/openclaw/Peekaboo
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 704 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.00704
Opus 5 $0.00000 $0.00352
Sonnet 5 $0.00000 $0.00141
Haiku 4.5 $0.00000 $0.00070

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

Security

Grade A, and why

menu 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 2d 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/menu.md · 43 lines

How it starts

The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.

peekaboo menu

menu controls classic macOS application menus. Application menu listing and clicking use Accessibility in the background by default, so inspecting or choosing a menu does not activate the target app. Add --foreground only for an app whose menu is unavailable until its window is focused. Status items belong to peekaboo menubar.

Subcommands

Subcommand Purpose Key options
click Activate an application menu item via --item (single-level) or --path "File > Export > PDF". Background delivery requires --app or --pid; --foreground explicitly permits the frontmost app fallback and focus options. Paths are normalized automatically if you accidentally pass a '>' string to --item.
list Dump the menu tree for a specific app (optionally showing disabled items). Same target flags as click, plus --include-disabled; remains background unless --foreground is explicit.

Implementation notes

  • click/list accept the same target flags as other interaction commands (--app/--pid plus optional --window-id/--window-title/--window-index) without changing focus. A background click refuses before menu lookup unless --app or --pid is explicit. Foreground click/list targets must be an exact app name, exact bundle ID, or PID rather than a fuzzy partial name; background read-only list keeps fuzzy discovery compatibility.
  • --foreground plans one process generation and exact preferred window before focus, then retains that authority through click or menu listing. Apps with no eligible window use generation-pinned activation. If a later list fails or returns a replacement process, the result preserves the prior focus mutation and exact receipt instead of claiming a retry-safe read failure. Focus options without --foreground are rejected.
  • Any --item string that already contains '>' is automatically interpreted as a --path so agents don’t have to rewrite their inputs. The command even prints a note when this normalization occurs.
  • Errors bubble up as typed MenuErrors; JSON mode maps them to specific error codes (MENU_ITEM_NOT_FOUND, MENU_BAR_NOT_FOUND, etc.) so CI can distinguish between missing apps vs. absent menu items.

Read the full file on GitHub · 43 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. 2d ago First seen · 43 lines · 0 tokens per session scan A 2433e50d94d2

Subscribe to this mod's changes

menu is a command published in the GitHub repository openclaw/Peekaboo (5,098 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 704 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.