Skip to main content

Installation

The CLI is available as the bw command. Requires Node.js 22+ on macOS or Linux.

bw login

Authenticate with BrowserWire via your browser.
Opens your default browser to the BrowserWire sign-in page. After authentication, a session token is saved to ~/.config/browserwire/config.json with 0600 permissions. The token is valid for 30 days. If the browser doesn’t open automatically, the CLI prints a URL you can visit manually. Timeout: 120 seconds. If authentication isn’t completed in time, the command exits with an error.

bw record <url>

Open a browser, navigate to a URL, and record a session.

How it works

  1. Launches a Chrome browser and navigates to the URL
  2. You browse freely — recording hasn’t started yet
  3. Press Enter to start recording (page reloads for a clean snapshot)
  4. Interact with the site — every DOM mutation, click, keystroke, and navigation is captured
  5. Press Enter to stop recording
  6. Events are uploaded and a training run is triggered automatically
  7. The dashboard opens in your browser to the recording detail page

Terminal output

Authentication

If your session token is missing or expired, the CLI prompts you to log in before uploading. You won’t lose your recording — the auth flow runs after the session is captured.

New tabs

Links that would open in a new tab are redirected into the current page so the recording stays continuous.

bw run

Start a local execution server that serves your discovered APIs.

Flags

What it does

  1. Verifies you’re logged in (exits with error if not)
  2. Fetches all your manifests from the BrowserWire API
  3. Launches a persistent Chrome browser (headed by default)
  4. Starts an HTTP server on 127.0.0.1:<port>

Endpoints served

Examples

Start with defaults (port 8787, headed, 3 concurrent):
Start on a different port in headless mode:
Allow more concurrent executions:

Concurrency

Each API request opens a new browser page. If the maximum concurrent limit is reached, additional requests receive a 429 Too Many Requests response. Increase --max-concurrent if you need more parallelism.

Graceful shutdown

Press Ctrl+C to stop the server. The browser is closed and the process exits cleanly.

bw --version

Print the CLI version.

bw --help

Show usage information for all commands.

Environment variables