next.js example (#694)

* next.js guide

* better

* shadcn

* fixes

* fix: correct screenshot test assertion to check path instead of base64

The daemon returns { path: savePath } for screenshot commands, not base64.

* fix: cross-platform Chrome detection and gitignore hardening

- Replace hardcoded macOS Chrome path with findLocalChrome() that
  searches common paths on macOS, Linux, and WSL, with a clear error
  message when no Chrome is found.
- Add .env and .env*.local to .gitignore to prevent accidental
  secret commits.

* fix: correct Vercel deploy button repo URL to vercel-labs/agent-browser

* clean up

* demo

* next page

---------

Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
This commit is contained in:
Chris Tate
2026-03-09 15:24:44 -05:00
committed by GitHub
co-authored by ctate
parent 3649787268
commit cc3c70dc86
35 changed files with 6764 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
# --- Serverless function mode (@sparticuz/chromium) ---
# Optional: path to Chromium binary for local development.
# On Vercel, @sparticuz/chromium provides this automatically.
# CHROMIUM_PATH=/usr/bin/chromium-browser
# --- Vercel Sandbox mode ---
# Snapshot ID with agent-browser + Chromium pre-installed (optional, speeds up startup)
# Create one with: npx tsx scripts/create-snapshot.ts
# AGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx