@generativereality/browser-automation 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +29 -13
- package/dist/index.js +1713 -472
- package/package.json +7 -3
- package/scripts/windows-guest/README.md +40 -0
- package/scripts/windows-guest/cleanup.ps1 +5 -0
- package/scripts/windows-guest/rawpipe.mjs +16 -0
- package/scripts/windows-guest/run-in-session.ps1 +8 -0
- package/scripts/windows-guest/test.ps1 +59 -0
- package/skills/browser/SKILL.md +79 -43
- package/skills/browser/references/page-recipes.md +13 -22
- package/skills/browser/references/windows.md +7 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-automation",
|
|
3
3
|
"description": "Daemonless, per-tab-isolated browser automation for Claude Code via the `browser-automation` CLI. Drives one shared headed Chrome (persistent profile + extensions) over per-target CDP — many parallel sessions, no focus stealing, nothing long-lived to crash.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "generativereality"
|
|
7
7
|
},
|
package/README.md
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
# browser-automation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
**persistent profile** — cookies and browser extensions (password managers, etc.)
|
|
6
|
-
survive across runs — over **per-target Chrome DevTools Protocol**.
|
|
3
|
+
**Let many Claude Code sessions use your own signed-in Chrome at once, each in
|
|
4
|
+
its own tab, without stealing your screen.**
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Your Chrome, your profile: cookies and extensions (password managers, etc.)
|
|
7
|
+
survive across runs, so agents work in the sites you are already signed in to.
|
|
8
|
+
Each session gets its own background tab, so parallel agents never fight over
|
|
9
|
+
one active tab and never pull focus from you.
|
|
10
|
+
|
|
11
|
+
It is a CLI for AI agents (built for Claude Code, usable anywhere) that drives
|
|
12
|
+
**one shared headed Chrome** with a **persistent profile** over
|
|
13
|
+
**per-target Chrome DevTools Protocol**. No MCP server, no daemon,
|
|
14
|
+
**nothing long-lived to crash**. Every command is a fresh process that connects
|
|
15
|
+
to a single tab, acts, and exits.
|
|
10
16
|
|
|
11
17
|
## Why
|
|
12
18
|
|
|
@@ -23,8 +29,14 @@ server holding a browser object) has three recurring failures:
|
|
|
23
29
|
This CLI fixes all three by talking **per-target CDP** and keeping **no
|
|
24
30
|
long-lived process**:
|
|
25
31
|
|
|
26
|
-
- Each command connects to one tab
|
|
27
|
-
|
|
32
|
+
- Each command connects to one tab — no whole-browser enumeration, so target
|
|
33
|
+
count never wedges it.
|
|
34
|
+
- Chrome listens on **no debugging port**. It runs with `--remote-debugging-pipe`
|
|
35
|
+
behind a small broker that `launch` starts, reachable only by your OS user: a
|
|
36
|
+
0600 socket in a 0700 folder (macOS, Linux), or a named pipe whose random name
|
|
37
|
+
only your user can read (Windows). Login contexts get a broker each. A port
|
|
38
|
+
has no authentication, so any program on the computer could drive a browser
|
|
39
|
+
that listens on one.
|
|
28
40
|
- Each session owns one tab by name (`-s <name>`); commands only touch that tab.
|
|
29
41
|
New tabs open in the background and the CLI never activates/foregrounds a tab,
|
|
30
42
|
so parallel sessions and the user never collide.
|
|
@@ -177,14 +189,18 @@ same one-action-per-snapshot rule as Playwright refs.
|
|
|
177
189
|
|
|
178
190
|
Any command takes `--context <name>` (or `BAC_CONTEXT=<name>`) to act on a login
|
|
179
191
|
context's Chrome instead of your own; a session opened in a context follows it
|
|
180
|
-
without the flag. A new context starts
|
|
181
|
-
profile (
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
without the flag. A new context starts with the automation
|
|
193
|
+
profile's extensions (a password manager stays signed in) but none of its site
|
|
194
|
+
logins, and is not signed in to Chrome; `--full-copy` takes the logins too and
|
|
195
|
+
`--empty-profile` takes nothing. Your ordinary Chrome profile is never copied.
|
|
196
|
+
Each context's window gets its own colour. To keep a whole project in one
|
|
197
|
+
context, set `BAC_CONTEXT` in the env of that project's Claude settings.
|
|
184
198
|
|
|
185
199
|
## Environment
|
|
186
200
|
|
|
187
|
-
- `BROWSER_AUTOMATION_PORT` — the debugging port
|
|
201
|
+
- `BROWSER_AUTOMATION_PORT` — the debugging port, used only with
|
|
202
|
+
`BROWSER_AUTOMATION_CDP` and to find a Chrome of yours from before the move to
|
|
203
|
+
the pipe (`launch --restart` switches it over). **Defaults to one per user**,
|
|
188
204
|
not one per machine: `127.0.0.1` is machine-wide and CDP has no
|
|
189
205
|
authentication, so a single shared port means the first account to launch owns
|
|
190
206
|
it and every other account's automation silently drives *that* account's
|