Skip to main content
Control browser surfaces in cmux for web automation. All browser commands use the browser namespace or legacy aliases.

browser identify

Get information about a browser surface including URL and title.
Example:
Output (JSON with —json):

browser open / open-split

Open a URL in a new or existing browser surface.
Flags:
string
Workspace context (defaults to $CMUX_WORKSPACE_ID)
string
Window context for routing
Examples:
Output:

browser navigate / goto

Navigate a browser surface to a URL.
Flags:
boolean
Capture page snapshot after navigation completes
Examples:
Output:

browser back / forward / reload

Navigate browser history or reload the page.
Examples:

browser url / get-url

Get the current URL of a browser surface.
Example:
Output:

browser snapshot

Capture a text snapshot of the page DOM.
Flags:
string
CSS selector to snapshot (defaults to entire page)
number
Maximum DOM depth to traverse
boolean
Include interactive elements only
boolean
Alias for --interactive
boolean
Include cursor position indicators
boolean
Use compact output format
Examples:

browser eval

Evaluate JavaScript in the page context.
Examples:
Output: Returns the evaluated value as text or JSON.

browser wait

Wait for a condition to be met on the page.
Flags:
string
CSS selector to wait for
string
Wait for element containing text
string
Wait for URL to contain text
string
Alias for --url-contains
string
Wait for load state: load, domcontentloaded, networkidle
string
JavaScript function that returns truthy when condition is met
number
Timeout in seconds (default varies by condition)
number
Timeout in milliseconds
Examples:

browser click / dblclick / hover

Interact with page elements.
Examples:

browser type / fill

Type text into input fields.
Note: type requires text, fill allows empty string to clear. Examples:

browser press / key / keydown / keyup

Simulate keyboard input.
Examples:

browser check / uncheck

Toggle checkboxes.
Examples:

browser select

Select a dropdown option.
Example:

browser scroll

Scroll the page or an element.
Flags:
string
Element to scroll (defaults to page)
number
Horizontal scroll amount in pixels
number
Vertical scroll amount in pixels (can be positional)
Examples:

browser scrollintoview / scroll-into-view

Scroll an element into view.
Example:

browser focus

Focus a page element.
Example:

browser focus-webview

Focus the browser’s webview (give keyboard control to the page).

browser is-webview-focused

Check if the browser’s webview has focus.
Output:

browser screenshot

Capture a PNG screenshot of the page.
Flags:
string
Output file path for PNG screenshot
Examples:
Output:

browser get

Extract data from page elements.
Subcommands:

get url

get title

get text

get html

get value

get attr

Example:

get count

get box

Returns bounding box coordinates.

get styles

Examples:

browser is

Check element state.
Subcommands:
  • visible - Check if element is visible
  • enabled - Check if element is enabled
  • checked - Check if checkbox/radio is checked
Examples:
Output:

browser find

Find elements using various locator strategies.
Locators:

find role

Example:

find text / label / placeholder / alt / title / testid

Example:

find first / last

find nth

Example:

browser frame

Switch to an iframe context.
Examples:

browser dialog

Handle JavaScript dialogs (alert/confirm/prompt).
Examples:

browser download

Wait for a download to complete.
Flags:
string
Expected download path
number
Timeout in seconds
number
Timeout in milliseconds
Example:

browser cookies

Manage browser cookies.

cookies get

cookies set

cookies clear

Examples:

browser storage

Manage localStorage and sessionStorage.
Examples:

browser tab

Manage browser tabs (within the surface).

tab list

tab new

tab switch

tab close

browser console

View or clear console messages.
Examples:
Output:

browser errors

View or clear page errors.
Example:

browser highlight

Highlight an element on the page (visual debugging).
Example:

browser state

Save or load browser state.
Examples:

browser addinitscript / addscript / addstyle

Inject scripts or styles into pages.
Examples:

browser viewport

Set the viewport size.
Example:

browser geolocation / geo

Set geolocation coordinates.
Example:

browser offline

Simulate offline mode.
Example:

browser trace

Start or stop tracing.
Example:

browser network

Manage network routes and requests.
Examples:

browser screencast

Start or stop video recording.

browser input

Low-level input simulation.

Legacy Aliases

These legacy commands are aliased to the browser namespace:
  • open-browserbrowser open
  • navigatebrowser navigate
  • browser-backbrowser back
  • browser-forwardbrowser forward
  • browser-reloadbrowser reload
  • get-urlbrowser get-url
  • focus-webviewbrowser focus-webview
  • is-webview-focusedbrowser is-webview-focused
Note: --panel is accepted as a legacy alias for --surface in all browser commands.

Global Flags

string
Path to the cmux socket (default: /tmp/cmux.sock or $CMUX_SOCKET_PATH)
string
Socket authentication password (or use $CMUX_SOCKET_PASSWORD)
boolean
Output results in JSON format
string
Control ID output format: refs, uuids, or both