cmux-browser

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

End-user browser automation with cmux. Use when you need to open sites, inspect or interact with browser surfaces, wait for page state, and extract data without stealing focus.

skills/cmux-browser/SKILL.md

Download bundle ↓
main · 6f118af13 bundle filesScanned 2026-09-15

references/commands.md

2,023 tokens · o200k_base · 8,307 bytes

Source excerpt starting at line 1.
# Command Reference (cmux Browser) ## Surface contract Run `cmux browser --help` against the installed binary before relying on exactsyntax. Creation verbs (`open`, `open-split`, `new`) and the explicitly globalbrowser verbs listed in `SKILL.md` may omit a surface. Every surface-boundcommand that reads or mutates an existing browser must include one: ```bashcmux browser --surface <surface> get urlcmux browser --surface <surface> snapshot --interactivecmux browser --surface <surface> tab listcmux browser --surface <surface> click <selector-or-ref>``` `cmux browser <surface> <verb> ...` is the equivalent positional form. See[surface-discovery.md](surface-discovery.md) before targeting an existingauthenticated browser or a browser in another workspace. ## Accepted aliases Use the preferred column in new docs/scripts; every alias still requires thesame explicit surface. | Purpose | Preferred | Accepted alias || --- | --- | --- || Read URL | `cmux browser --surface <surface> get url` | `cmux browser --surface <surface> url` or `get-url` || Navigate | `cmux browser --surface <surface> goto <url>` | `navigate` || Interactive snapshot | `cmux browser --surface <surface> snapshot --interactive` | `-i` || Press a key | `cmux browser --surface <surface> press <key>` | `key` | The upstream `agent-browser` command's implicit page context maps to anexplicit cmux surface. Its interactive snapshot maps to `snapshot--interactive`; its `open` command maps to `cmux browser open` because creationreturns a new surface. ## Discovery and creation ```bashcmux identify --jsoncmux tree --all --jsoncmux browser --surface <surface> identify --json cmux --json browser open <url> --focus falsecmux --json browser open <url> --workspace <workspace> --window <window> --focus falsecmux --json browser open-split <url> --workspace <workspace> --focus false``` Creation defaults to the caller's `CMUX_WORKSPACE_ID` when neither`--workspace` nor `--window` is supplied, and `--focus` defaults to false. Anexplicit `--workspace` lets an agent create in another workspace withoutselecting it. ## Navigation ```bashcmux browser --surface <surface> goto <url>cmux browser --surface <surface> back|forward|reloadcmux browser --surface <surface> get url|title``` ## Snapshot and inspection ```bashcmux browser --surface <surface> snapshot --interactivecmux browser --surface <surface> snapshot --interactive --compact --max-depth 3cmux browser --surface <surface> get text bodycmux browser --surface <surface> get html bodycmux browser --surface <surface> get value "#email"cmux browser --surface <surface> get attr "#email" --attr placeholdercmux browser --surface <surface> get count ".row"cmux browser --surface <surface> get box "#submit"cmux browser --surface <surface> get styles "#submit" --property colorcmux browser --surface <surface> eval '<js>'``` ## Interaction ```bashcmux browser --surface <surface> click|dblclick|hover|focus <selector-or-ref>cmux browser --surface <surface> fill <selector-or-ref> [text]cmux browser --surface <surface> type <selector-or-ref> <text>cmux browser --surface <surface> press|key|keydown|keyup [--key <key> | <key>]cmux browser --surface <surface> select <selector-or-ref> <value>cmux browser --surface <surface> check|uncheck <selector-or-ref>cmux browser --surface <surface> scroll [--selector <css>] [--dx <n>] [--dy <n>]``` Empty `fill` text clears the field. Keyboard names follow Playwright/W3Cconventions (`Enter`, `Tab`, `Escape`, `ArrowLeft`, `Space`). Supported keysuse the native WebKit input path, preserving browser defaults such ascontenteditable caret movement, selection, scrolling, and control activation;opaque tokens use a page-event compatibility fallback. `Space`, `Spacebar`,and `space` emit DOM key `" "` with code `"Space"`; use `--key ' '` to passthe raw DOM key. Use `keydown Shift`/`keyup Shift` (or another supportedmodifier) around an arrow press when a page editor should extend a selection;the modifier state is retained per browser surface. ## Wait ```bashcmux browser --surface <surface> wait --selector "#ready" --timeout-ms 10000cmux browser --surface <surface> wait --text "Done" --timeout-ms 10000cmux browser --surface <surface> wait --url-contains "/dashboard" --timeout-ms 10000cmux browser --surface <surface> wait --load-state complete --timeout-ms 15000cmux browser --surface <surface> wait --function "document.readyState === 'complete'" --timeout-ms 10000``` ## Design mode ```bashcmux browser --surface <surface> design-mode enable|status|disable --json``` Design mode lets a user select page elements and copy their DOM, style, URL,and screenshot context for pasting into an agent. CLI enable/disable nevermoves application focus or copies context automatically. ## Session, state, and diagnostics ```bashcmux browser --surface <surface> cookies get|set|clear ...cmux browser --surface <surface> cookies clear --url https://app.example.com/cmux browser --surface <surface> cookies clear --domain app.example.comcmux browser --surface <surface> cookies clear --allcmux browser --surface <surface> storage local|session get|set|clear ...cmux browser --surface <surface> tab list|new|switch|close ...cmux browser --surface <surface> state save|load <path>cmux browser --surface <surface> console list|clearcmux browser --surface <surface> errors list|clearcmux browser --surface <surface> highlight <selector>cmux browser --surface <surface> screenshotcmux browser --surface <surface> download list [--limit <1...25>]cmux browser --surface <surface> download wait --timeout-ms 10000``` `download list` returns the newest records for that browser surface withoutconsuming `download wait` events. JSON records include `download_id`,`filename`, the actual saved `path` (or `null`), `status`, `bytes` when known,and `path_exists` when a path is present. The list is capped at 25 records;`--limit` may request a smaller positive count. Text output marks unavailablevalues explicitly.The legacy positional form treats a bare token as a destination path, so usethe explicit `download wait <path>` or `download --path <path>` spelling whenyou want to make that intent unambiguous. `download list` is the only listingsubcommand. `cookies clear` requires an explicit scope (`--url`, `--domain`, `--name`,`--path`, another cookie filter, or `--all`). URL scope follows cookiedomain/path, secure, and expiration matching for the requested URL. JSONresponses include the number of removed cookies as `cleared`. ## Agent reliability Use `--snapshot-after` on mutating actions to get a fresh post-action snapshot.Re-snapshot after navigation, modal open/close, or major DOM changes. Prefershort handles in output; use `--id-format both` only when a UUID must be loggedor exported. If the handle is stale, rediscover it; never silently retarget thefocused browser. ## Viewport emulation ```bashcmux browser --surface <surface> viewport 1280 720cmux browser --surface <surface> screenshot --out /tmp/desktop.pngcmux browser --surface <surface> viewport reset``` Dimensions are limited to 1..4096 CSS pixels. cmux changes`window.innerWidth`/`window.innerHeight` and aspect-fits the page inside theexisting pane; it does not resize the pane, move other surfaces, or changefocus. Screenshot PNG dimensions are exact CSS pixels on Retina and non-Retinadisplays. An unsupported viewport/page-zoom combination leaves the viewport unchangedand returns `invalid_params` with reason`viewport_zoom_render_geometry_too_large` plus `maximum_page_zoom`. An attachedbrowser inspector returns `invalid_state` with reason`attached_browser_inspector`; close or detach it first. Opening or redocking anattached inspector while emulation is active resets the viewport to nativesizing. ## Known WKWebView gaps (`not_supported`) `browser.geolocation.set`, `browser.offline.set`, `browser.trace.start|stop`,`browser.network.route|unroute|requests`, `browser.screencast.start|stop`, and`browser.input_mouse|input_keyboard|input_touch` are not supported by theWKWebView engine. See also [snapshot-refs.md](snapshot-refs.md),[authentication.md](authentication.md), and[session-management.md](session-management.md). 
Referenced from SKILL.md