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
| Command | Description |
|---|---|
bl quit | Quit the browser entirely — the full-cleanup counterpart to bl stop. |
Session
| Command | Description |
|---|---|
bl start | Explicitly 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 stop | Stop the current session's run — the lifecycle counterpart to start. |
bl session | Manage named browser sessions (isolated cookies/storage) |
bl session new | Create a named session |
bl session list | List active sessions |
bl session close | Close a named session |
bl session reset | Reset a named session (fresh storage + tab) |
bl session id | Print a deterministic session name for the current directory (for parallel agents) |
Tabs
| Command | Description |
|---|---|
bl tabs | List all open browser tabs |
bl tab | Manage browser tabs (new, close, switch) |
bl tab new | Open a new browser tab |
bl tab close | Close a browser tab by index (default: current tab) |
bl tab switch | Switch to a browser tab by index or URL substring |
Page
| Command | Description |
|---|---|
bl open | Navigate the browser to a URL; a bare host like example.com gets https:// prepended. |
bl back | Navigate back in browser history |
bl forward | Navigate forward in browser history |
bl reload | Reload the current page |
bl url | Get the current page URL |
bl title | Get the current page title |
bl text | Get the text of the page or an element |
bl html | Get the HTML of the page or an element |
bl md | Read a page as markdown — fetch a URL, or omit it to read the active tab |
bl a11y-tree | Get the accessibility tree of the current page |
bl console | Inspect browser console messages and page errors |
bl console list | List buffered console messages and page errors |
bl console wait | Wait for the next matching console message or page error |
bl console clear | Clear the buffered console / page-error history |
bl eval | Evaluate a JavaScript expression (optionally navigate to URL first) |
bl wait | Wait for an element, URL, text, page load, or JS condition |
bl wait url | Wait until the page URL contains a substring |
bl wait text | Wait until text appears on the page |
bl wait load | Wait until the page is fully loaded |
bl wait fn | Wait until a JS expression returns truthy |
Frames
| Command | Description |
|---|---|
bl frames | List all child frames (iframes) on the page |
bl frame | Find a frame by name or URL substring |
Elements
| Command | Description |
|---|---|
bl find | Find elements by CSS selector or semantic locator |
bl find text | Find element by text content |
bl find role | Find element by ARIA role |
bl find label | Find input by associated label text |
bl find placeholder | Find element by placeholder attribute |
bl find testid | Find element by data-testid attribute |
bl find xpath | Find element by XPath expression |
bl find alt | Find element by alt attribute |
bl find title | Find element by title attribute |
bl map | Map interactive page elements with @refs |
bl attr | Get an HTML attribute value from an element |
bl value | Get the current value of a form element |
bl count | Count matching elements |
bl is | Check element state (visible, enabled, checked, actionable) |
bl is visible | Check if an element is visible on the page |
bl is enabled | Check if an element is enabled |
bl is checked | Check if a checkbox or radio is checked |
bl is actionable | Check actionability of an element (Visible, Stable, ReceivesEvents, Enabled, Editable) |
bl expect | Assert page state; exits 0 on pass, 1 on failure |
bl expect url | Assert the current page URL |
bl expect title | Assert the current page title |
bl expect text | Assert the text content of the page or an element |
bl expect visible | Assert an element is visible |
bl expect hidden | Assert an element is absent or not visible |
bl expect enabled | Assert an element is enabled |
bl expect checked | Assert a checkbox or radio is checked (or unchecked with --not) |
bl expect value | Assert the value of a form element |
bl expect count | Assert the number of elements matching a selector |
bl expect js | Assert a JavaScript expression evaluates truthy |
bl click | Click an element (optionally navigate to URL first) |
bl dblclick | Double-click an element |
bl hover | Hover over an element by CSS selector |
bl type | Type text into an element (optionally navigate to URL first) |
bl fill | Clear an input field and type new text |
bl press | Press a key on a specific element or the focused element |
bl keyboard | Control text and held keys at the current focus (no selector) |
bl keyboard type | Type text at the current focus, generating key events |
bl keyboard inserttext | Insert text at the current focus WITHOUT key events (IME/paste-like) |
bl keyboard down | Press and hold a key (no release; pair with keyboard up) |
bl keyboard up | Release a held key (pair with keyboard down) |
bl select | Select an option in a <select> element |
bl check | Check a checkbox or radio button |
bl uncheck | Uncheck a checkbox |
bl focus | Focus an element |
bl scroll | Scroll the page or an element |
bl scroll into-view | Scroll an element into view |
bl drag | Drag from one element to another |
bl mouse | Mouse control (click, move, down, up) |
bl mouse click | Click at coordinates or current position |
bl mouse move | Move the mouse to coordinates |
bl mouse down | Press a mouse button down |
bl mouse up | Release a mouse button |
bl upload | Set files on an input[type=file] element |
bl highlight | Highlight an element with a red outline for 3 seconds |
Dialogs
| Command | Description |
|---|---|
bl dialog | Handle browser dialogs (alert, confirm, prompt) — inspect, wait, accept, dismiss |
bl dialog accept | Accept a dialog (optionally with prompt text) |
bl dialog dismiss | Dismiss a dialog |
bl dialog wait | Wait for a dialog to open and print its type and message |
bl dialog info | Show the currently open dialog, if any |
Capture
| Command | Description |
|---|---|
bl screenshot | Capture a screenshot (optionally navigate to URL first) |
bl pdf | Save page as PDF |
bl record | Record browser sessions (screenshots and snapshots) |
bl record start | Start a recording |
bl record stop | Stop recording and save |
bl record group | Manage recording groups |
bl record group start | Start a named group in the recording |
bl record group stop | End the current recording group |
bl record chunk | Manage recording chunks |
bl record chunk start | Start a new chunk within the current recording |
bl record chunk stop | Package current chunk into a ZIP file (recording stays active) |
bl screencast | Record the page as video (native BiDi screencast) |
bl screencast start | Start a native video recording of the page viewport |
bl screencast stop | Stop the screencast and print the video file path |
bl diff | Compare current state vs previous |
bl diff map | Compare current page elements vs last map |
bl diff snapshot | Compare current a11y snapshot vs the last snapshot |
bl diff screenshot | Compare a current screenshot against a baseline image |
bl diff url | Compare two pages by a11y snapshot (and optionally screenshot) |
State
| Command | Description |
|---|---|
bl cookies | Manage browser cookies |
bl cookies get | Print the cookie(s) matching a name |
bl cookies set | Set a cookie (name, value, optional domain/path/attributes) |
bl cookies delete | Delete the cookie(s) matching a name |
bl cookies clear | Clear all cookies (optionally by domain) |
bl storage | Save, load, and manage named session storage snapshots |
bl storage save | Save the current session's storage as a named snapshot |
bl storage load | Restore a named snapshot into the current session |
bl storage list | List saved storage snapshots |
bl storage show | Show a snapshot's metadata and counts (never raw values) |
bl storage delete | Delete a saved storage snapshot |
bl storage export | Export a snapshot's canonical JSON to a file |
bl storage import | Import canonical JSON from a file into the registry |
bl localstorage | Manage localStorage for the active page origin |
bl localstorage list | List all keys and values for the active origin |
bl localstorage get | Print a key's value |
bl localstorage set | Set a key to a value |
bl localstorage delete | Delete a key |
bl localstorage clear | Clear all keys for the active origin |
bl sessionstorage | Manage sessionStorage for the active page origin |
bl sessionstorage list | List all keys and values for the active origin |
bl sessionstorage get | Print a key's value |
bl sessionstorage set | Set a key to a value |
bl sessionstorage delete | Delete a key |
bl sessionstorage clear | Clear all keys for the active origin |
bl download | Manage browser downloads |
bl download dir | Set the download directory |
bl download wait | Wait for the next download to finish |
Emulation
| Command | Description |
|---|---|
bl viewport | Get or set the browser viewport size |
bl media | Override what matchMedia() reports for CSS media features |
bl geolocation | Override the browser geolocation |
bl emulate | Emulate the browsing environment (locale, timezone, user agent, network, scripting) |
bl emulate environment | Set session-scoped environment overrides (persist until reset) |
bl emulate reset | Reset environment overrides to the browser defaults |
Utilities
| Command | Description |
|---|---|
bl sleep | Pause execution for a number of milliseconds |
bl mcp | Start the Model Context Protocol (MCP) server. |
bl add-skill | Install browserlane browser skill for Claude Code |
bl add-mcp | Register the browserlane MCP server with a coding agent (claude, claude-desktop, cursor, vscode, codex) |
bl completion | Generate 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
| Command | Description |
|---|---|
bl install | Download Chrome for Testing and chromedriver |
bl update | Update bl to the latest release |
bl uninstall | Remove bl, its install directory, and the PATH entry |
bl is-installed | Check if Chrome and chromedriver are installed (exit 0 = yes, exit 1 = no) |
bl paths | Print browser and cache paths |
bl version | Print the version number |