System requirements
| Requirement | Details |
|---|
| Node.js | v22 or later |
| OS | macOS or Linux |
| Browser | Chromium (installed automatically by Playwright) |
Install the CLI
Install @browserwire/cli globally via npm:
npm install -g @browserwire/cli
This makes the bw command available in your terminal. The postinstall script automatically downloads Playwright and a bundled Chromium browser.
You can also run commands without a global install using npx @browserwire/cli <command>.
Verify the installation:
Create an account and authenticate
BrowserWire requires an account for recording and training. Run:
This opens your default browser to the BrowserWire sign-in page at app.browserwire.io. If you don’t have an account yet, click Sign up — you can register with email or an OAuth provider (Google, GitHub, etc.).
After you authenticate in the browser:
- The browser shows “Logged in successfully!” — you can close the tab
- Your terminal confirms:
Logged in as you@example.com
- A session token is saved to
~/.config/browserwire/config.json (file permissions 0600)
The token is valid for 30 days. When it expires, bw record will automatically prompt you to re-authenticate before uploading — you won’t lose your recording.
If the browser doesn’t open automatically, the CLI prints a URL you can copy and visit manually. The login flow has a 120-second timeout.
CI / automation
For headless environments where interactive login isn’t possible, set the BW_TOKEN environment variable:
export BW_TOKEN="your-session-token"
When BW_TOKEN is set, the CLI uses it directly and skips the config file.
Configuration
The CLI reads configuration from these sources, in order of precedence:
| Source | Example |
|---|
| Environment variables | BW_TOKEN, BW_API_URL |
| Config file | ~/.config/browserwire/config.json |
| CLI flags | --port, --headless, --max-concurrent |
Environment variables
| Variable | Description | Default |
|---|
BW_TOKEN | Session token (overrides config file) | — |
BW_API_URL | Backend API URL | https://app.browserwire.io |
Config file
The config file is managed by bw login and stored at:
~/.config/browserwire/config.json
Or $XDG_CONFIG_HOME/browserwire/config.json if XDG_CONFIG_HOME is set.
{
"sessionToken": "eyJhbGciOi..."
}
The config file contains your session token. It is created with 0600 permissions (owner-only read/write). Do not commit it to version control.
Uninstall
npm uninstall -g @browserwire/cli
rm -rf ~/.config/browserwire