Skip to content

snomiao/rechrome

Repository files navigation

rechrome — Remote Chrome

npm

CLI proxy for running Playwright commands on a shared remote browser. Run a server on a machine with a browser, then send commands from any client.

Built on top of playwright-multi-tab — a patched Playwright fork with multi-tab and multi-session browser automation.

Features

  • Session isolation — clients are automatically namespaced by git repo or hostname
  • File transfer — screenshots and PDFs are automatically downloaded to the client
  • Hot-reload config.env.local changes are picked up without restart
  • Security — bearer auth, path traversal protection, env allowlisting for child processes

Prerequisites

💡 Recommended: For full multi-tab and multi-session support, install playwright-multi-tab and set PLAYWRIGHT_CLI=playwright-cli-multi-tab in your .env.local.

Install

# From npm
bunx rechrome --help

# Or clone and link globally
git clone https://github.com/snomiao/rechrome.git
cd rechrome
bun install
bun link

Now rechrome (or rech) is available globally.

Quick start

1. Start the server

On the machine with a browser:

rechrome serve

This auto-generates a connection URL in .env.local (with an auth key).

2. Run commands from a client

Copy the REMOTE_CHROME_URL from the server's .env.local to the client:

export REMOTE_CHROME_URL=remote-chrome://YOUR_KEY@server-host:13775

# Open a URL
rechrome open https://example.com

# Take a screenshot
rechrome screenshot

# List open tabs
rechrome tab-list

# Any playwright-cli command works
rechrome --help

Configuration

Copy .env.example to .env.local and edit:

cp .env.example .env.local
Variable Description Default
REMOTE_CHROME_URL Connection URL (auto-generated by rechrome serve)
PLAYWRIGHT_CLI Path to playwright-cli binary (recommended: playwright-cli-multi-tab for full multi-tab support) playwright-cli
RECH_HOST Server bind address 127.0.0.1
PLAYWRIGHT_MCP_EXTENSION_ID Chrome extension ID (client overrides server)
PLAYWRIGHT_MCP_EXTENSION_TOKEN Chrome extension token (client overrides server)

Remote access

By default the server binds to 127.0.0.1 (localhost only). For remote access, either:

  • Use an SSH tunnel: ssh -L 13775:localhost:13775 server-host
  • Or set RECH_HOST=0.0.0.0 (⚠️ ensure network is trusted — traffic is plain HTTP)

Session namespacing

Each client gets an isolated browser session based on:

  1. Git repo URL + branch (if in a git repo)
  2. Hostname + working directory (fallback)

Clients can also pass -s=name to create named sub-sessions within their namespace.

Development

bun install
bun test

Related

  • playwright-multi-tab — the underlying Playwright fork powering rechrome's multi-tab and multi-session browser control

License

MIT

About

rechrome — Remote Chrome CLI proxy for running Playwright commands on a shared remote browser

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors