CLI reference

Complete reference for every browserlane CLI command and flag.

The full reference for every bl command, argument, and flag — generated from bl v0.1.14. 159 commands across 12 groups.

See the CLI ↔ MCP mapping for how each command lines up with the agent-facing MCP tools.

Browser

CommandDescription
bl quitQuit the browser entirely — the full-cleanup counterpart to bl stop.

Session

CommandDescription
bl startExplicitly start/activate the current session — the lifecycle counterpart to stop. Creates or reuses this session's browser context/tab; a named session (--session <name>) that was stopped or never created is started fresh, so a session name can be re-run after bl stop.
bl stopStop the current session's run — the lifecycle counterpart to start.
bl sessionManage named browser sessions (isolated cookies/storage)
bl session newCreate a named session
bl session listList active sessions
bl session closeClose a named session
bl session resetReset a named session (fresh storage + tab)
bl session idPrint a deterministic session name for the current directory (for parallel agents)

Tabs

CommandDescription
bl tabsList all open browser tabs
bl tabManage browser tabs (new, close, switch)
bl tab newOpen a new browser tab
bl tab closeClose a browser tab by index (default: current tab)
bl tab switchSwitch to a browser tab by index or URL substring

Page

CommandDescription
bl openNavigate the browser to a URL; a bare host like example.com gets https:// prepended.
bl backNavigate back in browser history
bl forwardNavigate forward in browser history
bl reloadReload the current page
bl urlGet the current page URL
bl titleGet the current page title
bl textGet the text of the page or an element
bl htmlGet the HTML of the page or an element
bl mdRead a page as markdown — fetch a URL, or omit it to read the active tab
bl a11y-treeGet the accessibility tree of the current page
bl consoleInspect browser console messages and page errors
bl console listList buffered console messages and page errors
bl console waitWait for the next matching console message or page error
bl console clearClear the buffered console / page-error history
bl evalEvaluate a JavaScript expression (optionally navigate to URL first)
bl waitWait for an element, URL, text, page load, or JS condition
bl wait urlWait until the page URL contains a substring
bl wait textWait until text appears on the page
bl wait loadWait until the page is fully loaded
bl wait fnWait until a JS expression returns truthy

Frames

CommandDescription
bl framesList all child frames (iframes) on the page
bl frameFind a frame by name or URL substring

Elements

CommandDescription
bl findFind elements by CSS selector or semantic locator
bl find textFind element by text content
bl find roleFind element by ARIA role
bl find labelFind input by associated label text
bl find placeholderFind element by placeholder attribute
bl find testidFind element by data-testid attribute
bl find xpathFind element by XPath expression
bl find altFind element by alt attribute
bl find titleFind element by title attribute
bl mapMap interactive page elements with @refs
bl attrGet an HTML attribute value from an element
bl valueGet the current value of a form element
bl countCount matching elements
bl isCheck element state (visible, enabled, checked, actionable)
bl is visibleCheck if an element is visible on the page
bl is enabledCheck if an element is enabled
bl is checkedCheck if a checkbox or radio is checked
bl is actionableCheck actionability of an element (Visible, Stable, ReceivesEvents, Enabled, Editable)
bl expectAssert page state; exits 0 on pass, 1 on failure
bl expect urlAssert the current page URL
bl expect titleAssert the current page title
bl expect textAssert the text content of the page or an element
bl expect visibleAssert an element is visible
bl expect hiddenAssert an element is absent or not visible
bl expect enabledAssert an element is enabled
bl expect checkedAssert a checkbox or radio is checked (or unchecked with --not)
bl expect valueAssert the value of a form element
bl expect countAssert the number of elements matching a selector
bl expect jsAssert a JavaScript expression evaluates truthy
bl clickClick an element (optionally navigate to URL first)
bl dblclickDouble-click an element
bl hoverHover over an element by CSS selector
bl typeType text into an element (optionally navigate to URL first)
bl fillClear an input field and type new text
bl pressPress a key on a specific element or the focused element
bl keyboardControl text and held keys at the current focus (no selector)
bl keyboard typeType text at the current focus, generating key events
bl keyboard inserttextInsert text at the current focus WITHOUT key events (IME/paste-like)
bl keyboard downPress and hold a key (no release; pair with keyboard up)
bl keyboard upRelease a held key (pair with keyboard down)
bl selectSelect an option in a <select> element
bl checkCheck a checkbox or radio button
bl uncheckUncheck a checkbox
bl focusFocus an element
bl scrollScroll the page or an element
bl scroll into-viewScroll an element into view
bl dragDrag from one element to another
bl mouseMouse control (click, move, down, up)
bl mouse clickClick at coordinates or current position
bl mouse moveMove the mouse to coordinates
bl mouse downPress a mouse button down
bl mouse upRelease a mouse button
bl uploadSet files on an input[type=file] element
bl highlightHighlight an element with a red outline for 3 seconds

Dialogs

CommandDescription
bl dialogHandle browser dialogs (alert, confirm, prompt) — inspect, wait, accept, dismiss
bl dialog acceptAccept a dialog (optionally with prompt text)
bl dialog dismissDismiss a dialog
bl dialog waitWait for a dialog to open and print its type and message
bl dialog infoShow the currently open dialog, if any

Capture

CommandDescription
bl screenshotCapture a screenshot (optionally navigate to URL first)
bl pdfSave page as PDF
bl recordRecord browser sessions (screenshots and snapshots)
bl record startStart a recording
bl record stopStop recording and save
bl record groupManage recording groups
bl record group startStart a named group in the recording
bl record group stopEnd the current recording group
bl record chunkManage recording chunks
bl record chunk startStart a new chunk within the current recording
bl record chunk stopPackage current chunk into a ZIP file (recording stays active)
bl screencastRecord the page as video (native BiDi screencast)
bl screencast startStart a native video recording of the page viewport
bl screencast stopStop the screencast and print the video file path
bl diffCompare current state vs previous
bl diff mapCompare current page elements vs last map
bl diff snapshotCompare current a11y snapshot vs the last snapshot
bl diff screenshotCompare a current screenshot against a baseline image
bl diff urlCompare two pages by a11y snapshot (and optionally screenshot)

State

CommandDescription
bl cookiesManage browser cookies
bl cookies getPrint the cookie(s) matching a name
bl cookies setSet a cookie (name, value, optional domain/path/attributes)
bl cookies deleteDelete the cookie(s) matching a name
bl cookies clearClear all cookies (optionally by domain)
bl storageSave, load, and manage named session storage snapshots
bl storage saveSave the current session's storage as a named snapshot
bl storage loadRestore a named snapshot into the current session
bl storage listList saved storage snapshots
bl storage showShow a snapshot's metadata and counts (never raw values)
bl storage deleteDelete a saved storage snapshot
bl storage exportExport a snapshot's canonical JSON to a file
bl storage importImport canonical JSON from a file into the registry
bl localstorageManage localStorage for the active page origin
bl localstorage listList all keys and values for the active origin
bl localstorage getPrint a key's value
bl localstorage setSet a key to a value
bl localstorage deleteDelete a key
bl localstorage clearClear all keys for the active origin
bl sessionstorageManage sessionStorage for the active page origin
bl sessionstorage listList all keys and values for the active origin
bl sessionstorage getPrint a key's value
bl sessionstorage setSet a key to a value
bl sessionstorage deleteDelete a key
bl sessionstorage clearClear all keys for the active origin
bl downloadManage browser downloads
bl download dirSet the download directory
bl download waitWait for the next download to finish

Emulation

CommandDescription
bl viewportGet or set the browser viewport size
bl mediaOverride what matchMedia() reports for CSS media features
bl geolocationOverride the browser geolocation
bl emulateEmulate the browsing environment (locale, timezone, user agent, network, scripting)
bl emulate environmentSet session-scoped environment overrides (persist until reset)
bl emulate resetReset environment overrides to the browser defaults

Utilities

CommandDescription
bl sleepPause execution for a number of milliseconds
bl mcpStart the Model Context Protocol (MCP) server.
bl add-skillInstall browserlane browser skill for Claude Code
bl add-mcpRegister the browserlane MCP server with a coding agent (claude, claude-desktop, cursor, vscode, codex)
bl completionGenerate the autocompletion script for bl for the specified shell. Run with one of: bash, zsh, fish, powershell. See the examples below for how to load the generated script.

Setup

CommandDescription
bl installDownload Chrome for Testing and chromedriver
bl updateUpdate bl to the latest release
bl uninstallRemove bl, its install directory, and the PATH entry
bl is-installedCheck if Chrome and chromedriver are installed (exit 0 = yes, exit 1 = no)
bl pathsPrint browser and cache paths
bl versionPrint the version number

On this page