Browser automation, debugging, and anti-detect browsing CLI
Project description
Browser Tools
Browser automation, debugging, and anti-detect browsing CLI. Provides:
- Chrome DevTools MCP wrapper — Snapshot-based page automation via chrome-devtools-mcp
- Persistent browser sessions — Long-lived Chrome instances with named profiles, daemon-based MCP reuse, and attach-to-running-browser support
- Frame-aware tools — Iframe/CDP frame tree management, execution context resolution, and storage inspection
- Interstitial detection — Multi-signal heuristic detection for Cloudflare, DataDome, Akamai, PerimeterX, Imperva, AWS WAF, and other challenge pages
- Camoufox anti-detect browsing — Fingerprint-injected Firefox-based browsing for bot-protected sites
- CPU profiling — Direct CDP-based JavaScript CPU profiling with threshold-triggered capture
Quick Start
Installation
# Using uv (recommended)
uv tool install browser-tools
# Or with pip
pip install browser-tools
Usage
# Run the CLI
browser-tools --help
# Take a snapshot of a page
browser-tools --headless navigate --url https://example.com
browser-tools --headless take-snapshot
# Use a persistent profile
browser-tools --profile dev navigate --url https://example.com
Development setup
# Clone and install in editable mode
git clone https://github.com/dungle-scrubs/browser-tools.git
cd browser-tools
uv sync
Runtime requirements:
- Chrome or Chrome Canary for DevTools automation
- Node.js (>=18) for
chrome-devtools-mcp - Camoufox (
camoufox fetch) for anti-detect Firefox workflows
Architecture
browser_tools_session.py CLI entry point
|
+-- chrome_config.py Tool schemas & validation
+-- chrome_utils.py MCP subprocess invocation, formatting
+-- persistent_browser.py Chrome lifecycle, daemon, profiles
| +-- browser_state.py Persisted state dataclasses
| +-- mcp_session.py Short-lived MCP session wrapper
| +-- daemon_client.py Unix socket client
| +-- process_utils.py Chrome process/port utilities
| +-- mcp_daemon.py Long-lived MCP daemon
| +-- cdp_handler.py CDP tool implementations
| +-- cdp_constants.py CDP toolset definitions
| +-- cdp_client.py CDP WebSocket client
| +-- frame_manager.py Frame tree management
| +-- interstitial.py Challenge detection
| +-- screenshot_utils.py Blank-frame detection
+-- camoufox_session.py Camoufox anti-detect wrapper
+-- profiler.py Standalone CPU profiler
Development
uv sync
uv run ruff check src/ tests/
uv run pytest
Project Configuration
Place a .browser-tools.json in your project root:
{
"preferredSession": {
"mode": "headed-auth",
"profile": "dev"
}
}
This auto-selects a persistent headed browser session using the named profile.
License
MIT — see LICENSE.
Contributing
See CONTRIBUTING.md for development setup and guidelines. All contributors are expected to follow the Code of Conduct.
Security
Found a vulnerability? See SECURITY.md for responsible disclosure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file browser_tools-0.1.0.tar.gz.
File metadata
- Download URL: browser_tools-0.1.0.tar.gz
- Upload date:
- Size: 111.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39a3d019729df13b5c26a83238b5c8f2d4d49a72ac9cac84e634b24edabbabac
|
|
| MD5 |
c555077e72db8ed2d0e25132bb7ecd09
|
|
| BLAKE2b-256 |
bfd700931e9e0bc8ea1ba4efda84c6482b98a90664c87a92db7bb0bb9c020bd6
|
File details
Details for the file browser_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: browser_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 91.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8b23b7cdd0a1306467eae015547f063bc8865369a1185f3e9495d5aa93484b1
|
|
| MD5 |
b90fd6cda49fe07ed5bb1d432bb46f8c
|
|
| BLAKE2b-256 |
c7ec2deb3d383cafeead48a833752ab6855198d1b4608533110d73479d78fdc6
|