| name | browser-use |
| description | Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages. |
| allowed-tools | Bash(browser-use:*) |
Browser Automation with browser-use CLI
The browser-use command provides fast, persistent browser automation. A background daemon keeps the browser open across commands, giving ~50ms latency per call.
Prerequisites
browser-use doctor
For setup details, see https://github.com/browser-use/browser-use/blob/main/browser_use/skill_cli/README.md
Core Workflow
- Navigate:
browser-use open <url> — launches headless browser and opens page
- Inspect:
browser-use state — returns clickable elements with indices
- Interact: use indices from state (
browser-use click 5, browser-use input 3 "text")
- Verify:
browser-use state or browser-use screenshot to confirm
- Repeat: browser stays open between commands
If a command fails, run browser-use close first to clear any broken session, then retry.
To use the user's existing Chrome (preserves logins/cookies): run browser-use connect first.
To use a cloud browser instead: run browser-use cloud connect first.
After either, commands work the same way.
If browser-use connect fails
When browser-use connect cannot find a running Chrome with remote debugging, prompt the user with two options:
- Use their real Chrome browser — they need to enable remote debugging first:
- Open
chrome://inspect/#remote-debugging in Chrome, or relaunch Chrome with --remote-debugging-port=9222
- Then retry
browser-use connect
- Use managed Chromium with their Chrome profile — no Chrome setup needed:
- Run
browser-use profile list to show available profiles
- Ask which profile they want, then use
browser-use --profile "ProfileName" open <url>
- This launches a separate Chromium instance with their profile data (cookies, logins, extensions)
Let the user choose — don't assume one path over the other.
Browser Modes
browser-use open <url>
browser-use --headed open <url>
browser-use connect
browser-use cloud connect
browser-use --profile "Default" open <url>
After connect or cloud connect, all subsequent commands go to that browser — no extra flags needed.
Commands
browser-use open <url>
browser-use back
browser-use scroll down
browser-use scroll up
browser-use tab list
browser-use tab new [url]
browser-use tab switch <index>
browser-use tab close <index> [index...]
browser-use state
browser-use screenshot [path.png]
browser-use click <index>
browser-use click <x> <y>
browser-use type "text"
browser-use input <index> "text"
browser-use input <index> ""
browser-use keys "Enter"
browser-use select <index> "option"
browser-use upload <index> <path>
browser-use hover <index>
browser-use dblclick <index>
browser-use rightclick <index>
browser-use eval "js code"
browser-use get title
browser-use get html [--selector "h1"]
browser-use get text <index>
browser-use get value <index>
browser-use get attributes <index>
browser-use get bbox <index>
browser-use wait selector "css"
browser-use wait text "text"
browser-use cookies get [--url <url>]
browser-use cookies set <name> <value>
browser-use cookies clear [--url <url>]
browser-use cookies export <file>
browser-use cookies import <file>
browser-use close
browser-use sessions
browser-use close --all
For advanced browser control (CDP, device emulation, tab activation), see references/cdp-python.md.
Cloud API
browser-use cloud connect
browser-use cloud login <api-key>
browser-use cloud logout
browser-use cloud v2 GET /browsers
browser-use cloud v2 POST /tasks '{"task":"...","url":"..."}'
browser-use cloud v2 poll <task-id>
browser-use cloud v2 --help
cloud connect provisions a cloud browser with a persistent profile (auto-created on first use), connects via CDP, and prints a live URL. browser-use close disconnects AND stops the cloud browser. For custom browser settings (proxy, timeout, specific profile), use cloud v2 POST /browsers directly with the desired parameters.
Agent Self-Registration
Only use this if you don't already have an API key (check browser-use doctor to see if api_key is set). If already logged in, skip this entirely.
browser-use cloud signup — get a challenge
- Solve the challenge
browser-use cloud signup --verify <challenge-id> <answer> — verify and save API key
browser-use cloud signup --claim — generate URL for a human to claim the account
Tunnels
browser-use tunnel <port>
browser-use tunnel list
browser-use tunnel stop <port>
browser-use tunnel stop --all
Profile Management
browser-use profile list
browser-use profile sync --all
browser-use profile update
Command Chaining
Commands can be chained with &&. The browser persists via the daemon, so chaining is safe and efficient.
browser-use open https://example.com && browser-use state
browser-use input 5 "user@example.com" && browser-use input 6 "password" && browser-use click 7
Chain when you don't need intermediate output. Run separately when you need to parse state to discover indices first.
Common Workflows
Authenticated Browsing
When a task requires an authenticated site (Gmail, GitHub, internal tools), use Chrome profiles:
browser-use profile list
browser-use --profile "Default" open https://github.com
Exposing Local Dev Servers
browser-use tunnel 3000
browser-use open https://abc.trycloudflare.com
Multiple Browsers
For subagent workflows or running multiple browsers in parallel, use --session NAME. Each session gets its own browser. See references/multi-session.md.
Configuration
browser-use config list
browser-use config set cloud_connect_proxy jp
browser-use config get cloud_connect_proxy
browser-use config unset cloud_connect_timeout
browser-use doctor
browser-use setup
Config stored in ~/.browser-use/config.json.
Global Options
| Option | Description |
|---|
--headed | Show browser window |
--profile [NAME] | Use real Chrome (bare --profile uses "Default") |
--cdp-url <url> | Connect via CDP URL (http:// or ws://) |
--session NAME | Target a named session (default: "default") |
--json | Output as JSON |
--mcp | Run as MCP server via stdin/stdout |
Tips
- Always run
state first to see available elements and their indices
- Use
--headed for debugging to see what the browser is doing
- Sessions persist — browser stays open between commands
- CLI aliases:
bu, browser, and browseruse all work
- If commands fail, run
browser-use close first, then retry
Troubleshooting
- Browser won't start?
browser-use close then browser-use --headed open <url>
- Element not found?
browser-use scroll down then browser-use state
- Run diagnostics:
browser-use doctor
Cleanup
browser-use close
browser-use tunnel stop --all