dev-browser

A CLI, skill and MCP server for driving Chrome with short Puppeteer scripts, with tabs that keep state between calls

CLIHigh risk

sawyerhood/dev-browser

Install

npm install -g dev-browser
dev-browser install

The second command is only needed if dev-browser cannot find Chrome.

This is third-party code. Review the repository files before installing.

What it does

dev-browser runs a background daemon with Chrome, and the agent drives it with small JavaScript scripts using the Puppeteer API. Named tabs survive between calls, so the agent can open a page once, inspect it, act and verify without starting over. Accessibility snapshots produce compact text with element refs like e12 that are easy to click. It can launch an isolated profile or attach to a browser you already have open. The same daemon is exposed as an MCP server, and a bundled SKILL.md covers Claude Code, Codex and other agents.

Who it is for. For developers who need the agent to test web apps, fill forms and take screenshots in a real browser.

Good fit when

  • You want the agent to verify its frontend change in a browser
  • You need multi-step site automation that keeps state between steps
  • You need data from script-rendered pages

Not a fit when

  • You are on Windows or musl Linux, which are not yet supported
  • You need to isolate untrusted scripts; node:vm is not a sandbox

Example request

Open localhost:3000, fill the sign-up form with test data and take a screenshot of the result

Limitations

Supports macOS and glibc Linux. Snap Chromium cannot read the default directory, so use dev-browser install or DEV_BROWSER_CHROME. Scripts run in node:vm, which is not a security boundary. Version 1.0 breaks scripts written for 0.2.

How to disable. Stop the daemon with dev-browser stop, uninstall with npm uninstall -g dev-browser, delete the dev-browser skill folder, and remove the MCP server with claude mcp remove dev-browser if added.

Security check

  • Runs arbitrary JavaScript in the browser
  • Can attach to the user's browser with logged-in sessions

README in short

The README covers npm install, a quick start in headless and attached modes, and skill install for Codex, Claude and the shared agents directory. It explains idle timeout, the script API with snapshots and element refs, attaching to an existing browser and an MCP server with five tools. It includes 1.0 migration notes and benchmarks. MIT licensed.

SKILL.md

---
name: dev-browser
description: Browser automation with persistent named pages via the dev-browser CLI. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, log into sites, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", "open the browser", or any browser interaction request.
---

# dev-browser

CLI for controlling a real Chrome with short Puppeteer scripts. One warm daemon; named pages persist between runs.

```bash
npm install -g dev-browser   # bun add -g dev-browser works too; the first run downloads the binary if the install script was blocked
dev-browser install          # only if the first run says "No Chrome found"
```

Run `dev-browser --help` (full guide; `dev-browser help <topic>` for one section) before non-trivial work. Quick start:

```bash
dev-browser <<'EOF'
const page = await browser.getPage("main");        // named page persists across runs
await page.goto("https://example.com");            // default waitUntil: domcontentloaded
await page.snapshot({ interactive: true })         // ARIA tree with refs; last expression is printed
EOF
dev-browser -e 'const p = await browser.getPage("main"); await p.click("ref/e6"); await p.waitForLoad(); p.url()'
```

FAQ

Will my own browser close after idling?

No. Browsers launched by dev-browser close after 30 idle minutes, while attached user browsers are never closed by the timeout.

How do I skip permission prompts in Claude Code?

Add Bash(dev-browser *) to the allow list in .claude/settings.json, only where you trust the scripts.

Editors’ pick

CLI, skill and Python library for browser control: the agent clicks, fills forms and reads pages over CDP

CLIHigh risk114.6K
Editors’ pick

A skill that gathers the last 30 days of discussion on a topic from Reddit, X, YouTube, HN, Polymarket and GitHub into one brief

SkillHigh risk62K
Editors’ pick

The Chrome DevTools team's official MCP server: the agent drives a live Chrome, reads network and console, and records performance traces

MCP serverMedium risk51.9K
Editors’ pick

A fast Rust CLI for agent browser automation: accessibility snapshots with element refs, an MCP server and skills

CLIHigh risk42.6K