- Category
- Developer Tools
- Rank
- No. 824Tools index
Previous survey · No. 807 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- browser-use
- GitHub
- 318 stars
- Date
About
Type-safe Python wrapper for the Chrome DevTools Protocol — programmatically drive Chromium browsers.
What it does
It turns official Chrome debugging specifications into an asynchronous Python client organized by browser capability. Applications connect through a supplied WebSocket endpoint, send structured commands, receive typed results, and register typed handlers for browser events.
Why it's ranked here
The appeal is specific: broad protocol coverage without giving up editor guidance or static checking. Generated domain modules keep a huge browser interface navigable, while one asynchronous client handles requests and events. The rough edge is distribution: regeneration tooling is excluded from the built package.
What's good
Parameters, results, and individual event payloads receive explicit Python types, including optional fields and literal values. Domain separation makes capabilities such as navigation, networking, accessibility, storage, and tracing easier to discover. The client also supports concurrent requests, session identifiers, custom connection headers, and configurable WebSocket frame limits.
Tradeoffs
You must supply a reachable Chrome DevTools WebSocket endpoint, so browser startup and debugging configuration remain your responsibility. The runtime requires Python 3.11 or newer. Regeneration downloads pinned protocol files, deletes the generated output directory, and depends on Ruff for formatting. The packaged distribution excludes the generator itself.
How to use it well
Choose it for typed, asynchronous Python systems that need direct access to many Chrome debugging domains or event streams. Generate and commit bindings when developing from the repository, then pin them to the Chromium revision you target. Pair it with separate browser launch and lifecycle tooling, because this client starts from an existing debugging endpoint.
Technical notes+
cdp_use/client.py implements the asyncio WebSocket transport, request correlation, session-aware messaging, event dispatch, custom headers, and a default 100 MB frame limit. cdp_use/generator/generate.py downloads pinned browser and JavaScript protocol JSON, adds JSON files from cdp_use/custom_protocols/, and invokes CDPGenerator. cdp_use/generator/generator.py recreates cdp_use/cdp, emits per-domain types, commands, events, clients, and registration interfaces, then runs Ruff. cdp_use/generator/type_generator.py maps protocol objects to TypedDict, enums to Literal, and cross-domain references to imports guarded by TYPE_CHECKING. cdp_use/cdp/registry.py stores one callback per event method and accepts synchronous or awaitable handlers. pyproject.toml uses Hatchling, includes cdp_use/**/*.py plus cdp_use/py.typed, and explicitly excludes cdp_use/generator/*.py from builds.
Observed
- License
- MIT
- Primary language
- Python
- Python requirement
- Python 3.11 or newer
- Interface
- Asynchronous Python library over a Chrome DevTools WebSocket connection
- Build system
- Hatchling with the hatchling.build backend
- Runtime dependencies
- httpx, idna, typing-extensions, and websockets
- Platform support
- Declared operating-system independent
- Package structure
- Generated domain modules are included, while generator Python files are excluded from built distributions
Read from README.md, pyproject.toml, simple.py, cdp_use/client.py, cdp_use/__init__.py, cdp_use/cdp/library.py, cdp_use/cdp/__init__.py, cdp_use/cdp/registry.py, cdp_use/generator/__init__.py, cdp_use/generator/__main__.py, cdp_use/generator/generate.py, cdp_use/generator/constants.py, cdp_use/generator/generator.py, cdp_use/cdp/registration_library.py, cdp_use/generator/type_generator.py.
What it can do
Automate web browser navigation
Navigation commands and target URLs → Browser state changes and page loads
Execute JavaScript in browser context
JavaScript code strings → Execution results and return values
Capture screenshots of web pages
Page elements or viewport specifications → Image files or binary data
Extract DOM elements and content
CSS selectors or XPath expressions → HTML elements and text content
Monitor network requests and responses
Network event listeners and filters → HTTP request/response data and metadata
Simulate user interactions
Click coordinates, keyboard input, and form data → Triggered events and page state changes
Generate PDF from web pages
Page URLs and PDF generation options → PDF documents
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
