{
  "markdown": "# Browser Debugger CLI\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/szymdzum/browser-debugger-cli/pulls)\n[![CI](https://github.com/szymdzum/browser-debugger-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/szymdzum/browser-debugger-cli/actions/workflows/ci.yml)\n[![Security](https://github.com/szymdzum/browser-debugger-cli/actions/workflows/security.yml/badge.svg)](https://github.com/szymdzum/browser-debugger-cli/actions/workflows/security.yml)\n[![npm downloads](https://img.shields.io/npm/dt/browser-debugger-cli?color=blue)](https://www.npmjs.com/package/browser-debugger-cli)\n\nChrome 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.\n\n## Why bdg?\n\n- **Raw CDP access** - All [644 protocol methods](https://chromedevtools.github.io/devtools-protocol/) available directly\n- **Token efficient** - No overhead from MCP tool definitions; progressive discovery loads only what's needed\n- **Self-correcting** - Errors clearly exposed with semantic exit codes and suggestions\n- **Composable** - Unix philosophy: pipes, jq, shell scripts work naturally\n\n**When to use alternatives:**\n- **Puppeteer/Playwright**: Complex multi-step scripts, mature testing ecosystem\n- **Chrome DevTools MCP**: Already invested in MCP infrastructure\n\n**Built for agents:** Self-discovery (`--list`, `--search`), semantic exit codes, structured errors, case-insensitive commands, token-efficient output.\n\n## Benchmark: CLI vs MCP for AI Agents\n\nWe benchmarked bdg against Chrome DevTools MCP Server on real developer debugging tasks.\n\n\n**[Full benchmark analysis →](docs/benchmarks/ARTICLE_MCP_VS_CLI_FOR_AGENTS.md)**\n\n**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).\n\n\n## Install\n\n```bash\nnpm install -g browser-debugger-cli@alpha\n```\n\n**Platform Support:**\n- ✅ macOS and Linux\n- ✅ Windows via WSL\n- ❌ PowerShell/Git Bash (not yet)\n\n## Quick Start\n\n```bash\nbdg example.com                    # Start session\nbdg https://localhost:5173 --chrome-flags=\"--ignore-certificate-errors\"  # Self-signed certs\nbdg https://localhost:5173 --chrome-flags=\"--disable-web-security\"       # Disable CORS\nbdg cdp --search cookie            # Discover commands\nbdg cdp Network.getCookies         # Run any CDP method\nbdg dom query \"button\"             # High-level helpers\nbdg stop                           # End session\n```\n\n## Current State\n\n**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](https://github.com/szymdzum/browser-debugger-cli/wiki/Commands) for full reference.\n\n## Agent Discovery Pattern\n\n```bash\n# Agent explores what's possible (no docs needed)\nbdg cdp --list                              # 53 domains\nbdg cdp Network --list                      # 39 methods\nbdg cdp Network.getCookies --describe       # Full schema + examples\nbdg cdp Network.getCookies                  # Execute\n\n# Search across all domains\nbdg cdp --search screenshot                 # Find relevant methods\nbdg cdp --search cookie                     # 14 results\n```\n\n## Documentation\n\n📖 **[Wiki](https://github.com/szymdzum/browser-debugger-cli/wiki)** - Guides, command reference, recipes\n\n- [Getting Started](https://github.com/szymdzum/browser-debugger-cli/wiki/Getting-Started)\n- [Commands](https://github.com/szymdzum/browser-debugger-cli/wiki/Commands)\n- [For AI Agents](https://github.com/szymdzum/browser-debugger-cli/wiki/For-AI-Agents)\n- [Recipes](https://github.com/szymdzum/browser-debugger-cli/wiki/Recipes)\n- [Quick Reference](https://github.com/szymdzum/browser-debugger-cli/wiki/Quick-Reference)\n- [Architecture](https://github.com/szymdzum/browser-debugger-cli/wiki/Architecture)\n- [Troubleshooting](https://github.com/szymdzum/browser-debugger-cli/wiki/Troubleshooting)\n\n## Design Principles\n\nThis tool implements [Agent-Friendly Tools](docs/principles/AGENT_FRIENDLY_TOOLS.md):\n\n- **Self-documenting** - Tools teach themselves via `--list`, `--describe`\n- **Semantic exit codes** - Machine-parseable error handling\n- **Structured output** - JSON by default, human-readable optional\n- **Progressive disclosure** - Simple commands, deep capabilities\n\n## Contributing\n\n[Issues](https://github.com/szymdzum/browser-debugger-cli/issues) for bugs, [Discussions](https://github.com/szymdzum/browser-debugger-cli/discussions) for ideas. PRs welcome.\n\nSee `docs/` for architecture and contributor guides.\n\n## License\n\nMIT\n",
  "bytes": 4828,
  "sha": "d26fa7a7f1c0a80c4d86be39d04898bb82ce55bc5c9195f90ab942b9762a154e",
  "repo_slug": "szymdzum/browser-debugger-cli",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_szymdzum_browser_debugger_cli_claude_ski_e0dece40/readme"
}