Skip to content

Getting Started

Installation

Install the Python package and the Chromium browser:

Terminal window
pip install brow-cli
playwright install chromium

Verify the installation:

Terminal window
brow --help

Configuration

brow reads a small set of environment variables:

VariableDefaultDescription
BROW_HOME~/.browData directory (profiles, states, screenshots)
BROW_PORT19987Daemon HTTP port
BROW_MAX_SESSIONS10Maximum concurrent browser sessions

Your first session

Headless (default)

Terminal window
brow session new # → 1
brow navigate -s 1 "https://example.com"
brow snapshot -s 1
brow session delete 1

Headed (visible browser)

Add --headed to see the Chromium window. Useful for debugging and for sites that block headless browsers:

Terminal window
brow session new --headed
brow navigate -s 1 "https://example.com"
brow session delete 1

The daemon

brow runs a local FastAPI daemon on port 19987. It starts automatically on the first command that needs it — you never have to start it manually.

Terminal window
brow daemon status # check if running
brow daemon stop # stop it
brow daemon start --wait # start and block until ready

The daemon survives individual CLI invocations. Sessions you create persist until you delete them or stop the daemon.

Selectors

brow uses Playwright’s selector syntax. The most useful forms:

SelectorExample
CSS#submit, button.primary, input[type="email"]
Texttext=Sign In
Rolerole=button[name="Save"]
Ref (from snapshot)--ref 15

The snapshot command annotates interactive elements with a numeric ref. You can use --ref N instead of a selector for any click/fill/select command.

Persistent profiles

Log in once, reuse forever. See the Persistent Login tutorial for a complete walkthrough.