browser

A command-line tool for controlling Chrome pages through Peekaboo. It can connect to a browser, open pages, inspect page content, interact with elements, and collect browser diagnostics.

In plain words
What is it for?
Use it to navigate websites, capture page snapshots and screenshots, inspect console or network activity, run page actions, and record performance traces.
Why use it?
It provides repeatable terminal control for browser tasks and keeps actions tied to a specific page. This helps avoid directing later actions at the wrong page when several pages are open.

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/browser
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 1,440 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.01440
Opus 5 $0.00000 $0.00720
Sonnet 5 $0.00000 $0.00288
Haiku 4.5 $0.00000 $0.00144

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

Security

Grade A, and why

browser 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/browser.md · 84 lines

How it starts

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

peekaboo browser

browser is the CLI wrapper around Peekaboo's browser MCP tool. It handles page-level Chrome operations such as connection status, navigation, snapshots, element actions, console/network inspection, screenshots, and performance traces. Use native Peekaboo commands for browser chrome, macOS dialogs, menus, and windows.

The action is positional and defaults to status.

peekaboo browser status --json
peekaboo browser connect --channel stable --foreground
peekaboo browser connect --browser-url http://127.0.0.1:9222 --foreground
peekaboo browser new-page --url https://example.com --foreground
peekaboo browser snapshot --page-id 2 --path /tmp/page.txt --foreground

Use peekaboo browser --help for the complete action-specific option set. Page-scoped automation should retain the returned page ID and pass --page-id on later calls so concurrent browser work cannot redirect it.

The CLI is background-only by default. Chrome DevTools MCP 1.6.0's bundled Puppeteer grants browser user activation to every page evaluation, including evaluation used internally for page titles, stable-DOM waits, snapshots, and element geometry. Default mode therefore exposes only source-audited routes that cannot enter that evaluation path. Page discovery, snapshots, navigation, waits, element interaction, and arbitrary script evaluation refuse before provider I/O unless the caller passes --foreground; accepted calls report browser_protocol / foreground delivery even if the page remains visually behind another app. Exact positive-ID network lookup, page screenshot without an element, console listing, emulation, Lighthouse, performance trace operations, and heap capture retain background routes. Those source-audited calls report browser_protocol / background delivery. All default calls require an existing exact browser connection receipt and never ambiently auto-connect. With explicit --foreground, only standalone CLI page actions may auto-connect when no receipt exists. Persistent MCP, Agent, and Bridge-scoped page actions never ambiently auto-connect. Use explicit connect for a foreground-authorized child, or transfer an exact signed handoff into a background Bridge-scoped MCP child. connect can surface Chrome's remote-debugging permission UI, so it is classified as a foreground mutation and requires explicit --foreground. The same flag is required for --bring-to-front or a foreground new page. If no exact live connection exists, default-mode actions fail before dispatch and ask you to connect explicitly. In --json output, canonical action outcome, effect, retry safety, mutation-dispatch state, and exact desktop target metadata are projected into the standard root CLI envelope. The original MCP metadata remains under data.meta for tool-specific consumers.

Browser state is owned by one current-build reusable daemon across CLI invocations. Channel connection requires exactly one running official Google-signed Chrome process (Team ID EQHXZ8M8AV). Peekaboo pins the signed channel identifier, Team ID, and CDHash to its PID generation, safely reads that channel's standard DevToolsActivePort, proves its unique loopback listener belongs to the detected PID/process generation, keeps the exact WebSocket pending through Chrome's approval prompt, verifies it with CDP Browser.getVersion, rechecks signer and listener ownership, and gives Chrome DevTools MCP only that same WebSocket identity. When more than one process shares a channel, use --browser-url with one loopback DevTools HTTP endpoint. That explicit URL is also the compatibility path for custom or non-Google-signed debuggable browsers and does not claim native channel signer authority. Connection output includes the combined process and DevTools identity receipt. If the daemon, Chrome generation, signer, listening socket, or endpoint changes, later calls fail and require an explicit reconnect.

Browser type and press-key require --uid from a fresh snapshot. Peekaboo focuses that exact page element and sends the keyboard operation as one daemon-owned sequence rather than inheriting whichever control another caller focused. Persistent MCP and Agent callers, including Bridge-routed Agents, receive opaque, session-owned page and element references instead of these raw CLI compatibility values. Those references bind the exact provider child and cannot cross caller sessions. A newer snapshot or navigation expires the affected page's element references. Closing a page expires that page's namespace; disconnect, connection replacement, or session end expires the complete caller namespace. A current Bridge host also supports caller-scoped opaque-reference MCP sessions through an explicit authenticated handoff. First run peekaboo browser connect --foreground --bridge-socket <socket> --handoff-file <absolute-private-path> to connect the exact browser and atomically write its signed one-shot receipt. Then start peekaboo mcp serve --bridge-socket <same-socket> --browser-handoff <same-path>. The Bridge validates the caller, listener generation, exact target receipt, claim, and provider epoch before creating a separate scoped child; status, execution, disconnect, and end stay bound to that namespace, and no request can fall back to the Bridge's root browser connection. Older or incompatible hosts refuse the handoff before MCP serving begins.

Read the full file on GitHub · 84 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 · 84 lines · 0 tokens per session scan A 8d2b4bc31949

Subscribe to this mod's changes

browser 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 1,440 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.