szymdzum/browser-debugger-cli
A persistent Chrome debugging session for shell agents, powered by CDP
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
browser-debugger-cli is a TypeScript package whose npm entry point is bdg. It is a shell CLI, not an MCP server. It starts or attaches to a Chromium browser session that stays available between command invocations. An agent can click in one process, inspect the network and console in the next, and continue without resetting the page. Named sessions let separate debugging tasks run side by side.
The runtime has four direct dependencies: commander for the command interface, chrome-launcher for browser startup, ws for WebSocket communication, and devtools-protocol for CDP definitions. High-level commands cover common inspection and interaction tasks; searchable, describable raw CDP methods extend coverage without adding a dedicated CLI command for each operation.
Key Capabilities & Differentiators
bdg combines interaction with diagnosis. It can click, fill, and wait in pages with shadow DOM and iframes, then report visibility, overlap, the CSS rule behind a property, event listeners, or the accessibility tree. Viewport and mobile emulation support responsive checks. Contrast and accessibility audits surface issues for investigation; screenshots are available but are not required for the core workflow.
The same session exposes console messages, network requests and headers, cookies, live activity, and HAR export, so a UI symptom can be correlated with a failing request without replaying the interaction. Raw CDP extends the tool to performance metrics, CPU and heap profiling, tracing, and throttling. Structured output and action-specific exit codes let scripts distinguish successful operations from failures instead of relying on prose alone.
Trade-offs & Limitations
bdg fits investigations where the next action depends on what a live page just did. Playwright or Puppeteer is a better base for maintained, repeatable test suites. Chrome DevTools MCP is the better fit when the agent expects native MCP tools or needs higher-level Lighthouse, trace interpretation, or heap snapshot analysis. The five-task CLI-versus-MCP benchmark used bdg 0.6.x in November 2025 and is not sufficient evidence of a current performance advantage.
The protocol choice limits support to Chromium-based browsers; Firefox and Safari are out of scope. Attaching to an existing profile preserves login state, but also gives the tool access to sensitive browser data, including HttpOnly cookie values and authorization headers. Use a dedicated profile and restrict access to debugging endpoints and captured artifacts. The project is MIT-licensed; access to target sites and handling of captured data are separate concerns.
Hardware & Deployment Guide
Install with npm install -g browser-debugger-cli on Node.js 22.12+ with Chrome, Chromium, or Microsoft Edge. macOS, Linux, and Windows via WSL are supported; native PowerShell and Git Bash are not. Edge can be selected with CHROME_PATH; an existing debugging endpoint can be reached with --chrome-ws-url. The CLI and browser can run locally without a hosted backend or model runtime, although visited sites still need to be reachable.
The Docker Compose example runs a timed headless capture against httpbin using the local bdg-test:local image, then lists /home/node/.bdg/. Container launches use --no-sandbox; keep that workload isolated and avoid using personal browser profiles. Releases v0.21.0 through v0.23.0 tightened reporting for failed navigation and rejected input. In v0.23.0, fills are checked immediately and after two seconds; page formatting is accepted, while discarded values produce exit code 90. That release also added eval --raw.
bdg processes operate on a persistent browser session; named sessions support parallel work.--help --json exposes commands, flags, and exit codes; JSON errors can include correction suggestions.dom inspect --why identifies the CSS rule behind a property.Developers and terminal-capable coding agents iterating on live Chromium pages, correlating UI behavior with DOM, console, and network evidence.
You need native MCP integration, Firefox or Safari coverage, or a maintained suite of repeatable browser tests.
Quick Start & Installation
npm install -g browser-debugger-cli bdg localhost:3000
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| browser-debugger-cli ★ | 187 | — | TypeScript | MIT | A persistent Chrome debugging session for shell agents, powered by CDP |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| agent-browser | 55.4k | +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/szymdzum/browser-debugger-cli.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about browser-debugger-cli
Does bdg require an MCP client or server?
bdg is a shell CLI, not an MCP server. A terminal-capable agent starts or attaches to a persistent Chromium session, invokes individual commands, and can branch on JSON output and exit codes. The optional agent skill documents that workflow without adding an MCP transport.What hardware should I provision for local or container runs?
Can a company self-host bdg or redistribute it?
When should we choose Playwright, Puppeteer, or Chrome DevTools MCP instead?
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