Skip to main content
The Browser Use CLI (browser-use) gives coding agents a direct browser-control surface backed by Browser Harness:
  • Direct browser control — agents run Python to do actions in the browser.
  • Three browser modes — you can use with local Chrome or Chromium with your existing tabs, cookies, extensions, and logins; Browser Use cloud browsers; or any browser reachable through a CDP endpoint.
  • Agent-ready setup — install the skill into Claude Code, Codex, and other coding agents so they know when and how to call the CLI.
To try the hosted agent directly, use Browser Use Cloud, or install the skill.

Install the CLI

uv tool install browser-use
browser-use --help
For one-off runs without a permanent tool install, use uvx browser-use.

Set Up Your Agent

Paste this setup prompt into Claude Code, Codex, or another coding agent:
Install or upgrade browser-use with `uv tool install --python 3.12 --upgrade --force 'browser-use @ git+https://github.com/browser-use/browser-use.git'`, run `browser-use skill install`, and connect it to my browser. Follow https://github.com/browser-use/browser-use if setup or connection fails.
The skill is discoverable from skills.sh.

Use Python Directly

Pass Python to the CLI. Use uvx browser-use for one-off runs, or browser-use if you installed it:
uvx browser-use <<'PY'
new_tab("https://example.com")
print(page_info())
PY
The <<'PY' form is for Unix-compatible shells such as bash, zsh, Git Bash, or WSL. In PowerShell, pipe a here-string instead:
@'
new_tab("https://example.com")
print(page_info())
'@ | uvx browser-use

Local Browser Setup

The default local flow attaches to your running Chrome or Chromium through CDP. This preserves the browser state the user already has locally: open tabs, cookies, extensions, and logged-in sessions. It is the right default for desktop work where the user can approve Chrome’s remote-debugging prompt. You can also point the CLI at any existing CDP browser by setting BU_CDP_URL or BU_CDP_WS before running browser-use. Use that for managed Chrome instances, Playwright-launched browsers, or infrastructure that already exposes a DevTools endpoint. If the CLI cannot connect, run:
browser-use --doctor
If Chrome asks whether to allow remote debugging, approve it and rerun the command.

Cloud Browsers

Use Browser Use cloud browsers when the agent runs on a headless machine, needs an isolated browser, needs parallel browser sessions, or needs Browser Use Cloud features such as persistent cloud profiles, proxy routing, CAPTCHA handling, and live browser viewing. The Browser Harness-backed CLI keeps cloud sessions explicit. You authenticate once, start a named cloud browser, then use that name for later commands:
browser-use auth login
browser-use <<'PY'
start_remote_daemon("work")
PY

BU_NAME=work browser-use <<'PY'
new_tab("https://example.com")
print(page_info())
PY
Use short, task-specific names when you have multiple agents or sub-agents running in parallel. Each name maps to its own remote browser daemon. Remote browsers bill until they stop or time out. When the task is done, ask whether to close the browser; if yes, run:
BU_NAME=work browser-use <<'PY'
stop_remote_daemon("work")
PY

Useful Commands

browser-use --help
browser-use --doctor
browser-use auth login
browser-use auth status
browser-use skill show
browser-use telemetry status