-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
Kumak edited this page Nov 22, 2025
·
2 revisions
- Node.js: 20.0.0 or higher
- Chrome/Chromium: Latest stable version recommended
npm install -g browser-debugger-cli@alpha| Platform | Status | Notes |
|---|---|---|
| macOS | Native | Full support |
| Linux | Native | Full support |
| Windows WSL | Supported | Run inside WSL |
| PowerShell | Not yet | Use WSL instead |
| Git Bash | Not yet | Use WSL instead |
The CLI uses Unix domain sockets for inter-process communication. Windows users should run bdg inside WSL for full compatibility.
bdg example.comThis:
- Launches Chrome with DevTools Protocol enabled
- Starts a background daemon for persistent connections
- Opens the target URL
# List all 53 CDP domains
bdg cdp --list
# List methods in a domain
bdg cdp Network --list
# Search for methods by keyword
bdg cdp --search cookie
# Get full details about a method
bdg cdp Network.getCookies --describe# Get cookies
bdg cdp Network.getCookies
# Execute JavaScript
bdg cdp Runtime.evaluate --params '{"expression":"document.title","returnByValue":true}'
# Take screenshot
bdg cdp Page.captureScreenshot | jq -r '.data' | base64 -d > screenshot.png# Query DOM
bdg dom query "button" # Find all buttons
bdg dom get "button" # Get semantic info
bdg dom get "button" --raw # Get raw HTML
# Monitor activity
bdg peek # Quick snapshot
bdg peek --network # Network only
bdg tail # Live updatesbdg stopbdg status # Basic info
bdg status --verbose # Include Chrome diagnosticsbdg cleanup # Remove stale files
bdg cleanup --force # Force cleanup
bdg cleanup --aggressive # Kill all Chrome processesBy default, bdg waits for pages to fully load using three signals:
- Browser's
window.onloadfires - Network goes quiet (200ms without new requests)
- DOM stops changing (300ms without mutations)
Skip waiting with --no-wait for immediate connection. Use this when:
- Connecting to an already-loaded page
- Testing static HTML files
- You need immediate control without waiting for page load
bdg stores data in ~/.bdg/:
| File | Purpose |
|---|---|
daemon.pid |
Daemon process ID |
daemon.sock |
Unix socket for IPC |
session.meta.json |
Session metadata |
session.json |
Final output (written on stop) |
chrome-profile/ |
Chrome user data |
{
"url": "https://example.com",
"startTime": "2025-01-01T00:00:00.000Z",
"endTime": "2025-01-01T00:05:30.000Z",
"network": {
"requests": [...],
"summary": { "total": 42, "failed": 0 }
},
"console": { "messages": [...] },
"performance": { "metrics": {...} }
}- Commands - Full command reference
- For AI Agents - Agent integration patterns
- Recipes - Common workflows