Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.53 KB

File metadata and controls

55 lines (40 loc) · 1.53 KB

chrome-ws

Chrome DevTools Protocol CLI - zero dependencies.

Installation

chmod +x chrome-ws

Quick Test

./chrome-ws start                        # Launch Chrome (auto-detects platform)
./chrome-ws new "https://example.com"   # Create tab
./chrome-ws navigate 0 "https://example.com"
./chrome-ws extract 0 "h1"              # Extract heading

Documentation

  • SKILL.md - Complete usage guide
  • EXAMPLES.md - Real-world examples

Testing

./test-raw.sh       # Raw JSON-RPC
./test-tabs.sh      # Tab management
./test-navigate.sh  # Navigation
./test-interact.sh  # Form interaction
./test-extract.sh   # Content extraction
./test-wait.sh      # Wait commands
./test-e2e.sh       # End-to-end workflow

Requirements

  • Node.js 16+
  • Chrome with --remote-debugging-port=9222

Environment Variables

Variable Purpose
CHROME_WS_BROWSER Path to browser executable (overrides auto-detection)
CHROME_WS_HOST Debug host address (default 127.0.0.1)
CHROME_WS_PORT Debug port (default 9222)
CHROME_WS_PROFILE Profile name. Default superpowers-chrome with auto-disambiguation when contended; set explicitly to share a Chrome across processes.
CHROME_EXTRA_ARGS Whitespace-separated extra flags appended to the Chrome command line.

Windows Notes

  • The CLI now binds to 127.0.0.1:9222 by default to avoid name-resolution issues on Windows.
  • Customize the connection via CHROME_WS_HOST / CHROME_WS_PORT if you forward DevTools elsewhere.