Skip to content

Conversation

@hewliyang
Copy link
Contributor

@hewliyang hewliyang commented Jan 24, 2026

Summary

Reverts the base64 stdout behavior from #83 and instead saves screenshots to a temp directory when no path is provided.

Problem

agent-browser screenshot outputting base64 to stdout is not useful for agentic use cases, it's a massive blob of unreadable text that causes context rot.

Agents will figure out in the next step to give a filename anyway or pipe it into a file.

Solution

When no path is provided, screenshots now save to ~/.agent-browser/tmp/screenshots/ with a generated filename and return the path:

$ agent-browser screenshot
✓ Screenshot saved to /Users/m1a1/.agent-browser/tmp/screenshots/screenshot-2026-01-24T09-40-15-656Z-q2jua0.png

Changes

  • src/actions.ts: Generate temp path when no path provided
  • src/daemon.ts: Extract getAppDir() from getSocketDir() for cleaner semantics
  • cli/src/output.rs: Remove base64 stdout handling, update help text
  • Updated docs (README, quick-start, SKILL.md)

@vercel
Copy link
Contributor

vercel bot commented Jan 24, 2026

@hewliyang is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@hewliyang hewliyang changed the title fix(cli): save screenshots to tmp dir when no path provided chore(cli): save screenshots to tmp dir when no path provided Jan 24, 2026
@hewliyang hewliyang force-pushed the hly/chore/screenshot-save-to-tmp branch from e20ccc4 to 69a9fee Compare January 24, 2026 10:01
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.
@hewliyang hewliyang force-pushed the hly/chore/screenshot-save-to-tmp branch from 69a9fee to 807c58f Compare January 24, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant