browser4-cli 4.14.0-rc.4 → 4.14.0-rc.5
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/README.md +10 -10
- package/bin/browser4-cli-darwin-arm64 +0 -0
- package/bin/browser4-cli-darwin-x64 +0 -0
- package/bin/browser4-cli-linux-arm64 +0 -0
- package/bin/browser4-cli-linux-musl-arm64 +0 -0
- package/bin/browser4-cli-linux-musl-x64 +0 -0
- package/bin/browser4-cli-linux-x64 +0 -0
- package/bin/browser4-cli-win32-x64.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,10 +61,10 @@ English | [简体中文](README.zh.md) | [中国镜像](https://gitee.com/platon
|
|
|
61
61
|
|
|
62
62
|
## Quick Start
|
|
63
63
|
|
|
64
|
-
Paste the following instruction to your favorite AI agent like claude, codex, workbuddy or openclaw and run it:
|
|
64
|
+
Paste the following instruction to your favorite AI agent like dsh, claude, codex, workbuddy or openclaw and run it:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
Read https://browser4.io/SKILL.md
|
|
67
|
+
Read https://browser4.io/SKILL.md, install or upgrade browser4-cli for browser automation, perform the following task:
|
|
68
68
|
|
|
69
69
|
1. Open the browser in headed mode (`open --headed`) so the window is visible — this is a human-facing demo
|
|
70
70
|
2. go to amazon.com
|
|
@@ -130,7 +130,7 @@ Need to process multiple pages?
|
|
|
130
130
|
├─ List of known URLs (in a file)? → crawl --seed-file urls.txt --depth 0 --sql @query.sql
|
|
131
131
|
├─ Crawl from a start URL (follow links)? → crawl <url> --out-link-selector "..." --depth N
|
|
132
132
|
├─ Need parallel execution (high throughput)? → swarm create → swarm query --seed-file ...
|
|
133
|
-
├─ Repeated monitoring (check every hour)? → loop -- eval "..."
|
|
133
|
+
├─ Repeated monitoring (check every hour)? → loop -i 3600 -- eval "..."
|
|
134
134
|
└─ Just a few URLs in a shell script?
|
|
135
135
|
→ browser4-cli open --headed "https://first-url" # humans: open once, visibly
|
|
136
136
|
→ for url in ...; do browser4-cli goto "$url"; ... done
|
|
@@ -282,14 +282,14 @@ export DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
282
282
|
| Command | Description |
|
|
283
283
|
|---|---|
|
|
284
284
|
| `open [url]` | Open a browser session or reconnect to an existing one. **Headless by default.** Supports `--headed` (visible window), `--headless`, `--profile <path>`, `--profile-mode <DEFAULT\|SYSTEM_DEFAULT\|SEQUENTIAL\|TEMPORARY>`, `--interact-level <FASTEST\|FAST\|DEFAULT>`. **Note:** `SYSTEM_DEFAULT` is deprecated and unsupported on Chrome ≥ 143 — use `attach` + `state-save`/`state-load` to reuse system browser state (see [browser-state-import.md](skills/browser4-cli/references/browser-state-import.md)). |
|
|
285
|
-
| `attach` | Attach to an existing browser via CDP or the Browser4 extension. Supports `--cdp <url\|port\|channel>` and remote endpoint options. |
|
|
285
|
+
| `attach` | Attach to an existing browser via CDP or the Browser4 extension. Supports `--cdp <url\|port\|channel>` and remote endpoint options. After a successful attach the CLI prints the browser that actually connected (`Connected browser: …` / `Attached to … at …`) and shows a ⚠ warning when it conflicts with the requested channel (e.g. requested msedge but Chrome connected) — verify it before driving the session. |
|
|
286
286
|
| `close` | Close the active browser session. |
|
|
287
|
-
| `list` | List browser sessions with their status and next-open behavior. Supports `--all`. |
|
|
287
|
+
| `list` | List browser sessions with their status and next-open behavior. The Connection column prefers the backend-reported actual browser and annotates channel conflicts (e.g. `requested msedge · actual Google Chrome`). Supports `--all`. |
|
|
288
288
|
| `session-default <name>` | Make a named session become the default unnamed session. |
|
|
289
289
|
| `close-all` | Close all sessions without stopping the backend. |
|
|
290
290
|
| `kill-all` | Force-stop the backend and Browser4-managed browser processes. |
|
|
291
291
|
| `stop` | Gracefully stop the Browser4 server. |
|
|
292
|
-
| `status` | Show server version, port, health, and the web status panel URL (`http://<server>:8182/status`). |
|
|
292
|
+
| `status` | Show server version, port, health, and the web status panel URL (`http://<server>:8182/status`). When a session is active it also prints a current-session block: Name / Session ID / Status / Connection / Next open. |
|
|
293
293
|
| `doctor` | Run diagnostics: build info, LLM status, stale daemon cleanup, optional repair. Supports `--verbose` and `--fix`. |
|
|
294
294
|
| `doctor log [name]` | List, view, tail, or grep backend log files. Supports `--tail`, grep-style flags, and `doctor log <name> grep <pattern>`. |
|
|
295
295
|
| `doctor metrics [filter]` | List, filter, or grep backend metrics. Supports `doctor metrics grep <pattern>`. |
|
|
@@ -349,13 +349,14 @@ All interaction commands accept a snapshot ref such as `e15` or a CSS selector u
|
|
|
349
349
|
| `dblclick <ref> [button]` | Double-click an element. Supports `--modifiers`, `--follow`, `--auto-dismiss-dialogs`. |
|
|
350
350
|
| `hover <ref>` | Hover over an element. |
|
|
351
351
|
| `fill <ref> <text>` | Clear and fill text into an editable field. Supports `--submit`, `--verify`. |
|
|
352
|
-
| `type <text> [ref]` | Type text into the focused element or a target element. Supports `--submit`, `--verify`, `--focus`, `--interactable-timeout
|
|
352
|
+
| `type <text> [ref]` | Type text into the focused element or a target element. Supports `--submit`, `--verify`, `--focus`, `--interactable-timeout`, and `--method auto\|chars\|exec` (requires a target ref; `auto` types short text per-character and bulk-inserts long/multi-line text on textarea/contenteditable via a single `execCommand('insertText')`, `chars` forces per-character typing, `exec` forces the bulk insert). |
|
|
353
353
|
| `press <key> [ref]` | Press a key on the focused element or a target element. Supports `--verify`, `--follow`. |
|
|
354
354
|
| `select <ref> <value>` | Select a dropdown value. Supports `--verify`. |
|
|
355
355
|
| `check <ref>` | Check a checkbox or radio button. |
|
|
356
356
|
| `uncheck <ref>` | Uncheck a checkbox or radio button. |
|
|
357
357
|
| `drag <startRef> <endRef>` | Drag and drop from one element to another. |
|
|
358
358
|
| `wait [target]` | Wait for a selector/ref, duration, text, URL pattern, page-load state, or JavaScript expression. Supports `--timeout`, `--text`, `--url`, `--load`, `--fn`. |
|
|
359
|
+
| `upload <ref> <file> [file...]` | Upload one or more local files to a page file input. The target must be an `<input type="file">` (anything else errors); the paths must be readable by the browser process — local mode: the same machine, and empty/missing files are rejected with a hint; remote backend: paths resolve on the backend host. Supports `--no-snapshot`. |
|
|
359
360
|
|
|
360
361
|
`wait --load` accepts `domcontentloaded`, `load`, and `networkidle`.
|
|
361
362
|
|
|
@@ -383,7 +384,7 @@ browser4-cli wait --load networkidle
|
|
|
383
384
|
|
|
384
385
|
| Command | Description |
|
|
385
386
|
|---|---|
|
|
386
|
-
| `snapshot` | Capture an accessibility-tree snapshot. Supports `--boxes`, `-i/--interactive`, `-u/--urls`, `-c/--compact`, `--no-compact`, `-d/--depth`, `-l/--limit`, `-s/--selector`, `--raw`, `--stdout`, `-vp/--viewport`, `--filename`. |
|
|
387
|
+
| `snapshot` | Capture an accessibility-tree snapshot. Supports `--boxes`/`--no-boxes`, `-i/--interactive`, `-u/--urls`, `-c/--compact`, `--no-compact`, `-d/--depth`, `-l/--limit`, `-s/--selector`, `--raw`, `--stdout`, `-vp/--viewport`, `--filename`. `--stdout`/`--raw` output is paginated at 2000 lines/page by default — when truncated, stdout (if piped) gets a `# … output truncated: showing N of M lines …` hint and the full footer goes to stderr; use `--all` or `--page-size 0` for the complete tree, and bound very large pages with `-v N`/`--depth`/`--selector`/`--no-boxes`. |
|
|
387
388
|
| `snapshot grep <pattern>` | Search saved/current snapshot YAML with grep-style flags such as `-i`, `-v`, `-c`, `-l`, `-F`, `-w`, `-A`, `-B`, `-C`, `--selector`, `--page`, `--page-size`, `--all`. |
|
|
388
389
|
| `snapshot list` | List saved snapshot files with timestamps and sizes. |
|
|
389
390
|
| `snapshot clean` | Remove old snapshot files. Supports `--dry-run`. |
|
|
@@ -624,7 +625,7 @@ These commands operate on Browser4's learned experience store.
|
|
|
624
625
|
|
|
625
626
|
| Command | Description |
|
|
626
627
|
|---|---|
|
|
627
|
-
| `experience save <url> <trace>` | Save a task execution trace. Supports `--outcome`, `--intent`, `--task-type
|
|
628
|
+
| `experience save <url> <trace>` | Save a task execution trace. Supports `--outcome`, `--intent`, `--task-type` (canonical types including `publish_post`), and `--facts <inline JSON \| @file.json>` — merges retrospective knowledge (`selectors` / `interaction_hints` / `known_blockers` / `anti_patterns`, camelCase or snake_case keys) into the (domain, intent) facts entry; the merge is refused when that entry is VERIFIED (immutable). |
|
|
628
629
|
| `experience query <url>` | Query known selectors, blockers, and hints for a URL/domain. Supports `--intent`. |
|
|
629
630
|
| `experience list` | List stored experience entries. Supports `--filter`, `--intent-filter`, `--page`, `--page-size`. |
|
|
630
631
|
| `experience deep-learn <url> <intent>` | Run deeper analysis on stored traces. Supports `--force`. |
|
|
@@ -646,7 +647,6 @@ These commands exist in the CLI but are intentionally kept out of the default pu
|
|
|
646
647
|
|
|
647
648
|
| Command | Description |
|
|
648
649
|
|---|---|
|
|
649
|
-
| `upload <ref> <file>` | Upload one or multiple files to a file input. |
|
|
650
650
|
| `act <description>` | Experimental natural-language action translator that turns plain text into a browser command and runs it. |
|
|
651
651
|
|
|
652
652
|
### Timeout environment variables
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|