bunwv
Installation
SKILL.md
bunwv
Headless browser automation using a persistent WebView session. The daemon keeps a single WebView instance alive so page state (DOM, modals, forms, SPA routes, scroll position) persists across commands.
Agent-first usage patterns
bunwv is designed for AI agents driving it via discrete tool calls. A few contracts to rely on:
- Successful verbs print nothing on stdout and exit 0.
click,type,navigate,press,scroll,scroll-to,clear,submit,resize,back/forward/reload,close,exists,wait-for,wait-for-gone,cdp-subscribe,cdp-unsubscribeall follow this. Read verbs (status,evaluate,events,console,cdp,cdp-subscriptions,screenshot,sessions) print their result. - Errors are JSON on stderr with a stable exit code. Branch on exit code, not stderr text:
0ok,1generic,2usage,3timeout,4element-not-found,5daemon-unreachable,6batch-partial (only inbatch --keep-going).
console.error/console.warnauto-surface during verbs. If the page logs an error while a verb runs, bunwv prints{"console":[…]}to stderr. You see the failure without a second call.- Cursor-pull for events.
events --since <seq>returns entries newer than the cursor plus a new cursor. Keep the cursor across turns; refetch after actions. If the buffer evicted older entries, the response includes"truncated":true,"oldest":<seq>. - File paths for binary output.
bunwv screenshotwrites bytes to/tmp/bunwv-screenshot-<session>.pngby default and prints the path on stdout. Use the Read tool on that path to see the image. --jsonfor uniform envelopes. Any command with--jsonreturns{ok, data?, error?, exitCode}as a single JSON line. Use it when you prefer one shape over terse output.- Flexible flag syntax.
--flag value,--flag=value, and repeated flags (e.g.--mod Shift --mod Control) all work. Flags may appear before or after the command:bunwv --json statusandbunwv status --jsonare equivalent. BUNWV_SESSIONenv var — set it once and--sessionbecomes optional.