Repolode
keon

keon/browser-control

A small Rust CLI that drives a real Chrome browser over the Chrome DevTools Protocol, designed for shell-based coding agents.

Stars
3,152
Forks
210
Open issues
1
Last commit
2 months ago

What is it?

browser-control is a command-line tool written in Rust that exposes a browser as a set of shell subcommands. It can launch or connect to a local Chrome instance, take page snapshots that assign stable element refs such as @e1 and @e2, and then click, fill, type, scroll, or upload against those refs. CSS selectors and x,y coordinates are also accepted as targets.

The tool targets coding agents that already run shell commands. Anything the high-level commands cannot express can be reached through the raw eval and cdp commands. A background daemon keeps in-memory event, network, and console history, and failed commands write compact trace files under a workspace directory to help diagnose problems.

Besides local Chrome, it can start and stop remote sessions on Browser Use, Steel, Hyperbrowser, and Browserbase, or on any other CDP-compatible provider configured through environment variables. Installation is available via cargo install, prebuilt binaries, or building from source.

Key features

  • 01Snapshot returns stable element refs that can be used directly in click, fill, and other actions.
  • 02Every capability is a shell subcommand printing compact text or JSON.
  • 03Raw CDP access through eval and cdp commands covers operations not wrapped by helpers.
  • 04A background daemon keeps recent events, network requests, and console messages.
  • 05Failed commands write diagnostic traces under the workspace directory.
  • 06Supports local Chrome and cloud browser providers with the same commands.

Use cases

  • Letting a coding agent inspect and interact with a web page from its shell.
  • Scripting repeatable browser steps such as logins or form filling in a shell pipeline.
  • Running a browser session on a cloud provider like Browser Use or Steel from the command line.
  • Debugging a browser automation flow by reviewing the saved failure traces.

Quick start

  1. 1

    Install the CLI from crates.io

    cargo install browser-control-cli
  2. 2

    Create the workspace and launch Chrome on an example page

    browser-control init && browser-control launch https://example.com
  3. 3

    Take a snapshot of the page to list actionable element refs

    browser-control snapshot

Things to know

  • Needs a local Chrome or Chromium build, or a paid cloud provider API key for remote sessions.
  • The crate is named browser-control-cli because the shorter name was taken.

In collections

Topics

FAQ

What is browser-control?
A small Rust CLI that drives a real Chrome browser over the Chrome DevTools Protocol, designed for shell-based coding agents. browser-control is a command-line tool written in Rust that exposes a browser as a set of shell subcommands. It can launch or connect to a local Chrome instance, take page snapshots that assign stable element refs such as @e1 and @e2, and then click, fill, type, scroll, or upload against those refs. CSS selectors and x,y coordinates are also accepted as targets.
Is browser-control free to use? What license does it have?
browser-control is open source under the MIT license. Check the license terms before using it in commercial products.
Is browser-control still maintained?
Updated within 6 months. The last commit to browser-control was on Aug 27, 2026.
What can I use browser-control for?
Letting a coding agent inspect and interact with a web page from its shell. Scripting repeatable browser steps such as logins or form filling in a shell pipeline. Running a browser session on a cloud provider like Browser Use or Steel from the command line. Debugging a browser automation flow by reviewing the saved failure traces.
How do I install browser-control?
Install the CLI from crates.io: cargo install browser-control-cli Create the workspace and launch Chrome on an example page: browser-control init && browser-control launch https://example.com Take a snapshot of the page to list actionable element refs: browser-control snapshot
Where can I get browser-control?
The source code and installation instructions are on GitHub: https://github.com/keon/browser-control

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects