browser4-cli 4.13.16 → 4.13.17
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 +9 -9
- 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
|
@@ -59,10 +59,10 @@ English | [简体中文](README.zh.md) | [中国镜像](https://gitee.com/platon
|
|
|
59
59
|
|
|
60
60
|
## Quick Start
|
|
61
61
|
|
|
62
|
-
Paste the following instruction to your favorite AI agent like claude, codex, workbuddy or openclaw and run it:
|
|
62
|
+
Paste the following instruction to your favorite AI agent like dsh, claude, codex, workbuddy or openclaw and run it:
|
|
63
63
|
|
|
64
64
|
```
|
|
65
|
-
Read https://browser4.io/SKILL.md
|
|
65
|
+
Read https://browser4.io/SKILL.md, install or upgrade browser4-cli for browser automation, perform the following task:
|
|
66
66
|
|
|
67
67
|
1. Open the browser in headed mode (`open --headed`) so the window is visible — this is a human-facing demo
|
|
68
68
|
2. go to amazon.com
|
|
@@ -274,14 +274,14 @@ export DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
274
274
|
| Command | Description |
|
|
275
275
|
|---|---|
|
|
276
276
|
| `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>`. |
|
|
277
|
-
| `attach` | Attach to an existing browser via CDP or the Browser4 extension. Supports `--cdp <url\|port\|channel>` and remote endpoint options. |
|
|
277
|
+
| `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. |
|
|
278
278
|
| `close` | Close the active browser session. |
|
|
279
|
-
| `list` | List browser sessions with their status and next-open behavior. Supports `--all`. |
|
|
279
|
+
| `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`. |
|
|
280
280
|
| `session-default <name>` | Make a named session become the default unnamed session. |
|
|
281
281
|
| `close-all` | Close all sessions without stopping the backend. |
|
|
282
282
|
| `kill-all` | Force-stop the backend and Browser4-managed browser processes. |
|
|
283
283
|
| `stop` | Gracefully stop the Browser4 server. |
|
|
284
|
-
| `status` | Show server version, port, and
|
|
284
|
+
| `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. |
|
|
285
285
|
| `doctor` | Run diagnostics: build info, LLM status, stale daemon cleanup, optional repair. Supports `--verbose` and `--fix`. |
|
|
286
286
|
| `doctor log [name]` | List, view, tail, or grep backend log files. Supports `--tail`, grep-style flags, and `doctor log <name> grep <pattern>`. |
|
|
287
287
|
| `doctor metrics [filter]` | List, filter, or grep backend metrics. Supports `doctor metrics grep <pattern>`. |
|
|
@@ -317,13 +317,14 @@ All interaction commands accept a snapshot ref such as `e15` or a CSS selector u
|
|
|
317
317
|
| `dblclick <ref> [button]` | Double-click an element. Supports `--modifiers`, `--follow`, `--auto-dismiss-dialogs`. |
|
|
318
318
|
| `hover <ref>` | Hover over an element. |
|
|
319
319
|
| `fill <ref> <text>` | Clear and fill text into an editable field. Supports `--submit`, `--verify`. |
|
|
320
|
-
| `type <text> [ref]` | Type text into the focused element or a target element. Supports `--submit`, `--verify`, `--focus`, `--interactable-timeout
|
|
320
|
+
| `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). |
|
|
321
321
|
| `press <key> [ref]` | Press a key on the focused element or a target element. Supports `--verify`, `--follow`. |
|
|
322
322
|
| `select <ref> <value>` | Select a dropdown value. Supports `--verify`. |
|
|
323
323
|
| `check <ref>` | Check a checkbox or radio button. |
|
|
324
324
|
| `uncheck <ref>` | Uncheck a checkbox or radio button. |
|
|
325
325
|
| `drag <startRef> <endRef>` | Drag and drop from one element to another. |
|
|
326
326
|
| `wait [target]` | Wait for a selector/ref, duration, text, URL pattern, page-load state, or JavaScript expression. Supports `--timeout`, `--text`, `--url`, `--load`, `--fn`. |
|
|
327
|
+
| `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`. |
|
|
327
328
|
|
|
328
329
|
`wait --load` accepts `domcontentloaded`, `load`, and `networkidle`.
|
|
329
330
|
|
|
@@ -351,7 +352,7 @@ browser4-cli wait --load networkidle
|
|
|
351
352
|
|
|
352
353
|
| Command | Description |
|
|
353
354
|
|---|---|
|
|
354
|
-
| `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`. |
|
|
355
|
+
| `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`. |
|
|
355
356
|
| `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`. |
|
|
356
357
|
| `snapshot list` | List saved snapshot files with timestamps and sizes. |
|
|
357
358
|
| `snapshot clean` | Remove old snapshot files. Supports `--dry-run`. |
|
|
@@ -565,7 +566,7 @@ These commands operate on Browser4's learned experience store.
|
|
|
565
566
|
|
|
566
567
|
| Command | Description |
|
|
567
568
|
|---|---|
|
|
568
|
-
| `experience save <url> <trace>` | Save a task execution trace. Supports `--outcome`, `--intent`, `--task-type
|
|
569
|
+
| `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). |
|
|
569
570
|
| `experience query <url>` | Query known selectors, blockers, and hints for a URL/domain. Supports `--intent`. |
|
|
570
571
|
| `experience list` | List stored experience entries. Supports `--filter`, `--intent-filter`, `--page`, `--page-size`. |
|
|
571
572
|
| `experience deep-learn <url> <intent>` | Run deeper analysis on stored traces. Supports `--force`. |
|
|
@@ -587,7 +588,6 @@ These commands exist in the CLI but are intentionally kept out of the default pu
|
|
|
587
588
|
|
|
588
589
|
| Command | Description |
|
|
589
590
|
|---|---|
|
|
590
|
-
| `upload <ref> <file>` | Upload one or multiple files to a file input. |
|
|
591
591
|
| `act <description>` | Experimental natural-language action translator that turns plain text into a browser command and runs it. |
|
|
592
592
|
|
|
593
593
|
### Timeout environment variables
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|