browser-debugger-cli
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 124 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in package.json
- fs module — File system access in package.json
Permissions Gecti
- Permissions — No dangerous permissions requested
This CLI tool provides AI agents and developers with direct access to Chrome DevTools Protocol (CDP) for browser telemetry, DOM querying, and network inspection directly from the terminal.
Security Assessment
The tool inherently makes local network requests to establish a connection with your web browser via CDP. It does not request dangerous system permissions or contain hardcoded secrets. However, the automated scan flags a critical warning: a recursive force deletion command (`rm -rf`) was detected in the `package.json` scripts. While potentially a standard cleanup script, this introduces a supply-chain risk if the package behaves unexpectedly. Additionally, file system access (`fs` module) is used, likely to manage local sessions or logs. Because of the browser access and the destructive script flag, overall risk is rated as Medium.
Quality Assessment
The project demonstrates strong health and maintenance indicators. It is highly active (last push was today), covered by automated CI and security workflows, and has gained solid community trust with 124 GitHub stars. It also uses the permissive MIT license. The README is thorough, transparently lists platform limitations, and clearly explains when to choose alternative tools instead.
Verdict
Use with caution—while the project is well-maintained and actively developed, developers should manually review the `package.json` cleanup scripts before installing to ensure the `rm -rf` command is safe for their local environment.
CLI tool for agents to quickly access browser telemetry (DOM, network, console) via Chrome DevTools Protocol.
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
- 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
- Composable - Unix philosophy: pipes, jq, shell scripts work naturally
When to use alternatives:
- Puppeteer/Playwright: Complex multi-step scripts, mature testing ecosystem
- Chrome DevTools MCP: Already invested in MCP infrastructure
Built for agents: Self-discovery (--list, --search), semantic exit codes, structured errors, case-insensitive commands, token-efficient output.
Benchmark: CLI vs MCP for AI Agents
We benchmarked bdg against Chrome DevTools MCP Server on real developer debugging tasks.
Key findings: CLI provided 33% better token efficiency through selective queries vs full accessibility tree dumps, plus capabilities MCP doesn't expose (memory profiling, HAR export, batch JS execution).
Install
npm install -g browser-debugger-cli@alpha
Platform Support:
- ✅ macOS and Linux
- ✅ Windows via WSL
- ❌ PowerShell/Git Bash (not yet)
Quick Start
bdg example.com # Start session
bdg https://localhost:5173 --chrome-flags="--ignore-certificate-errors" # Self-signed certs
bdg https://localhost:5173 --chrome-flags="--disable-web-security" # Disable CORS
bdg cdp --search cookie # Discover commands
bdg cdp Network.getCookies # Run any CDP method
bdg dom query "button" # High-level helpers
bdg stop # End session
Current State
Raw CDP access is complete. All 644 protocol methods (53 domains) work now. High-level wrappers (bdg dom, bdg network) are being added for common operations. See Commands for full reference.
Agent Discovery Pattern
# Agent explores what's possible (no docs needed)
bdg cdp --list # 53 domains
bdg cdp Network --list # 39 methods
bdg cdp Network.getCookies --describe # Full schema + examples
bdg cdp Network.getCookies # Execute
# Search across all domains
bdg cdp --search screenshot # Find relevant methods
bdg cdp --search cookie # 14 results
Documentation
📖 Wiki - Guides, command reference, recipes
Design Principles
This tool implements Agent-Friendly Tools:
- Self-documenting - Tools teach themselves via
--list,--describe - Semantic exit codes - Machine-parseable error handling
- Structured output - JSON by default, human-readable optional
- Progressive disclosure - Simple commands, deep capabilities
Contributing
Issues for bugs, Discussions for ideas. PRs welcome.
See docs/ for architecture and contributor guides.
License
MIT
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi