dev-browser
A browser automation tool by sawyerhood that lets Claude Code control browsers via sandboxed JavaScript scripts. Scripts run in a QuickJS WASM sandbox — no host filesystem or network access — against persistent named pages that survive across script calls. Supports auto-connect to a running Chrome instance or launches headless Chromium. Primary interface is CLI via stdin/stdout.
View on GitHubWhat it does
- npm install -g dev-browser && dev-browser install
Install dev-browser globally and install Playwright + Chromium for the sandboxed browser runtime.
- dev-browser --headless
Run a browser script via stdin in headless mode — no visible window, suitable for CI.
- dev-browser --connect
Attach to an existing Chrome instance with remote debugging enabled (chrome://inspect/#remote-debugging) and run a script against it.
- browser.getPage(nameOrId)
Script API call to get or create a persistent named page — named pages survive across script calls, preserving navigation state and cookies.
- page.snapshotForAI()
Script API call that returns { full, incremental? } — an AI-friendly structured page snapshot for reasoning about page content.