Skip to main content
The browser-use CLI is for coding agents. The agent pipes Python to it, and the CLI runs it against a browser with Browser Harness helpers and raw CDP. It attaches to your Chrome when available, or starts its own Chromium when it cannot (no display, remote debugging off, no usable Chrome). It also drives Browser Use cloud browsers or any CDP endpoint. The CLI runs Python, not agent tasks: there is no browser-use run "<task>". To run an agent from your code, use the library.

Install

For one-off runs without installing, use uvx --from 'browser-use==1.0.6' browser-use. Pin the exact version with ==, never >=: browser-use moves fast, and a new release can break your setup.

Set up your coding agent

Paste this into Claude Code, Codex or another coding agent:
browser-use skill install writes the skill to ~/.agents and to each supported agent you have installed: claude, codex, copilot, cursor, gemini, openclaw, opencode. Use --target NAME for one, or --path DIR for a custom location. browser-use skill show prints it. Installation overwrites the selected SKILL.md files. --install-cli also installs this exact version as a uv tool; without it, installing the skill does not replace your CLI. More skills: Agent skills.

Run Python

Helpers are pre-imported, and the daemon starts and attaches by itself. The <<'PY' form is for bash, zsh, Git Bash or WSL. In PowerShell, pipe a here-string:

Your Chrome

When your Chrome is available with remote debugging enabled, the CLI attaches to it with its tabs, cookies and logins. Otherwise it starts its own Chromium on a temporary profile (headless without a display) and reuses it on later calls. browser-use --reload closes that Chromium and tries your Chrome again. Explicit CDP endpoints and existing cloud daemons are used as configured. The first time, Chrome asks whether to allow remote debugging: click Allow, or on macOS run browser-use mac-approve. If it can’t connect:
To use another browser with a DevTools endpoint, set BU_CDP_URL (or BU_CDP_WS), with a BU_NAME so it doesn’t reuse the daemon attached to your Chrome:

Cloud browsers

Use a cloud browser on a headless machine, for parallel agents, or for stealth, proxies, CAPTCHA solving and cloud profiles. Sign in once:
Or set BROWSER_USE_API_KEY instead (create a key at cloud.browser-use.com/new-api-key). When it is set, it wins over the stored key. Then start a named cloud browser and use the name for later calls:
Each name is its own browser, so parallel agents use different names. A cloud browser bills until it stops or times out. Once a name has run a cloud browser, it never falls back to your local Chrome; BU_NAME=<name> browser-use --reload resets it.

Commands

When a call cannot reach a browser, the CLI checks PyPI for a newer release at most once a day and names it. BROWSER_USE_NO_UPDATE_CHECK=1 disables that check. http_get() runs from this machine, without the fetch-use proxy, even with a Browser Use key. The browser’s proxy does not apply to Python networking. Update by installing the new exact version: uv tool install 'browser-use==<version>'. The 0.x subcommands (open, state, click, run, …) print what replaced them. Try the same agent behind the CLI fully hosted in Browser Use Cloud.