- Node.js >= 20
- Chrome / Chromium or Firefox
npm install -g @browser-cli/cliVerify installation:
browser-cli --versionIf the command is not found, ensure the npm global bin directory is in your PATH.
The browser extension is required — it bridges the CLI daemon and the browser.
Download the latest extension from GitHub Releases.
- Open
chrome://extensions - Enable Developer mode (top-right toggle)
- Click Load unpacked and select the extracted extension folder
- Open
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on
- Select the extension zip file
Firefox temporary add-ons are removed when the browser restarts. For persistent installation, use a signed extension.
browser-cli start # default WebSocket port 9222
browser-cli start --port 9333 # custom portClick the Browser-CLI extension icon in the browser toolbar to open the popup. The extension connects to ws://127.0.0.1:9222 by default.
- Default port — if you started the daemon with
browser-cli start(port 9222), the extension connects automatically. Wait a few seconds and the status should show Connected. - Custom port — if you used
--port, expand Settings in the popup and update the Daemon URL (e.g.,ws://127.0.0.1:9333), then click Save Changes. - Remote daemon — for non-loopback URLs (e.g.,
wss://my-server.com:9222), an Auth Token field will appear. Paste the token from the daemon startup log.
The extension icon badge indicates the connection state:
| Badge | Color | Meaning |
|---|---|---|
ON |
Blue | Connected |
... |
Yellow | Disconnected / reconnecting |
KEY |
Red | Auth failed (token required/wrong) |
browser-cli statusA healthy output shows at least one connected session:
Daemon running (PID 12345)
Sessions:
brave-falcon (connected)
Extension: Chrome 120.0
Tabs: 5
The CLI is not installed or not in your PATH.
npm install -g @browser-cli/cliThe daemon process is not started.
browser-cli startThe extension is not connected to the daemon.
- Check the extension is loaded — open
chrome://extensions(Chrome) orabout:debugging(Firefox) and confirm Browser-CLI extension is present and enabled - Check the popup status — click the extension icon; if it shows "Disconnected", the daemon URL may not match
- Check the port — the extension connects to
ws://127.0.0.1:9222by default. If you started the daemon with--port, update the URL in the extension popup Settings - Retry connection — click Retry connection in the popup, or toggle the extension off and on
- Check service worker logs — right-click the extension icon → "Inspect popup", or check the service worker console for errors
- Restart the daemon —
browser-cli stop && browser-cli start
The daemon requires a token but the extension has no token or the wrong one.
- Check the daemon startup log for the auth token
- Click the extension icon → Settings → paste the token into Auth Token
- Click Save Changes — the extension will reconnect automatically
- Ensure no firewall or proxy blocks
localhost:9222 - Ensure no other process is using the same WebSocket port
- Try a different port:
browser-cli start --port 9333and update the extension popup URL accordingly