Download Latest Version 0.12.5 source code.tar.gz (4.3 MB)
Email in envelope

Get an email when there's a new version of Browser Use

Home / 0.12.3
Name Modified Size InfoDownloads / Week
Parent folder
0.12.3 - Browser Use CLI 2.0 source code.tar.gz 2026-03-23 4.3 MB
0.12.3 - Browser Use CLI 2.0 source code.zip 2026-03-23 4.6 MB
README.md 2026-03-23 9.6 kB
Totals: 3 Items   8.9 MB 0

Browser Use CLI 2.0

The fastest browser automation for AI coding agents. 2x faster, 50% fewer tokens, and works with any CLI agent — Claude Code, Codex, and more.

Built on direct CDP (Chrome DevTools Protocol) instead of Playwright, giving ~50ms command latency via a persistent background daemon.

https://github.com/user-attachments/assets/a604895b-4ff9-47be-8161-56c48773f93b

Install

:::bash
# Install the CLI
curl -fsSL https://browser-use.com/cli/install.sh | bash

# Install the skill (for Claude Code / Codex)
mkdir -p ~/.claude/skills/browser-use
curl -o ~/.claude/skills/browser-use/SKILL.md \
  https://raw.githubusercontent.com/browser-use/browser-use/main/skills/browser-use/SKILL.md

Works with any CLI coding agent — Claude Code, Codex, OpenClaw, and more. Just install the CLI and the skill.


Quick Start

:::bash
browser-use open https://example.com   # Navigate (starts browser if needed)
browser-use state                      # Returns clickable elements: [0] button "Submit", [1] input "Email"...
browser-use click 0                    # Click by index
browser-use input 3 "hello@example.com" # Click element, then type
browser-use type "search query"        # Type into focused element
browser-use screenshot page.png        # See the page
browser-use close                      # Done

The CLI uses element indices from state — no selectors to maintain. browser-use state is optimized for agents: fast, token-efficient, and returns every interactable element on the page.


🖥️ Browser Modes

Mode Command Description
Headless browser-use open <url> Default, fast, invisible
Headed browser-use --headed open <url> Visible window for debugging
Real Chrome browser-use --profile "Default" open <url> Your Chrome with existing logins & cookies
Connect browser-use --connect open <url> Auto-discover and attach to running Chrome via CDP
CDP URL browser-use --cdp-url ws://localhost:9222/... open <url> Connect to any browser via CDP URL
☁️ Cloud browser-use cloud connect Stealth cloud browser + proxies included

Chrome only. The CLI uses Chrome DevTools Protocol (CDP), which is Chrome/Chromium-specific. Safari and Firefox are not supported.

Cloud browser requires BROWSER_USE_API_KEY from cloud.browser-use.com. Cloud gives you agent-ready browsers with anti-detection, proxies, and massive parallelization.


🔗 Connect to Running Chrome

One of the most requested features — connect to your already-running Chrome with all your logins, cookies, and extensions:

:::bash
# Auto-discover running Chrome's CDP endpoint
browser-use --connect open https://github.com

# Or use an existing Chrome profile directly
browser-use --profile "Default" open https://github.com    # Already logged in!
browser-use --profile "Profile 1" open https://gmail.com   # Named profile

# List available profiles
browser-use profile list

Tip for WSL2 users: Add browser-use --cdp-url to your CLAUDE.md to control the host browser from WSL2.


🔀 Multiple Sessions

:::bash
browser-use -s work open https://work.example.com
browser-use -s personal open https://gmail.com
browser-use sessions       # List all
browser-use close --all    # Close all

📤 Forms, Uploads & Interactions

The CLI excels at form filling and complex interactions:

:::bash
browser-use input 5 "user@example.com"   # Fill email field
browser-use input 6 "password123"        # Fill password
browser-use click 7                      # Submit button
browser-use select 3 "United States"     # Dropdown selection
browser-use upload 4 ./resume.pdf        # Upload a file
browser-use hover 2                      # Hover over element
browser-use keys "Enter"                 # Send keyboard keys

📊 Data Extraction

:::bash
browser-use get title                    # Page title
browser-use get html --selector "table"  # Scoped HTML
browser-use get text 5                   # Element text
browser-use eval "document.title"        # Run JavaScript
browser-use screenshot --full page.png   # Full-page screenshot

🐍 Persistent Python Session

:::bash
browser-use python "browser.goto('https://example.com')"
browser-use python "items = browser.html"
browser-use python "print(len(items))"    # Variables persist across calls
browser-use python --vars                  # Show defined variables

🌐 Tunnels (Expose Local Dev)

:::bash
browser-use tunnel 3000                   # → https://abc.trycloudflare.com
browser-use open https://abc.trycloudflare.com
browser-use tunnel stop --all

How It Works

The CLI doesn't use screenshots or image detection. Instead, it directly reads the browser's DOM tree via CDP and returns structured, token-efficient element data. Your coding agent processes the content; the CLI handles browser context and command execution. Every command shares the same battle-tested implementation as the browser-use Python library.

Architecture: A background daemon keeps the browser alive between commands, so there's no startup cost per command — just ~50ms latency.


FAQ

Does it work with Codex / other CLI agents? Yes — it works with any CLI coding agent. Install the CLI and the skill file.

Can it run headless? Yes, headless is the default. Use --headed when you want to see the browser.

How does it compare to the Claude Chrome extension? The Browser Use CLI is also free, faster and more token efficient, doesn't require a Chrome extension, and works with any CLI agent (not just Claude).

How does it compare to Vercel Agent Browser? 2x the speed for half the cost with half the commands.

Does it work with Safari/Firefox? No — it uses Chrome DevTools Protocol (CDP), which is Chrome/Chromium only.

Can it upload files? Yes! Use browser-use upload <index> <path>.

What about security/pentesting? Yes — popular use cases include form filling, QA/pentesting, and general web automation.


What's Changed

New Contributors

Full Changelog: https://github.com/browser-use/browser-use/compare/0.12.2...0.12.3

Source: README.md, updated 2026-03-23