rename Chrome to Browser
Testing / test (push) Successful in 20s

This commit is contained in:
2026-04-16 11:55:09 +02:00
parent cd2ebc2982
commit fc4ce8f74d
4 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -8,7 +8,7 @@ Control your real, running browser from the terminal or a Python script — no h
You have 40 tabs open. You want to close all the duplicates, group the GitHub ones, save your session before a meeting, and open a few URLs into a specific group — all from a script. That is what browser-cli is for. You have 40 tabs open. You want to close all the duplicates, group the GitHub ones, save your session before a meeting, and open a few URLs into a specific group — all from a script. That is what browser-cli is for.
It works by pairing a small Chrome/Brave extension with a Python CLI tool. The extension has full access to your browser's tabs, windows, groups, and page DOM. The CLI talks to it in real time over a local IPC channel. It works by pairing a small browser extension with a Python CLI tool. The extension has full access to your browser's tabs, windows, groups, and page DOM. The CLI talks to it in real time over a local IPC channel.
--- ---
@@ -23,9 +23,9 @@ terminal / python script
│ Native Messaging Protocol (stdin/stdout, 4-byte length prefix + JSON) │ Native Messaging Protocol (stdin/stdout, 4-byte length prefix + JSON)
Chrome Extension (background service worker) Browser Extension (background worker/page)
chrome.* APIs extension APIs
Your running browser Your running browser
``` ```
@@ -53,7 +53,7 @@ Every response:
## Installation ## Installation
**Requirements:** Python 3.10+, [uv](https://github.com/astral-sh/uv), Chrome, Chromium, Brave, Edge, or Vivaldi **Requirements:** Python 3.10+, [uv](https://github.com/astral-sh/uv), Chrome, Chromium, Brave, Edge, Vivaldi
```sh ```sh
git clone <repo> git clone <repo>
@@ -63,8 +63,8 @@ uv run browser-cli install brave # or: chrome, chromium, edge, vivaldi
``` ```
The `install` command will: The `install` command will:
1. Ask you to load the `extension/` folder as an unpacked extension in your browser (`brave://extensions` → Developer mode → Load unpacked) 1. Ask you to load the browser-specific extension package
2. Ask you to paste the extension ID shown on the extension card 2. For Chromium-family browsers, ask you to paste the extension ID shown on the extension card
3. Write the native messaging manifest to your OS so the browser can find the host 3. Write the native messaging manifest to your OS so the browser can find the host
4. Copy the native host into an internal `libexec` directory and create a small wrapper outside your `PATH` 4. Copy the native host into an internal `libexec` directory and create a small wrapper outside your `PATH`
@@ -404,7 +404,7 @@ bash examples/demo.sh
## Limitations ## Limitations
- **Chrome internal pages** (`chrome://`, `brave://`, `about:`) cannot be scripted. DOM and extract commands only work on regular `http://` and `https://` pages. - **Browser internal pages** (`chrome://`, `brave://`, `edge://`, `about:`) cannot be scripted. DOM and extract commands only work on regular `http://` and `https://` pages.
- **Multiple browser instances can be auto-distinguished, but generated aliases are temporary**. Unaliased browsers get UUID aliases from the native host, which avoids collisions but is less ergonomic than setting a stable alias with `browser-cli clients rename --browser <current-alias> <new-alias>`. - **Multiple browser instances can be auto-distinguished, but generated aliases are temporary**. Unaliased browsers get UUID aliases from the native host, which avoids collisions but is less ergonomic than setting a stable alias with `browser-cli clients rename --browser <current-alias> <new-alias>`.
- **Supported install targets are explicit, not “all Chromium browsers”**. The installer currently supports Chrome, Chromium, Brave, Edge, and Vivaldi. Other Chromium-based browsers may use different or shared native messaging manifest locations, so they need browser-specific verification before being added safely. - **Supported install targets are explicit, not “all Chromium browsers”**. The installer currently supports Chrome, Chromium, Brave, Edge, and Vivaldi. Other Chromium-based browsers may use different or shared native messaging manifest locations, so they need browser-specific verification before being added safely.
- **Linux and macOS only** — Windows native messaging paths are not yet handled. - **Linux and macOS only** — Windows native messaging paths are not yet handled.
+1 -1
View File
@@ -125,7 +125,7 @@ def send_command(command: str, args: dict | None = None, profile: str | None = N
f"Cannot connect to browser{profile_hint}.\n" f"Cannot connect to browser{profile_hint}.\n"
"Make sure:\n" "Make sure:\n"
" 1. The browser-cli extension is installed and enabled\n" " 1. The browser-cli extension is installed and enabled\n"
" 2. The native host is registered: uv run browser-cli install chrome\n" " 2. The native host is registered: uv run browser-cli install <browser>\n"
" 3. Your browser is running\n" " 3. Your browser is running\n"
" Tip: use BROWSER_CLI_PROFILE=<name> to select a specific profile" " Tip: use BROWSER_CLI_PROFILE=<name> to select a specific profile"
) )
+1 -1
View File
@@ -1,7 +1,7 @@
[project] [project]
name = "browser-cli" name = "browser-cli"
version = "0.5.12" version = "0.5.12"
description = "Control your real running browser from the terminal via a Chrome extension" description = "Control your real running browser from the terminal via a browser extension"
requires-python = ">=3.10" requires-python = ">=3.10"
dependencies = [ dependencies = [
"click>=8", "click>=8",
Generated
+1 -1
View File
@@ -4,7 +4,7 @@ requires-python = ">=3.10"
[[package]] [[package]]
name = "browser-cli" name = "browser-cli"
version = "0.5.7" version = "0.5.12"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "click" }, { name = "click" },