Files
jackwener--opencli/docs/guide/browser-bridge.md
T
jackwener 942d78a7bb Remove daemon status/restart references from docs and READMEs
These commands were removed in the persistent daemon refactor.
Only `daemon stop` remains as a user-facing command.
2026-04-09 20:46:28 +08:00

2.1 KiB

Browser Bridge Setup

⚠️ Important: Browser commands reuse your Chrome login session. You must be logged into the target website in Chrome before running commands.

OpenCLI connects to your browser through a lightweight Browser Bridge Chrome Extension + micro-daemon (zero config, auto-start).

Extension Installation

  1. Go to the GitHub Releases page and download the latest opencli-extension.zip.
  2. Unzip the file and open chrome://extensions, enable Developer mode (top-right toggle).
  3. Click Load unpacked and select the unzipped folder.

Method 2: Load Unpacked Source (For Developers)

  1. Open chrome://extensions and enable Developer mode.
  2. Click Load unpacked and select the extension/ directory from the repository.

Verification

That's it! The daemon auto-starts when you run any browser command. No tokens, no manual configuration.

opencli doctor            # Check extension + daemon connectivity

How It Works

┌─────────────┐     WebSocket      ┌──────────────┐     Chrome API     ┌─────────┐
│  opencli    │ ◄──────────────► │  micro-daemon │ ◄──────────────► │  Chrome  │
│  (Node.js)  │    localhost:19825  │  (auto-start) │    Extension       │ Browser  │
└─────────────┘                    └──────────────┘                    └─────────┘

The daemon manages the WebSocket connection between your CLI commands and the Chrome extension. The extension executes JavaScript in the context of web pages, with access to the logged-in session.

Daemon Lifecycle

The daemon auto-starts on first browser command and stays alive persistently.

opencli daemon stop      # Graceful shutdown

The daemon is persistent — it stays alive until you explicitly stop it (opencli daemon stop) or uninstall the package.