Browser automation,
zero middleware.
browsy-bot talks directly to the Chrome DevTools Protocol — no Puppeteer, no Playwright, no ChromeDriver. One CDP core, three adapters: an OpenCode plugin, a universal MCP server, and a CLI. It even remembers selectors and flows across sessions.
npm i -g browsy-bot
The raw protocol, with nothing in the way.
Every call gets an explicit browserUrl and optional targetId — no hidden driver state, no extra binaries. These are the pillars.
Zero middleware
No ChromeDriver, Puppeteer, or Playwright. A direct CDP WebSocket — minimal latency, full protocol fidelity, deterministic lifecycle.
Zero hidden state
Addressed explicitly per call. Sessions cache when you want them, tear down when you don't — you always know what's connected.
Granular targeting
Operate on specific tabs and windows via targetId, or auto-discover the first page target. Full multi-tab control.
Protocol-complete
Domain wrappers for Page, Runtime, Performance, Accessibility, Target, Network, Emulation — the CDP surface you actually need, typed.
Multi-tool
One core, three adapters: OpenCode plugin, universal MCP server, CLI — 25+ `browsy_*` tools spanning dialogs, uploads, downloads, a11y, visual regression, stealth, record/replay, cross-tab, performance, mobile emulation, DOM diff, cookies, storage.
Learns across sessions
Optional memorius integration stores selectors, quirks, and navigation flows — and surfaces them before the next task.
Meet it through the tool you already use.
The same CDP client powers an OpenCode plugin, a universal MCP server, and a CLI. Pick your surface — the core is identical.
OpenCode plugin
Drop it into your OpenCode config and agents get a first-class browsy_* toolset, plus an optional bundled agent skill.
navigate·screenshot·evaluaterecall·wait·consolenetwork_log·list_tabs
Universal MCP server
Speak MCP over stdio. Works with Claude Code, Cursor, Gemini CLI, Cline, Continue, Zed, Hermes — and OpenCode's own MCP support.
- Dialogs · uploads · downloads · network idle
- Accessibility · visual regression · stealth · record/replay
- Cross-tab · retry · iframe · mobile emulation
- DOM diff · cookies · storage · performance
- One config line in any MCP client
- Node or Bun, out of the box
CLI
Any agent with a terminal can shell out. Stable exit codes and a --json machine-readable contract for scripted use.
navigate·screenshot·evalextract·doctor·ensure-browsertabs·console·networkdialog·upload·downloada11y·visual-baseline·visual-compareintercept·stealth·record·replaytrack-tabs·switch-tab·retryenter-frame·exit-frame·performanceemulate-device·set-geolocation·set-device-orientationcapture-dom·diff-dom·get-cookiesset-cookies·delete-cookies·get-storage
Primitives that remove the tedious parts.
Beyond raw CDP, browsy-bot ships a small toolkit covering the jobs people actually automate. Follow the steps — each one is a real command.
- 01 Diagnose with doctor
- 02 Pull data with extract
- 03 Own the browser lifecycle
- 04 Send real input events
- 05 Capture screenshots
- 06 Handle dialogs & uploads
- 07 Compare DOM baselines
- 08 Manage cookies & storage
Probes the CDP endpoint, target count, browser-binary discovery, and memorius availability, then returns an actionable report. The first thing to run when nothing works.
browsy doctor --json
# not ready: CDP endpoint unreachable. Launch Chrome with:
# chrom… --headless --no-sandbox, or run "browsy ensure-browser".
Pulls typed records from matching elements in a single in-page script — no bespoke evaluate boilerplate. Field specs: text, html, value, or attr:<name>.
browsy extract "article.card" text "attr:src" value
# → [ { "text": "...", "src": "..." }, ... ]
ensure-browser probes the endpoint and, if it's down, spawns a Chrome/Chromium on a dedicated profile dir (never your logged-in one), writes a pidfile, and waits for CDP to answer. stop-browser SIGTERMs the recorded pid.
browsy ensure-browser --port 9222 --no-headless
browsy stop-browser
click and fill gain an opt-in --trusted flag that dispatches renderer-trusted CDP input events (Input.dispatchMouseEvent / Input.insertText) instead of JS-dispatched ones — so the page sees a real user event.
browsy click ".save" --trusted
browsy fill "#email" "a@b.c" --trusted
Capture the page DOM as a snapshot, save it as a baseline, then diff later captures against it — catching added, removed, or changed elements without pixel-level noise.
browsy capture-dom "homepage"
browsy diff-dom "homepage"
Get, set, and delete cookies over CDP — so you can log in once and carry auth state across captures for dashboard and checkout flows.
browsy get-cookies
browsy set-cookies '[{"name":"session","value":"abc123","domain":"example.com"}]'
browsy delete-cookies "session" "example.com"
Read localStorage and sessionStorage for the page's current origin — inspect persisted state without JS evaluation hacks.
browsy get-storage --origin https://example.com
Screenshots auto-save to dev-notes/browsy-captures/, preflight health-checks catch issues before capture, and every feature is typed and unit-tested.
browsy ensure-browser
browsy screenshot --full
browsy doctor --json
From zero to a driven tab in three lines.
As a standalone library there is no build step on the consumer side — import, connect, act.
import { getSession, navigatePage, click, extract } from "browsy-bot";
const s = await getSession("ws://localhost:9222");
await navigatePage(s, "https://example.com");
await click(s, ".save", { trusted: true });
const rows = await extract(s, "article.card", ["text", "value"]);
- 01Point it at a browser. Start Chrome with remote debugging, or let
browsy ensure-browserstart a dedicated one for you. - 02Get a session.
getSession(browserUrl, { targetId? })returns a cached CDP socket keyed by endpoint + tab. - 03Act. Navigate, click, fill, extract, capture console and network — all over the same session.
CDP is a powerful channel. Know the blast radius.
A live endpoint is equivalent to a shell on the machine that runs Chrome. Here's the posture.
- Loopback only. The default is
ws://localhost:9222. Don't bind the CDP port to0.0.0.0unless it's behind a firewall and you own the blast radius. - Profile-scoped launch.
ensure-browseronly ever starts a browser on a dedicateduser-data-dir— never your logged-in profile. If you want a logged-in browser, launch it yourself and point-uat it. --trustedis still JS-gated. The trusted path measures an element's rect in-page then dispatches input events at that coordinate. A page can move the target between measure and dispatch; "trusted" means the listener sees a user-originated event, not a syntheticel.click().- Memorius learns persist. Learnings live on disk; if the vault is shared, learned selectors and flows become information to other agents on the host. Use a per-user or per-project vault.
Drive a real browser today.
MIT-licensed, dependency-light, and built so any agent can pick it up. Install it, point it at a browser, start automating.