What Chrome Relay Does
Chrome Relay is a local CLI bridge that enables automation and scripting of your already-open Chrome browser session, preserving all your authentication state, cookies, extensions, and localhost access. Unlike headless browser automation tools like Playwright that spawn isolated browser instances, Chrome Relay connects directly to your running Chrome—meaning you get to leverage your existing login sessions, installed extensions, and development server access without re-authentication or setup overhead.
This skill is particularly valuable for developers and power users who need to automate browser tasks while maintaining full access to their personal Chrome environment. Whether you’re testing against localhost services, need to preserve complex SSO flows, or want to automate tasks that require specific extensions, Chrome Relay bridges the gap between traditional browser automation and your real-world development setup.
How to Install
-
Install Chrome Relay CLI: Visit https://chrome-relay.kushalsm.com/ and follow the platform-specific installation instructions for your OS (macOS, Linux, or Windows).
-
Verify Chrome is installed: Ensure Google Chrome is installed and can be launched from your system. Chrome Relay requires your existing Chrome installation.
-
Start Chrome with remote debugging enabled: Launch Chrome with the
--remote-debugging-portflag:# macOS /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 # Linux google-chrome --remote-debugging-port=9222 # Windows "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 -
Initialize Chrome Relay connection: In a separate terminal, connect the CLI bridge:
chrome-relay connect --port 9222 -
Verify the connection: The CLI will confirm connection to your Chrome instance. You’re now ready to send commands to your browser.
-
Start scripting: Use the Chrome Relay CLI to automate browser actions while your actual Chrome session remains visible and interactive.
Use Cases
- Localhost development testing: Automate testing against local development servers (http://localhost:3000, etc.) with full access to your dev environment without browser restart or cookie loss
- SSO workflow automation: Automate workflows that require complex single sign-on authentication; Chrome Relay preserves existing SSO sessions so scripts don’t need to re-authenticate
- Extension-dependent automation: Run automation scripts that require specific Chrome extensions (ad blockers, productivity tools, dev tools) that wouldn’t be available in headless browser instances
- CI/CD pipeline integration with real Chrome: Bridge the gap between development and testing by running automation against your actual Chrome profile, browser history, and saved passwords
- Interactive debugging and testing: Combine manual browser interaction with automated tasks—pause automation to manually test something, then resume automation in the same session
How It Works
Chrome Relay leverages Chrome’s DevTools Protocol (CDP), a low-level interface that enables external tools to control and inspect browser behavior. When you launch Chrome with the --remote-debugging-port flag, Chrome exposes a WebSocket endpoint that remote clients can connect to. Chrome Relay acts as a local CLI bridge that translates your commands into CDP messages and sends them to this endpoint.
Unlike traditional browser automation frameworks that spawn new browser processes (like Playwright or Selenium), Chrome Relay connects to your existing Chrome instance—the one you’ve been using, with all your cookies, cache, extensions, and localhost access intact. This architectural difference means your automation scripts inherit your authentication state, browser preferences, and development environment setup automatically. The CLI bridge translates high-level commands into low-level CDP calls, handling the protocol translation transparently.
The local bridge design means all communication happens on your machine without needing to proxy through external services. Your Chrome instance, the CLI tool, and your scripts all run locally, making this approach ideal for development workflows, localhost testing, and scenarios where you need to preserve your existing browser state.
Pros and Cons
Pros:
- Preserves authentication state, cookies, and SSO sessions—no re-login needed
- Full access to installed Chrome extensions and your actual browser environment
- Works with localhost development servers without additional configuration
- Simple local architecture with no external dependencies or network proxying
- Combines manual interaction with automated scripts in the same session
- Lower learning curve compared to setting up Playwright or Puppeteer projects
Cons:
- Requires Chrome to be actively running on your machine—not suitable for headless servers or CI/CD without display
- Less mature ecosystem compared to Playwright or Selenium with fewer libraries and integrations
- Limited documentation and smaller community compared to established automation tools
- Not ideal for parallel test execution or multiple concurrent browser instances
- Browser instance is shared, so concurrent scripts can interfere with each other
- Automation is tied to your personal Chrome profile and environment setup
Related Skills
- Playwright Browser - Traditional browser automation framework; use for headless testing and CI/CD environments
- Puppeteer - Node.js library for controlling Chrome/Chromium; similar to Playwright but more low-level
- Selenium WebDriver - Classic browser automation tool supporting multiple browsers; heavier than Chrome Relay
- Chrome DevTools Protocol Documentation - Official specification for the protocol that Chrome Relay uses
- Cypress - Modern testing framework for web applications; focuses on end-to-end testing rather than general automation
Alternatives
- Playwright: Comprehensive browser automation supporting headless and headed modes with multiple browser engines; better for isolated test environments but loses your existing session state
- Puppeteer: Lightweight Node.js CDP client that can connect to Chrome instances; more low-level than Chrome Relay and requires more boilerplate to achieve the same tasks
- Manual testing + browser macros: For simple repetitive tasks, Chrome extension-based macros (Selenium IDE, iMacros) or built-in browser automation features might suffice without requiring a CLI tool