Type-safe Go bindings for the Chrome DevTools Protocol, enabling browser automation and debugging.
cdp is a Go package that provides type-safe bindings for the Chrome DevTools Protocol (CDP), generated from the latest protocol definitions. It enables developers to programmatically control and debug browsers like Chrome, Chromium, Edge, and Node.js via CDP's WebSocket interface, solving the need for reliable, low-level browser automation in Go.
Go developers who need to automate browsers for testing, scraping, or debugging purposes, and those working with headless Chrome/Chromium in backend services or CLI tools.
Developers choose cdp for its type safety, full protocol coverage, and Go-native design—offering a more discoverable and ergonomic alternative to raw CDP implementations, with explicit error handling and concurrency safety built in.
Package cdp provides type-safe bindings for the Chrome DevTools Protocol (CDP), written in the Go programming language.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides autocomplete-friendly bindings generated from the latest CDP definitions, making protocol methods and types easily discoverable through GoDoc, as emphasized in the README.
Designed for safe concurrent use in Go applications, allowing multiple goroutines to interact with the CDP client without data races, a key feature listed.
Uses simple, synchronous event handling instead of callbacks, improving code clarity and reducing complexity in event-driven automation, as highlighted in the features.
Exposes the entire Chrome DevTools Protocol without limiting functionality, enabling access to all domains for comprehensive automation, aligning with the project's motivation.
Ensures no silent or hidden errors by requiring explicit error checks, enhancing reliability in automation scripts, as stated in the project's features.
Requires manual setup for WebSocket connections, event enabling, and browser management using separate packages like devtool, leading to more code for basic tasks compared to integrated solutions.
Users must understand the Chrome DevTools Protocol details, as cdp provides raw, low-level access without simplifying common operations, making it challenging for those new to CDP.
Admits that providing high-level browser automation is a non-goal, so users must build their own abstractions for tasks like navigation or element interaction, increasing development time.