{"id":32517801,"url":"https://github.com/szymdzum/browser-debugger-cli","last_synced_at":"2026-04-17T18:02:52.294Z","repository":{"id":322406652,"uuid":"1087074313","full_name":"szymdzum/browser-debugger-cli","owner":"szymdzum","description":"CLI tool for agents to quickly access browser telemetry (DOM, network, console) via Chrome DevTools Protocol.","archived":false,"fork":false,"pushed_at":"2026-04-15T18:55:01.000Z","size":18354,"stargazers_count":124,"open_issues_count":13,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-15T19:06:55.768Z","etag":null,"topics":["ai-agents","ai-tools","automation","browser-automation","cdp","chrome-devtools-protocol","claude","cli","devtools","headless-chrome","mcp","web-scraping"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/browser-debugger-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szymdzum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap/AGENT_FORM_AUTOMATION.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-31T10:39:14.000Z","updated_at":"2026-04-15T18:48:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/szymdzum/browser-debugger-cli","commit_stats":null,"previous_names":["szymdzum/browser-debugger-cli"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/szymdzum/browser-debugger-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymdzum%2Fbrowser-debugger-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymdzum%2Fbrowser-debugger-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymdzum%2Fbrowser-debugger-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymdzum%2Fbrowser-debugger-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szymdzum","download_url":"https://codeload.github.com/szymdzum/browser-debugger-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymdzum%2Fbrowser-debugger-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31939788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","ai-tools","automation","browser-automation","cdp","chrome-devtools-protocol","claude","cli","devtools","headless-chrome","mcp","web-scraping"],"created_at":"2025-10-28T03:00:51.708Z","updated_at":"2026-04-17T18:02:52.289Z","avatar_url":"https://github.com/szymdzum.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszymdzum%2Fbrowser-debugger-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszymdzum%2Fbrowser-debugger-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszymdzum%2Fbrowser-debugger-cli/lists"}