browser-use) is the command-line interface for the Browser Use platform. It does two things:
- Direct browser control — navigate pages, click elements, fill forms, upload files, take screenshots, run JavaScript. Supports three browser modes: managed headless Chromium, real Chrome with existing user profiles and logins, and cloud-hosted browsers via the Browser Use Cloud API. A persistent background daemon keeps the browser alive between commands for fast ~50ms latency.
- Cloud platform management — a generic REST passthrough to the Browser Use API (v2 and v3) for managing agent tasks, cloud browser sessions, profiles, workspaces, files, skills, and billing. Anything available in the cloud dashboard is accessible from the terminal.
state to get numbered element indices, then interact using those indices. The cloud workflow is: cloud login to authenticate, then use cloud v2/cloud v3 commands to hit any API endpoint, or cloud connect to provision and drive a cloud browser directly.
Installation
Prerequisites
| Platform | Requirements |
|---|---|
| macOS | Python 3.11+ (installer will use Homebrew if needed) |
| Linux | Python 3.11+ (installer will use apt if needed) |
| Windows | Git for Windows, Python 3.11+ |
One-Line Install (Recommended)
macOS / Linux:Install the Skill
The CLI is most powerful when paired with its skill, which gives your coding agent full context on every command, flag, and workflow. It is highly recommended to install the skill alongside the CLI:Post-Install
Manual Installation
If you prefer not to use the one-line installer:From Source
Quick Start
Browser Modes
All Commands
Navigation
| Command | Description |
|---|---|
open <url> | Navigate to URL |
back | Go back in history |
scroll down | Scroll down |
scroll up | Scroll up |
scroll down --amount 1000 | Scroll by pixels |
Inspection
| Command | Description |
|---|---|
state | Get URL, title, and clickable elements |
screenshot [path] | Take screenshot (base64 if no path) |
screenshot --full path.png | Full page screenshot |
Interaction
| Command | Description |
|---|---|
click <index> | Click element by index |
click <x> <y> | Click at pixel coordinates |
type "text" | Type into focused element |
input <index> "text" | Click element, then type |
keys "Enter" | Send keyboard keys |
keys "Control+a" | Send key combination |
select <index> "value" | Select dropdown option |
upload <index> <path> | Upload file to file input element |
hover <index> | Hover over element |
dblclick <index> | Double-click element |
rightclick <index> | Right-click element |
Tabs
| Command | Description |
|---|---|
switch <tab> | Switch to tab by index |
close-tab | Close current tab |
close-tab <tab> | Close specific tab |
Cookies
| Command | Description |
|---|---|
cookies get | Get all cookies |
cookies get --url <url> | Get cookies for URL |
cookies set <name> <value> | Set a cookie |
cookies set name val --domain .example.com --secure | Set with options |
cookies set name val --same-site Strict | SameSite: Strict, Lax, None |
cookies set name val --expires 1735689600 | Set expiration timestamp |
cookies clear | Clear all cookies |
cookies clear --url <url> | Clear cookies for URL |
cookies export <file> | Export to JSON file |
cookies import <file> | Import from JSON file |
Wait
| Command | Description |
|---|---|
wait selector "css" | Wait for element to be visible |
wait selector ".loading" --state hidden | Wait for element to disappear |
wait text "Success" | Wait for text to appear |
wait selector "h1" --timeout 5000 | Custom timeout (ms) |
Get (Information Retrieval)
| Command | Description |
|---|---|
get title | Get page title |
get html | Get full page HTML |
get html --selector "h1" | Get HTML of element |
get text <index> | Get text content of element |
get value <index> | Get value of input/textarea |
get attributes <index> | Get all attributes of element |
get bbox <index> | Get bounding box (x, y, width, height) |
JavaScript & Data
| Command | Description |
|---|---|
eval "js code" | Execute JavaScript |
extract "query" | Extract data with LLM (not yet implemented) |
Python (Persistent Session)
Cloud API
Generic REST passthrough to the Browser-Use Cloud API, plus cloud browser provisioning.| Command | Description |
|---|---|
cloud connect | Provision cloud browser and connect |
cloud connect --timeout 120 | Cloud browser with custom timeout |
cloud connect --proxy-country US | Cloud browser with proxy |
cloud connect --profile-id <id> | Cloud browser with profile |
cloud login <api-key> | Save API key |
cloud logout | Remove API key |
cloud v2 GET <path> | GET request to API v2 |
cloud v2 POST <path> '<json>' | POST request to API v2 |
cloud v3 POST <path> '<json>' | POST request to API v3 |
cloud v2 poll <task-id> | Poll task until done |
cloud v2 --help | Show API v2 endpoints (from OpenAPI spec) |
cloud v3 --help | Show API v3 endpoints |
~/.browser-use/config.json with 0600 permissions.
Tunnels
Expose local dev servers to cloud browsers via Cloudflare tunnels.| Command | Description |
|---|---|
tunnel <port> | Start tunnel, get public URL |
tunnel list | List active tunnels |
tunnel stop <port> | Stop tunnel for port |
tunnel stop --all | Stop all tunnels |
Profile Management
Theprofile subcommand delegates to the profile-use Go binary, which syncs local browser cookies to Browser-Use cloud.
The binary is managed at ~/.browser-use/bin/profile-use and auto-downloaded on first use.
| Command | Description |
|---|---|
profile | Interactive sync wizard |
profile list | List detected browsers and profiles |
profile sync --all | Sync all profiles to cloud |
profile sync --browser "Google Chrome" --profile "Default" | Sync specific profile |
profile auth --apikey <key> | Set API key (shared with cloud login) |
profile inspect --browser "Google Chrome" --profile "Default" | Inspect cookies locally |
profile update | Download/update the profile-use binary |
Session Management
| Command | Description |
|---|---|
sessions | List active browser sessions |
close | Close current session’s browser and daemon |
close --all | Close all sessions |
--session NAME | Target a named session (default: “default”) |
Global Options
| Option | Description |
|---|---|
--headed | Show browser window |
--profile [NAME] | Use real Chrome (bare --profile uses “Default”) |
--connect | Auto-discover and connect to running Chrome via CDP |
--cdp-url <url> | Connect to existing browser via CDP URL (http:// or ws://) |
--session NAME | Target a named session (default: “default”, env: BROWSER_USE_SESSION) |
--json | Output as JSON |
--mcp | Run as MCP server via stdin/stdout |
Examples
Fill a Form
Extract Data with JavaScript
Python Automation
Generate Templates
How It Works
The CLI uses a multi-session daemon architecture:- First command starts a background daemon for that session (browser stays open)
- Subsequent commands communicate via Unix socket (or TCP on Windows)
- Browser persists across commands for fast interaction
- Each
--sessiongets its own daemon, socket, and PID file in~/.browser-use/ - Daemon auto-starts when needed, auto-exits when browser dies, or stops with
browser-use close
File Layout
All CLI-managed files live under~/.browser-use/ (override with BROWSER_USE_HOME):
Windows Troubleshooting
ARM64 Windows (Surface Pro X, Snapdragon laptops)
ARM64 Windows (Surface Pro X, Snapdragon laptops)
Install x64 Python (runs via emulation):
Multiple Python versions
Multiple Python versions
Set the version explicitly:
PATH not working after install
PATH not working after install
Restart your terminal. If still not working:
Failed to start daemon error
Failed to start daemon error
Kill zombie processes:
Stale virtual environment
Stale virtual environment
Delete and reinstall: