browser-control  by keon

Rust CLI drives browsers via Chrome DevTools Protocol

Created 9 years ago
3,115 stars

Top 14.9% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Summary

browser-control is a minimal, high-performance Rust CLI providing coding agents with shell-native browser control via the Chrome DevTools Protocol (CDP). It bypasses SDKs and frameworks, offering composable commands for programmatic web interaction, effectively giving agents "hands and eyes" without dictating their architecture.

How It Works

This tool exposes browser capabilities as shell subcommands outputting compact text/JSON. It uses CDP for control, featuring page snapshots that yield stable element references (@eN) ideal for agent workflows, unlike brittle CSS selectors. A self-observing daemon captures event, network, and console history, generating diagnostic traces on failure. It supports raw CDP execution and provider-agnostic cloud integration with various CDP services.

Quick Start & Requirements

Installation is via cargo install browser-control-cli or prebuilt binaries from GitHub releases. Building from source is also supported. Requirements include a pinned Rust toolchain and a Chrome/Chromium instance accessible via CDP. Verification scripts (scripts/verify.sh) and end-to-end agent tests are provided.

Highlighted Details

  • Shell-Native Interface: Composable commands eliminate language lock-in and SDK overhead.
  • Stable Element References: snapshot yields @eN handles for robust agent interaction.
  • CDP Escape Hatch: eval and cdp commands allow direct JavaScript/CDP message execution.
  • Self-Observing Daemon: Captures event/network/console history, generating diagnostic traces on failure.
  • Provider-Agnostic Cloud: Seamlessly connects to local Chrome or remote CDP sessions.
  • Reproducible Builds: Uses pinned toolchains and Cargo.lock for consistent outcomes.

Maintenance & Community

The project emphasizes reproducible builds via pinned dependencies. Specific community channels or contributor details are not detailed in the README.

Licensing & Compatibility

The license is not specified in the README, a critical omission for adoption. The tool is broadly compatible with any browser accessible via the Chrome DevTools Protocol.

Limitations & Caveats

The primary caveat is the unspecified license, hindering usage rights determination. The tool skips interaction with internal browser tabs (chrome://, devtools://).

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
9 stars in the last 30 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

obscura by h4ckf0r0day

6.4%
19k
Lightweight headless browser for AI agents and web scraping
Created 2 months ago
Updated 1 day ago
Feedback? Help us improve.