Browser Debugger CLI
Chrome DevTools Protocol in your terminal. Opens a persistent connection to Chrome where commands can be executed sequentially via Unix pipes. Designed for AI agents and developers who want direct browser control without framework overhead.Why bdg?
Raw CDP Access
All 644 protocol methods available directly. No abstractions, no limitations.
Token Efficient
No overhead from MCP tool definitions. Progressive discovery loads only what’s needed.
Self-Correcting
Errors clearly exposed with semantic exit codes and suggestions for recovery.
Composable
Unix philosophy: pipes, jq, and shell scripts work naturally.
When to use alternatives
Puppeteer/Playwright
Puppeteer/Playwright
Use for complex multi-step scripts and mature testing ecosystems with built-in assertions and retry logic.
Chrome DevTools MCP
Chrome DevTools MCP
Use if you’re already invested in MCP infrastructure and need tight integration with existing MCP servers.
Built for AI Agents
Browser Debugger CLI is optimized for programmatic use by AI agents:- Self-discovery —
--list,--search, and--describeflags expose capabilities without documentation - Semantic exit codes — 0-119 range with specific meanings for error handling
- Structured errors — JSON output with suggestions for recovery
- Case-insensitive commands — Handles typos and variations gracefully
- Token-efficient output — Minimal noise, maximum signal
Read more about agent-friendly design principles in the For AI Agents section.
Key Features
DOM Inspection
Query elements with CSS selectors and accessibility tree
Network Monitoring
Track requests, export HAR files, inspect headers
Console Debugging
Capture console messages with full argument inspection
Forms & Interaction
Fill forms, click buttons, submit data programmatically
Screenshots
Capture full-page or element screenshots
CDP Commands
Execute any of the 644 Chrome DevTools Protocol methods
Quick Example
Platform Support
- ✅ macOS and Linux
- ✅ Windows via WSL
- ❌ PowerShell/Git Bash (not yet)
Next Steps
Installation
Install bdg via npm and get started
Quickstart
Start your first session in 60 seconds
Command Reference
Explore all available commands
For AI Agents
Learn about agent-optimized features