{"id":42026100,"url":"https://github.com/pleaseai/chrome-devtools-cli","last_synced_at":"2026-01-26T04:09:12.808Z","repository":{"id":322039643,"uuid":"1088003670","full_name":"pleaseai/chrome-devtools-cli","owner":"pleaseai","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-02T07:36:16.000Z","size":192,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-02T08:17:35.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pleaseai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"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-11-02T05:02:42.000Z","updated_at":"2025-11-02T07:36:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"396b0930-ac32-4698-9bac-9e76fec827a8","html_url":"https://github.com/pleaseai/chrome-devtools-cli","commit_stats":null,"previous_names":["pleaseai/chrome-devtools-cli"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pleaseai/chrome-devtools-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleaseai%2Fchrome-devtools-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleaseai%2Fchrome-devtools-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleaseai%2Fchrome-devtools-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleaseai%2Fchrome-devtools-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pleaseai","download_url":"https://codeload.github.com/pleaseai/chrome-devtools-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleaseai%2Fchrome-devtools-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-26T04:09:11.983Z","updated_at":"2026-01-26T04:09:12.799Z","avatar_url":"https://github.com/pleaseai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chrome DevTools CLI\n\n[![npm version](https://badge.fury.io/js/@pleaseai%2Fchrome-devtools-cli.svg)](https://badge.fury.io/js/@pleaseai%2Fchrome-devtools-cli)\n[![CI](https://github.com/pleaseai/chrome-devtools-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/pleaseai/chrome-devtools-cli/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/github/pleaseai/chrome-devtools-cli/graph/badge.svg?token=CODECOV_TOKEN)](https://codecov.io/github/pleaseai/chrome-devtools-cli)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)\n\n**chrome-devtools-cli** lets you control and inspect a live Chrome browser from the command line. It provides direct CLI access to the full power of Chrome DevTools for reliable automation, in-depth debugging, and performance analysis - perfect for developers, scripts, and CI/CD pipelines.\n\n\u003e Inspired by [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp), this CLI tool provides similar browser automation capabilities with **superior token efficiency** (~58.9% reduction via TOON format) - ideal for LLM-powered automation workflows.\n\n## Features\n\n- **🎯 Input Automation**: Click, hover, fill forms, drag-and-drop, keyboard input\n- **🧭 Navigation**: Multi-page management, URL navigation, wait conditions\n- **📱 Emulation**: Device emulation, viewport resizing\n- **⚡ Performance**: Trace recording, performance analysis\n- **🌐 Network**: Request monitoring, inspection\n- **🐛 Debugging**: Console monitoring, script evaluation, screenshots, snapshots\n- **🎨 Multiple Output Formats**: JSON, TOON, or human-readable text\n- **🔧 Flexible Browser Connection**: Launch new instances or connect to existing Chrome\n\n## Installation\n\n### Homebrew (Recommended for macOS/Linux)\n\n```bash\n# Add tap\nbrew tap pleaseai/tap\n\n# Install\nbrew install chrome-devtools-cli\n\n# Or one-liner\nbrew install pleaseai/tap/chrome-devtools-cli\n```\n\nUpdate:\n\n```bash\nbrew upgrade chrome-devtools-cli\n```\n\n### Binary Download\n\nDownload pre-built binaries from [GitHub Releases](https://github.com/pleaseai/chrome-devtools-cli/releases):\n\n#### Quick Install (Recommended)\n\nAuto-detects your platform and architecture:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/pleaseai/chrome-devtools-cli/main/install.sh | bash\n```\n\nOr download and run the script manually:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/pleaseai/chrome-devtools-cli/main/install.sh -o install.sh\nchmod +x install.sh\n./install.sh\n```\n\n#### Manual Installation\n\n```bash\n# macOS (Apple Silicon)\ncurl -L https://github.com/pleaseai/chrome-devtools-cli/releases/latest/download/chrome-devtools-darwin-arm64 -o chrome-devtools\nchmod +x chrome-devtools\nsudo mv chrome-devtools /usr/local/bin/\n\n# macOS (Intel)\ncurl -L https://github.com/pleaseai/chrome-devtools-cli/releases/latest/download/chrome-devtools-darwin-x64 -o chrome-devtools\nchmod +x chrome-devtools\nsudo mv chrome-devtools /usr/local/bin/\n\n# Linux (ARM64)\ncurl -L https://github.com/pleaseai/chrome-devtools-cli/releases/latest/download/chrome-devtools-linux-arm64 -o chrome-devtools\nchmod +x chrome-devtools\nsudo mv chrome-devtools /usr/local/bin/\n\n# Linux (x64)\ncurl -L https://github.com/pleaseai/chrome-devtools-cli/releases/latest/download/chrome-devtools-linux-x64 -o chrome-devtools\nchmod +x chrome-devtools\nsudo mv chrome-devtools /usr/local/bin/\n```\n\n### npm/Bun\n\n```bash\n# Global installation\nnpm install -g @pleaseai/chrome-devtools-cli\n# or\nbun add -g @pleaseai/chrome-devtools-cli\n```\n\n### Local Installation (as library)\n\n```bash\nnpm install @pleaseai/chrome-devtools-cli\n# or\nbun add @pleaseai/chrome-devtools-cli\n```\n\n### Claude Code Plugin\n\nInstall as a plugin for [Claude Code](https://claude.com) to get integrated skill documentation and automation support.\n\n#### Add Marketplace\n\n```bash\n/plugin marketplace add pleaseai/claude-code-plugins\n```\n\n#### Install Plugin\n\n```bash\n/plugin install chrome-devtools-cli@pleaseai\n```\n\nOnce installed, access comprehensive usage skills directly within Claude Code with automated guidance for browser automation, debugging, and performance testing workflows.\n\n## Quick Start\n\n### Launch Chrome and Navigate\n\n```bash\n# Open a new page\nchrome-devtools nav new-page --url https://example.com\n\n# Navigate current page\nchrome-devtools nav navigate --url https://google.com\n```\n\n### Take a Screenshot\n\n```bash\nchrome-devtools debug screenshot --path screenshot.png --full-page\n```\n\n### Analyze Performance\n\n```bash\nchrome-devtools perf analyze --url https://example.com --format json\n```\n\n### Monitor Network Requests\n\n```bash\n# Start monitoring\nchrome-devtools network start-monitoring\n\n# List requests\nchrome-devtools network list-requests --format toon\n```\n\n## Usage\n\n### Global Options\n\n```bash\nchrome-devtools [global-options] \u003ccommand\u003e [command-options]\n```\n\n**Global Options:**\n\n- `--browser-url \u003curl\u003e` - Connect to running Chrome via port forwarding\n- `--ws-endpoint \u003cendpoint\u003e` - WebSocket endpoint for Chrome\n- `--ws-headers \u003cheaders\u003e` - Custom WebSocket headers (JSON)\n- `--headless` - Run in headless mode\n- `--executable-path \u003cpath\u003e` - Path to Chrome executable\n- `--isolated` - Use temporary user data directory\n- `--channel \u003cchannel\u003e` - Chrome channel (stable|canary|beta|dev)\n- `--viewport \u003cviewport\u003e` - Initial viewport size (e.g., 1280x720)\n- `--proxy-server \u003cproxy\u003e` - Proxy server configuration\n- `--accept-insecure-certs` - Ignore certificate errors\n- `--format \u003cformat\u003e` - Output format (json|toon|text)\n\n## Commands\n\n### Input Automation\n\n#### Click on Element\n\n```bash\nchrome-devtools input click --uid \u003celement-uid\u003e\nchrome-devtools input click --uid \u003celement-uid\u003e --dbl-click\n```\n\n#### Hover over Element\n\n```bash\nchrome-devtools input hover --uid \u003celement-uid\u003e\n```\n\n#### Fill Input Field\n\n```bash\nchrome-devtools input fill --uid \u003celement-uid\u003e --value \"text\"\n```\n\n#### Press Keyboard Key\n\n```bash\nchrome-devtools input press-key --key Enter\nchrome-devtools input press-key --key \"Control+C\"\n```\n\n#### Drag and Drop\n\n```bash\nchrome-devtools input drag --from \u003csource-uid\u003e --to \u003ctarget-uid\u003e\n```\n\n#### Upload File\n\n```bash\nchrome-devtools input upload-file --uid \u003cinput-uid\u003e --file /path/to/file.pdf\n```\n\n#### Handle Dialog\n\n```bash\nchrome-devtools input handle-dialog --action accept\nchrome-devtools input handle-dialog --action dismiss\nchrome-devtools input handle-dialog --action accept --prompt-text \"my input\"\n```\n\n### Navigation\n\n#### List Pages\n\n```bash\nchrome-devtools nav list-pages\nchrome-devtools nav list-pages --format json\n```\n\n#### Select Page\n\n```bash\nchrome-devtools nav select-page --index 0\n```\n\n#### Close Page\n\n```bash\nchrome-devtools nav close-page --index 1\n```\n\n#### Create New Page\n\n```bash\nchrome-devtools nav new-page --url https://example.com\nchrome-devtools nav new-page --url https://example.com --timeout 30000\n```\n\n#### Navigate Page\n\n```bash\nchrome-devtools nav navigate --url https://example.com\n```\n\n#### Wait for Element or Text\n\n```bash\nchrome-devtools nav wait-for --selector \"#my-element\"\nchrome-devtools nav wait-for --text \"Welcome\"\nchrome-devtools nav wait-for --selector \".button\" --timeout 5000\n```\n\n### Emulation\n\n#### Emulate Device\n\n```bash\nchrome-devtools emulate device --name \"iPhone 13\"\nchrome-devtools emulate device --name \"iPad Pro\"\n```\n\n#### Resize Viewport\n\n```bash\nchrome-devtools emulate resize --width 1920 --height 1080\n```\n\n### Performance\n\n#### Start Performance Trace\n\n```bash\nchrome-devtools perf start-trace\n```\n\n#### Stop Performance Trace\n\n```bash\nchrome-devtools perf stop-trace --output trace.json\n```\n\n#### Analyze Performance\n\n```bash\nchrome-devtools perf analyze --url https://example.com\nchrome-devtools perf analyze --url https://example.com --duration 5000 --format json\n```\n\n### Network\n\n#### Start Monitoring\n\n```bash\nchrome-devtools network start-monitoring\n```\n\n#### List Network Requests\n\n```bash\nchrome-devtools network list-requests\nchrome-devtools network list-requests --limit 10 --offset 0 --format toon\n```\n\n#### Get Request Details\n\n```bash\nchrome-devtools network get-request --id req-123\n```\n\n#### Clear Request History\n\n```bash\nchrome-devtools network clear\n```\n\n### Debugging\n\n#### Start Console Monitoring\n\n```bash\nchrome-devtools debug start-console-monitoring\n```\n\n#### List Console Messages\n\n```bash\nchrome-devtools debug list-console\nchrome-devtools debug list-console --types error,warning --format json\n```\n\n#### Get Console Message\n\n```bash\nchrome-devtools debug get-console --id msg-123\n```\n\n#### Clear Console History\n\n```bash\nchrome-devtools debug clear-console\n```\n\n#### Evaluate JavaScript\n\n```bash\nchrome-devtools debug evaluate --script \"document.title\"\nchrome-devtools debug evaluate --script \"window.innerWidth\" --format json\n```\n\n#### Take Screenshot\n\n```bash\nchrome-devtools debug screenshot --path screenshot.png\nchrome-devtools debug screenshot --path screenshot.jpg --type jpeg --quality 80\nchrome-devtools debug screenshot --full-page --path full-page.png\n```\n\n#### Take Page Snapshot\n\n```bash\nchrome-devtools debug snapshot\nchrome-devtools debug snapshot --verbose\n```\n\n### Browser Management\n\n#### Close Browser\n\n```bash\nchrome-devtools close\n```\n\n## Output Formats\n\n### Text (Default)\n\nHuman-readable output format for console display.\n\n```bash\nchrome-devtools nav list-pages\n```\n\n### JSON\n\nStandard JSON format for programmatic consumption.\n\n```bash\nchrome-devtools nav list-pages --format json\n```\n\n### TOON\n\nToken-optimized format that reduces output size by ~58.9% compared to JSON, ideal for LLM processing.\n\n```bash\nchrome-devtools nav list-pages --format toon\n```\n\n## Advanced Usage\n\n### Connecting to Existing Chrome Instance\n\n#### Step 1: Start Chrome with Remote Debugging\n\n**macOS:**\n\n```bash\n/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome \\\n  --remote-debugging-port=9222 \\\n  --user-data-dir=/tmp/chrome-profile\n```\n\n**Linux:**\n\n```bash\n/usr/bin/google-chrome \\\n  --remote-debugging-port=9222 \\\n  --user-data-dir=/tmp/chrome-profile\n```\n\n**Windows:**\n\n```bash\n\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" ^\n  --remote-debugging-port=9222 ^\n  --user-data-dir=\"%TEMP%\\chrome-profile\"\n```\n\n#### Step 2: Connect via CLI\n\n```bash\nchrome-devtools --browser-url http://127.0.0.1:9222 nav list-pages\n```\n\n### Using WebSocket Endpoint\n\n```bash\n# Get WebSocket URL from http://127.0.0.1:9222/json/version\nchrome-devtools --ws-endpoint ws://127.0.0.1:9222/devtools/browser/\u003cid\u003e nav list-pages\n```\n\n### Headless Mode\n\n```bash\nchrome-devtools --headless nav new-page --url https://example.com\nchrome-devtools --headless debug screenshot --path screenshot.png\n```\n\n### Custom Chrome Channel\n\n```bash\nchrome-devtools --channel canary nav new-page --url https://example.com\nchrome-devtools --channel beta perf analyze --url https://example.com\n```\n\n### Isolated Mode (Temporary Profile)\n\n```bash\nchrome-devtools --isolated nav new-page --url https://example.com\n```\n\n## Examples\n\n### Complete Automation Workflow\n\n```bash\n# 1. Start console and network monitoring\nchrome-devtools debug start-console-monitoring\nchrome-devtools network start-monitoring\n\n# 2. Navigate to a page\nchrome-devtools nav new-page --url https://example.com\n\n# 3. Interact with the page\nchrome-devtools input fill --uid input-email --value \"user@example.com\"\nchrome-devtools input fill --uid input-password --value \"password123\"\nchrome-devtools input click --uid button-login\n\n# 4. Wait for navigation\nchrome-devtools nav wait-for --text \"Dashboard\"\n\n# 5. Take a screenshot\nchrome-devtools debug screenshot --path dashboard.png\n\n# 6. Get console errors\nchrome-devtools debug list-console --types error --format json\n\n# 7. Get network requests\nchrome-devtools network list-requests --format toon\n\n# 8. Clean up\nchrome-devtools close\n```\n\n### Performance Testing\n\n```bash\n# Analyze performance with trace\nchrome-devtools perf start-trace\nchrome-devtools nav new-page --url https://example.com\nchrome-devtools nav wait-for --timeout 5000\nchrome-devtools perf stop-trace --output trace.json\n\n# Or use the combined analyze command\nchrome-devtools perf analyze \\\n  --url https://example.com \\\n  --duration 10000 \\\n  --format json \u003e performance-report.json\n```\n\n### Mobile Emulation Testing\n\n```bash\n# Test on iPhone\nchrome-devtools emulate device --name \"iPhone 13\"\nchrome-devtools nav new-page --url https://example.com\nchrome-devtools debug screenshot --path mobile-view.png\n\n# Test on iPad\nchrome-devtools emulate device --name \"iPad Pro\"\nchrome-devtools nav navigate --url https://example.com\nchrome-devtools debug screenshot --path tablet-view.png\n\n# Custom viewport\nchrome-devtools emulate resize --width 375 --height 667\n```\n\n## Architecture\n\nThis CLI provides browser automation capabilities using:\n\n- **[Puppeteer](https://pptr.dev/)** - Browser automation\n- **[Commander.js](https://github.com/tj/commander.js)** - CLI framework\n- **[@pleaseai/cli-toolkit](https://github.com/passionfactory/cli-toolkit)** - Output formatting and utilities\n\n### Project Structure\n\n```\nchrome-devtools-cli/\n├── src/\n│   ├── browser/         # Browser management utilities\n│   ├── commands/        # Command implementations\n│   │   ├── input.ts     # Input automation\n│   │   ├── navigation.ts # Navigation commands\n│   │   ├── emulation.ts # Device emulation\n│   │   ├── performance.ts # Performance analysis\n│   │   ├── network.ts   # Network inspection\n│   │   └── debugging.ts # Debugging tools\n│   ├── cli.ts          # CLI entry point\n│   ├── types.ts        # TypeScript types\n│   └── index.ts        # Library exports\n├── references/\n│   └── chrome-devtools-mcp/ # Submodule reference\n└── package.json\n```\n\n## API Reference\n\nThe CLI can also be used programmatically:\n\n```typescript\nimport {\n  click,\n  closeBrowser,\n  getBrowser,\n  navigatePage,\n  performanceAnalyzeInsight,\n  takeScreenshot,\n} from '@pleaseai/chrome-devtools-cli'\n\n// Navigate to a page\nawait navigatePage({ url: 'https://example.com' })\n\n// Take a screenshot\nconst screenshot = await takeScreenshot({\n  path: 'screenshot.png',\n  fullPage: true,\n})\n\n// Analyze performance\nconst perfData = await performanceAnalyzeInsight({\n  url: 'https://example.com',\n})\n\n// Clean up\nawait closeBrowser()\n```\n\n## Comparison with Chrome DevTools MCP\n\n| Feature              | Chrome DevTools MCP             | Chrome DevTools CLI         |\n| -------------------- | ------------------------------- | --------------------------- |\n| Interface            | MCP Server                      | CLI Commands                |\n| Usage                | AI Assistants (Claude, Copilot) | Command Line / Scripts      |\n| Output Format        | MCP Protocol                    | JSON / TOON / Text          |\n| Token Efficiency     | Standard                        | **~58.9% reduction (TOON)** |\n| Browser Control      | ✅                              | ✅                          |\n| Performance Analysis | ✅                              | ✅                          |\n| Network Inspection   | ✅                              | ✅                          |\n| Debugging Tools      | ✅                              | ✅                          |\n| Automation Scripts   | ❌                              | ✅                          |\n| Programmatic API     | ❌                              | ✅                          |\n\n## Requirements\n\n- [Node.js](https://nodejs.org/) v20.19 or newer (LTS version)\n- [Chrome](https://www.google.com/chrome/) current stable version or newer\n- [npm](https://www.npmjs.com/) or [Bun](https://bun.sh/)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT © PleaseAI\n\n## Credits\n\nThis project is inspired by the excellent [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp) by Google LLC.\n\n## Related Projects\n\n- [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp) - MCP server for Chrome DevTools\n- [@pleaseai/cli-toolkit](https://github.com/passionfactory/cli-toolkit) - CLI utilities for LLM-focused tools\n- [Puppeteer](https://pptr.dev/) - Headless Chrome Node.js API\n\n## Support\n\n- [GitHub Issues](https://github.com/passionfactory/chrome-devtools-cli/issues)\n- [Documentation](https://github.com/passionfactory/chrome-devtools-cli#readme)\n\n---\n\n**Author**: Minsu Lee ([@amondnet](https://github.com/amondnet))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpleaseai%2Fchrome-devtools-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpleaseai%2Fchrome-devtools-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpleaseai%2Fchrome-devtools-cli/lists"}