chore(cli): save screenshots to tmp dir when no path provided (#247)

* fix(cli): save screenshots to tmp dir when no path provided

Instead of outputting base64 to stdout (which is not useful for most CLI use cases),
screenshots without a path now save to ~/.agent-browser/tmp/screenshots/ with a
generated filename and return the path.

This makes the behavior more ergonomic for AI agents and CLI users alike.

* cleanup

* cleanup

* just revert the cargo.lock version for now

* refactor: extract getAppDir() from getSocketDir()

* docs: improve screenshot help text consistency
This commit is contained in:
Li Yang
2026-01-26 09:08:39 -06:00
committed by GitHub
parent 12abdbd671
commit e831b07f47
6 changed files with 33 additions and 26 deletions
+2 -2
View File
@@ -96,8 +96,8 @@ agent-browser is checked @e1 # Check if checked
### Screenshots & PDF
```bash
agent-browser screenshot # Screenshot to stdout
agent-browser screenshot path.png # Save to file
agent-browser screenshot # Save to a temporary directory
agent-browser screenshot path.png # Save to a specific path
agent-browser screenshot --full # Full page
agent-browser pdf output.pdf # Save as PDF
```