click

A command for clicking a user-interface element on a Mac by its ID, matching text, or screen coordinates.

In plain words
What is it for?
Use it to click controls in desktop apps and browsers, including elements found in an accessibility inspection or at a known coordinate.
Why use it?
It lets automation target buttons and other controls without manually moving and clicking the mouse, while supporting both window-relative and screen-wide positions.

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/click
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 3,488 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.03488
Opus 5 $0.00000 $0.01744
Sonnet 5 $0.00000 $0.00698
Haiku 4.5 $0.00000 $0.00349

Measured yesterday against content hash dae2dba519d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

click 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 yesterday.

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/click.md · 128 lines

How it starts

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

peekaboo click

click is the primary interaction command. It accepts exactly one of an element ID, fuzzy text query, or literal coordinate target and then drives AutomationServiceBridge.click. Contradictory or whitespace-only target shapes fail before lookup, focus, or mutation. Background delivery is the default so target apps do not need to become frontmost; pass --foreground for focused foreground mouse behavior.

Key options

Flag Description
[query] Optional positional text query (case-insensitive substring match).
--on <id> Target an opaque Peekaboo element ID copied exactly from current see or MCP inspect_ui output.
--at x,y Click coordinates. With target flags, coordinates are relative to the resolved target window; without target flags, they are global screen coordinates.
--global Treat --at as global screen coordinates even when target flags are supplied.
--snapshot <id> Reuse a prior snapshot. A concrete ID must be ps1_ plus 32 lowercase ASCII hexadecimal digits; element/query clicks otherwise default to the latest snapshot. Background coordinate clicks require an explicit reference from a fresh exact-window see.
Target flags --app <name>, --pid <pid>, --window-id <id>, --window-title <title>, --window-index <n> — resolve the app/window that should receive the click. In background mode this does not focus the app; with --foreground it focuses before clicking. (--window-title/--window-index require --app or --pid; --window-id does not.)
--wait-for <duration> Timeout while waiting for the element (default 5s; bare values are milliseconds).
--double / --triple / --right / --middle Select one alternate click kind. Background middle/triple delivery requires a fresh exact-window snapshot and uses native window-routed events; --foreground remains available for shared-pointer behavior. Click-kind flags are mutually exclusive.
--long-press Send mouse-down, hold stationary for 1.2 seconds, then mouse-up. This shared-pointer gesture requires explicit --foreground and cannot be combined with another click-kind flag or --focus-background.
--modifiers <keys> Hold a comma-separated set of cmd, shift, and option for one exact foreground click. Requires explicit --foreground and a non-latest screenshot snapshot; fn, Control/right contextual clicks, long press, focus overrides, and competing app/window selectors are refused.
--foreground Focus target and send a foreground mouse click. Focus flags require this explicit mode.
Focus flags --no-auto-focus, --focus-timeout, --focus-retry-count, --space-switch, --bring-to-current-space (foreground mode only; see FocusCommandOptions).
--focus-background Legacy alias for the default background delivery. Use --app, --pid, --window-id, or a snapshot with process metadata.

Read the full file on GitHub · 128 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. yesterday First seen · 128 lines · 0 tokens per session scan A dae2dba519d0

Subscribe to this mod's changes

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