SawyerHood/dev-browser
Warm-daemon CLI and MCP for stateful Chrome automation by coding agents
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
dev-browser is a TypeScript browser automation tool with two entry points: the dev-browser CLI and the MCP server launched by dev-browser mcp. Both send work to the same warm daemon. The release binary bundles Bun and Puppeteer, while Chrome runs separately. browser.getPage(name) retrieves or creates a named tab and returns a Puppeteer Page with agent-oriented helpers.
Execution state and browser state have different lifetimes. Each command gets a fresh node:vm context with top-level await, but named tabs can outlive it. At completion or timeout, the daemon closes that command’s page, locator, browser-context, and registry operations rather than tearing down the tab. MCP exposes script execution, page and browser listing, stop, and help. Bundled Codex and Claude skills are a separate discovery path for agents that can invoke the CLI.
Key Capabilities & Differentiators
The core workflow is inspect, act, and verify without reopening the browser. page.snapshot({ interactive: true }) emits a compact accessibility tree with element refs; Puppeteer selector methods accept forms such as ref/e12. Scripts retain the full Puppeteer Page API and gain helpers for JPEG screenshots, load settling, and form filling. saveFile and readFile are restricted to ~/.dev-browser/v1/tmp.
The tool can launch Chrome with an isolated profile or attach to an existing Chrome session. In headless Linux benchmarks, medians over nine runs were about 13 ms for an empty script, 14 ms for getPage("x") plus page.title(), 18 ms for a snapshot of a search-results-like page, and 36 ms for a screenshot with a warm daemon. Cold daemon and Chrome launch took about 280 ms. These measurements characterize local operations, not end-to-end page navigation or agent task latency.
Trade-offs & Limitations
Compared with embedding Puppeteer or Playwright directly, dev-browser supplies the session reuse and text-based element targeting an agent would otherwise have to build. Direct integration is preferable when a test harness needs explicit ownership of browser contexts, test isolation, and teardown. The daemon serializes browser and page creation and uses a bring-to-front lock for input across tabs, but scripts targeting the same named tab can still interleave. Give concurrent jobs separate tabs or coordinate access in the caller.
A fresh node:vm context is not a security sandbox. Keep automatic CLI approval scoped to trusted scripts and prefer a dedicated profile over attaching to a browser with unrelated credentials. Attachment does not transfer ownership: idle cleanup never closes an attached browser. Launched browsers close after 30 idle minutes by default, but their on-disk profiles, cookies, and login state persist. Process cleanup is therefore not session-data cleanup.
Hardware & Deployment Guide
Install with npm install -g dev-browser; run dev-browser install if Chrome cannot be found. The release binary does not require Node after installation and supports macOS and glibc Linux, but not Windows or musl Linux. On Ubuntu, Snap Chromium cannot read the default ~/.dev-browser/v1 directory; install Chrome through dev-browser or point DEV_BROWSER_CHROME at another binary.
The CLI and MCP are self-hosted; claude mcp add dev-browser -- dev-browser mcp --headless registers the headless MCP entry point. The CLI may download its binary on first use if it was not installed earlier; private mirrors and manually provisioned binaries are supported. On Chrome 136 and later, use a dedicated profile for remote debugging because the default profile ignores the debugging flags. Release v1.0.0 followed rc.3 and rc.4 and replaced the 0.2 Playwright/QuickJS stack with Puppeteer/Bun. It uses a separate state directory, supports migration of durable doobie state, and requires changes to legacy snapshot and ref calls. The old page.cua and page.domCua helpers are not included.
e12, usable in selectors as ref/e12.await in a fresh node:vm context per command, with command-scoped browser operations closed at completion or timeout.--connect accepts auto-discovery, a port, HTTP, WebSocket, or a raw CDP Unix socket.Trusted coding agents that need to inspect, interact with, and verify a web app over multiple calls using persistent tabs and Puppeteer.
You need to execute mutually untrusted scripts, require native Windows or musl Linux support, or already have a harness that must own per-test browser isolation and teardown.
Quick Start & Installation
npm install -g dev-browser dev-browser install # only needed if dev-browser cannot find Chrome
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| dev-browser ★ | 6.8k | +3 | TypeScript | MIT | Warm-daemon CLI and MCP for stateful Chrome automation by coding agents |
| chrome-devtools-mcp | 60.4k | +801 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| agent-browser | 55.4k | +1.1k | Rust | Apache-2.0 | Rust CLI and stdio MCP for agents that read and act on live web pages |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/SawyerHood/dev-browser.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about dev-browser
Can CLI and MCP calls reuse the same browser tab?
browser.getPage(name) can retrieve a named tab across calls from either interface. Each command gets fresh script globals, so keep browser state in the tab rather than in JavaScript variables. Coordinate callers that write to the same tab.What runtime dependencies and hardware should I budget for?
Can we self-host this in a commercial environment?
When is direct Puppeteer or Playwright a better fit?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy