README.md

March 18, 2026 · View on GitHub

browser

The fastest, most token-efficient way for AI agents to control Chrome.

Benchmarks in progress: Early testing shows 3x faster than agent-browser for a variety of usecases, but does not yet support as wide of a feature set.

Release Build status License

browser demo

Experimental: Commands are stable, but their output format is subject to change as we optimize for AI agent effectiveness.

Platform Support: Confirmed working on macOS. Linux and Windows support is untested—please open an issue if you encounter problems.

Install

curl -fsSL https://raw.githubusercontent.com/camhahu/browser/main/packages/cli/install.sh | bash

Point your agent to the skill file to get started, or install it directly:

browser add-skill opencode            # Add to current project
browser add-skill --global opencode   # Add globally

browser add-skill amp        # Amp
browser add-skill codex      # OpenAI Codex
browser add-skill claude     # Claude Code
browser add-skill cursor     # Cursor
browser add-skill goose      # Goose
browser add-skill github     # GitHub Copilot
browser add-skill vscode     # VS Code

Update

browser update

Example

browser open https://example.com                      # Opens page, shows outline
browser click "Products" && browser text ".product-list"
browser stop

Commands

Browser Control

CommandDescription
start [--headed|--headless] [--software-rendering] [--chrome-arg <arg>]...Start browser (default: headed)
stopStop the browser
CommandDescription
open <url>Open URL in new tab (auto-starts headless browser)
navigate <url>Navigate active tab to URL
backGo back in history
forwardGo forward in history
refreshReload active tab

Tab Management

CommandDescription
tabsList all open tabs
activePrint active tab ID
use <tab-id>Switch to specific tab
close [tab-id]Close tab (default: active)

Interaction

CommandDescription
click <selector>Click element (label, text, or CSS)
type <text> [selector]Type text or send keys (e.g. Enter, ctrl+c)
hover <selector>Move mouse to element
drag <source> <target>Drag element to another element
select <selector> <value>Select dropdown option
scroll <target>Scroll to top, bottom, or CSS selector
wait <selector>Wait for element (15s timeout)

Content Extraction

CommandDescription
outline [-a [depth]]Show interactive elements (or all with -a)
text [-l chars] [selector]Get text content (default: 2000 chars)
html [-l chars] [selector]Get HTML content
find <selector>Find elements matching selector
urlPrint active tab URL
titlePrint active tab title

Screenshots

CommandDescription
screenshot [-f format] [-o path] [name]Capture screenshot (png/jpeg/webp)

Debugging

CommandDescription
console [-l count] [-t types]Show console output
network [-f pattern] [-t types] [id]List/inspect network requests
eval <js>Evaluate JavaScript

State & Storage

CommandDescription
cookies [name]List cookies or get specific value
storage [key]List localStorage or get specific value

Viewport & User Agent

CommandDescription
viewport desktop|tablet|mobileSet viewport preset
viewport set <width> <height>Set custom viewport
useragent macos|windows|iphone|androidSet user agent preset
useragent custom <string>Set custom user agent

Configuration

CommandDescription
configShow all config
config set <key> <value>Set config value
config unset <key>Remove config value
config clear-profileClear browser profile (cookies, logins)

Utilities

CommandDescription
add-skill <target>Install skill file for AI agent
updateUpdate to latest version

Selectors

browser click l3              # Label from outline (fastest)
browser click "Sign up"       # Text match (exact first, then partial)
browser click ".btn-primary"  # CSS selector

Skill File

See packages/cli/skill/SKILL.md for the AI agent skill file with usage patterns.

Telemetry

We collect anonymous usage data to improve the tool. See docs/TELEMETRY.md for details on what we collect and how to opt out.

Contributing

See docs/TODO.md for planned features and docs/BUGS.md for known issues.

bun install
bun run build
bun run test

The build outputs to ./dist/browser. You can symlink it for local testing:

sudo ln -s $(pwd)/dist/browser /usr/local/bin/browser

License

MIT