agent-browser 0.11.0 → 0.11.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/README.md CHANGED
@@ -543,6 +543,23 @@ agent-browser fill @e3 "input text"
543
543
  agent-browser snapshot -i --json
544
544
  ```
545
545
 
546
+ ### Command Chaining
547
+
548
+ Commands can be chained with `&&` in a single shell invocation. The browser persists via a background daemon, so chaining is safe and more efficient:
549
+
550
+ ```bash
551
+ # Open, wait for load, and snapshot in one call
552
+ agent-browser open example.com && agent-browser wait --load networkidle && agent-browser snapshot -i
553
+
554
+ # Chain multiple interactions
555
+ agent-browser fill @e1 "user@example.com" && agent-browser fill @e2 "pass" && agent-browser click @e3
556
+
557
+ # Navigate and screenshot
558
+ agent-browser open example.com && agent-browser wait --load networkidle && agent-browser screenshot page.png
559
+ ```
560
+
561
+ Use `&&` when you don't need intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs before interacting).
562
+
546
563
  ## Headed Mode
547
564
 
548
565
  Show the browser window for debugging:
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-browser",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Headless browser automation CLI for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/daemon.js",
@@ -27,6 +27,23 @@ agent-browser wait --load networkidle
27
27
  agent-browser snapshot -i # Check result
28
28
  ```
29
29
 
30
+ ## Command Chaining
31
+
32
+ Commands can be chained with `&&` in a single shell invocation. The browser persists between commands via a background daemon, so chaining is safe and more efficient than separate calls.
33
+
34
+ ```bash
35
+ # Chain open + wait + snapshot in one call
36
+ agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -i
37
+
38
+ # Chain multiple interactions
39
+ agent-browser fill @e1 "user@example.com" && agent-browser fill @e2 "password123" && agent-browser click @e3
40
+
41
+ # Navigate and capture
42
+ agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser screenshot page.png
43
+ ```
44
+
45
+ **When to chain:** Use `&&` when you don't need to read the output of an intermediate command before proceeding (e.g., open + wait + screenshot). Run commands separately when you need to parse the output first (e.g., snapshot to discover refs, then interact using those refs).
46
+
30
47
  ## Essential Commands
31
48
 
32
49
  ```bash