Skip to content

CLI and sessions

blop-browser keeps a browser alive between shell calls. The first command starts a local daemon; later commands with the same session name reuse its tabs, cookies, action history and element references.

OptionEffect
--session NAMESelect a named session. Default default. Names are 1 to 64 letters, digits, underscores or hyphens.
--browser chromium|camoufoxBrowser for a new session
--headless, --headedRun a new managed browser without or with a window
--profile persistent|disposableKeep session state until destroy (default), or delete it on close or idle shutdown
--cdp-endpoint URLConnect to a running Chrome over CDP
--attach-existingAllow access to an existing CDP profile. Required on the command that first attaches.
--anti-bot [on|off]Launch Camoufox (on) or Chromium (off, default)
--jsonPrint a machine-readable envelope

Flags and environment variables override saved configuration.

Terminal window
blop-browser --session checkout open https://example.com
blop-browser --session checkout snapshot
blop-browser --session checkout click e13
blop-browser --session checkout close
CommandEffect
open URLNavigate the active page
snapshotRead visible text, controls with references, and ARIA fallback data
click TARGETClick a reference or structured target
type TARGET TEXT [--submit]Fill a field, optionally submitting it
expect-text TEXTRetry until the text is visible; exit 1 if it never appears
screenshot [NAME] [--full-page]Save bounded visual evidence to the session’s artifact directory
finish passed|failed REASONRecord the final outcome
statusReport the session, browser, page, safety mode and storage scope
closeStop the browser; a persistent profile keeps its state
destroyClose the session and delete its managed state
Terminal window
blop-browser tools
blop-browser describe browser_click
blop-browser call browser_click --input '{"target":{"ref":"e13"}}' --json
CommandEffect
toolsList every tool
describe TOOLPrint a tool’s description and JSON Schema
call TOOL --input JSONCall any tool

With --json, success returns {"ok": true, "result": …}. Failure returns {"ok": false, "error": …} and exits nonzero.

CommandEffect
doctor [--json]Report available browsers, configuration and the daemon
config --mode MODESave the default browser mode (table in the next section)
config --anti-bot on|offSave the Camoufox default
install camoufoxDownload Camoufox
skill show, skill install --target agents|claude|opencode|all [--scope project|user]Print or install the agent skill
data list, data delete SESSIONList retained session data, or delete one session’s data
ModeBrowser
chromium-headlessManaged Chromium, no window. Default for agents and CI.
chromium-headedManaged Chromium with a window
chrome-cdpExisting Chrome, with --cdp-endpoint URL
camoufox-headless, camoufox-headedCamoufox

Use Chromium for deterministic testing of apps you control. Camoufox is an optional third-party Firefox-based browser; install it with blop-browser install camoufox only when a site you are authorised to automate rejects automated Chromium.

Start Chrome with debugging bound to localhost and a dedicated profile, then attach:

Terminal window
google-chrome \
--remote-debugging-address=127.0.0.1 \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/blop-chrome
blop-browser --session chrome --attach-existing \
--cdp-endpoint http://127.0.0.1:9222 snapshot
blop-browser --session chrome open https://example.com
blop-browser --session chrome close

Later commands reuse the connection. close disconnects without closing Chrome.

VariableDefaultEffect
BLOP_BROWSER_SESSIONdefaultSession name
BLOP_BROWSERchromiumchromium or camoufox
BLOP_BROWSER_HEADLESS10 shows the browser window
BLOP_BROWSER_CDP_ENDPOINTunsetHTTP, HTTPS, WS or WSS CDP endpoint; still needs --attach-existing
BLOP_BROWSER_EXECUTABLE_PATHauto-detectChrome or Chromium executable
BLOP_BROWSER_IDLE_TIMEOUT_MS1800000 (30 minutes)Daemon idle timeout
BLOP_BROWSER_READ_ONLYunset1 on the command that starts a session denies clicks, typing, forms, uploads and page closing
BLOP_BROWSER_RUNTIME_DIROS temporary directoryDaemon state, profiles and artifacts

The Browser Harness README lists the remaining variables.