# Repository Briefing: szymdzum/browser-debugger-cli
> Source: https://repoforai.com/repo/szymdzum/browser-debugger-cli (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/szymdzum/browser-debugger-cli
- **Official Docs / Website**: https://www.npmjs.com/package/browser-debugger-cli
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A (85/100 · Maintenance 35/35 · Adoption 10/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.23.0 (2026-11-04) — https://github.com/szymdzum/browser-debugger-cli/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, CLI
- **Momentum**: 187 ★ total (+0 24h / +0 7d) · 12 forks
- **Topics**: `cdp`, `chrome-devtools-protocol`, `cli`, `ai-agents`, `ai-tools`, `browser-automation`, `devtools`, `headless-chrome`, `web-scraping`, `agent-skills`, `agentic-coding`, `chrome`
- **When to Use**: Best for: Developers and terminal-capable coding agents iterating on live Chromium pages, correlating UI behavior with DOM, console, and network evidence. Skip if: You need native MCP integration, Firefox or Safari coverage, or a maintained suite of repeatable browser tests.

## Overview
```text
### Architecture & 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`.
```

## Key Capabilities
```text
- Session model: Separate `bdg` processes operate on a persistent browser session; named sessions support parallel work.
- Agent integration: `--help --json` exposes commands, flags, and exit codes; JSON errors can include correction suggestions.
- DOM diagnosis: Layout inspection checks visibility and overlap, while `dom inspect --why` identifies the CSS rule behind a property.
- Browser telemetry: Filter failed requests, inspect console messages, follow live activity, and export HAR from the same session.
- Protocol access: Raw CDP methods are searchable and self-describing, extending coverage to profiling, tracing, and throttling.
- Outcome verification: v0.23.0 checks whether a fill persisted after two seconds and returns exit code 90 if the page discarded it.
```

## Quick Start / Clone
```bash
npm install -g browser-debugger-cli
bdg localhost:3000
```
