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.
Try out Browser Use CLI with an agent in Browser Use Cloud, or install the skill to try it yourself locally.

Install the CLI

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:
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:
The <<'PY' form is for Unix-compatible shells such as bash, zsh, Git Bash, or WSL. In PowerShell, pipe a here-string instead:

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:
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:
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:

Useful Commands