Documentation
¶
Overview ¶
Package cdp provides shared code for Chrome DevTools Protocol automation and the command-line tools in this module.
The repository ships several related commands:
- cmd/cdp for general-purpose browser automation, inspection, and MCP use
- cmd/chrome-to-har for focused HAR and differential capture workflows
- cmd/churl for browser-backed fetching and extraction
- cmd/chdb for Chrome-oriented debugging workflows
- cmd/ndp for Node.js and V8 inspector workflows
- cmd/cdpscript and cmd/cdpscripttest for script execution and testing
Most consumers will use one of those commands directly. The root package exists to document the module and to house shared code used by those tools.
Internal packages provide most of the implementation:
- internal/browser manages browser discovery, launch, and interaction
- internal/recorder handles HAR and enhanced traffic capture
- internal/differential compares capture runs
- internal/browserprofile discovers and manages browser profiles
The broader entry point is cmd/cdp. The narrower capture-oriented entry point is cmd/chrome-to-har.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cdpscript runs txtar-backed browser automation scripts over CDP.
|
Package cdpscript runs txtar-backed browser automation scripts over CDP. |
|
Package cdpscripttest brings rsc.io/script txtar-script ergonomics to Chrome DevTools Protocol (CDP) browser testing.
|
Package cdpscripttest brings rsc.io/script txtar-script ergonomics to Chrome DevTools Protocol (CDP) browser testing. |
|
cmd
|
|
|
cdp
command
cdp: Interactive Chrome DevTools Protocol Command-Line Tool
|
cdp: Interactive Chrome DevTools Protocol Command-Line Tool |
|
cdpscript
command
|
|
|
cdpscripttest
command
Command cdpscripttest runs CDP txtar browser automation scripts.
|
Command cdpscripttest runs CDP txtar browser automation scripts. |
|
chdb
command
Package main implements the CHDB (Chrome Debugger) CLI tool for Chrome and Chromium browser debugging using the Chrome DevTools Protocol.
|
Package main implements the CHDB (Chrome Debugger) CLI tool for Chrome and Chromium browser debugging using the Chrome DevTools Protocol. |
|
chrome-to-har
command
Command chrome-to-har records browser activity and generates HAR (HTTP Archive) files.
|
Command chrome-to-har records browser activity and generates HAR (HTTP Archive) files. |
|
churl
command
Command churl is like curl but runs through Chrome and can handle JavaScript/SPAs.
|
Command churl is like curl but runs through Chrome and can handle JavaScript/SPAs. |
|
native-host
command
Audit logging for security events
|
Audit logging for security events |
|
ndp
command
Package main implements the NDP (Node Debug Protocol) CLI tool for unified debugging of Node.js and Chrome applications using the Chrome DevTools Protocol.
|
Package main implements the NDP (Node Debug Protocol) CLI tool for unified debugging of Node.js and Chrome applications using the Chrome DevTools Protocol. |
|
internal
|
|
|
browser
Package browser provides abstractions for managing Chrome browser instances.
|
Package browser provides abstractions for managing Chrome browser instances. |
|
cdpproxy
Package cdpproxy provides a Chrome DevTools Protocol proxy for observing and logging CDP messages.
|
Package cdpproxy provides a Chrome DevTools Protocol proxy for observing and logging CDP messages. |
|
coverage
Package coverage collects per-file, per-line JavaScript and CSS coverage data from a Chrome DevTools Protocol session.
|
Package coverage collects per-file, per-line JavaScript and CSS coverage data from a Chrome DevTools Protocol session. |
|
htmltomd
Package htmltomd converts HTML to Markdown.
|
Package htmltomd converts HTML to Markdown. |
|
scrub
Package scrub detects and redacts secrets in text and HAR data.
|
Package scrub detects and redacts secrets in text and HAR data. |
|
sourcemap
Package sourcemap extracts code chunks from coverage byte ranges and generates sourcemap v3 files for synthetic source attribution.
|
Package sourcemap extracts code chunks from coverage byte ranges and generates sourcemap v3 files for synthetic source attribution. |
|
sources
Package sources captures JavaScript and CSS sources (including sourcemapped originals) from a Chrome DevTools Protocol session.
|
Package sources captures JavaScript and CSS sources (including sourcemapped originals) from a Chrome DevTools Protocol session. |
|
tooldef
Package tooldef parses .cdp tool definition files for the MCP server.
|
Package tooldef parses .cdp tool definition files for the MCP server. |
|
validation
Package validation provides comprehensive input validation for security hardening.
|
Package validation provides comprehensive input validation for security hardening. |
Click to show internal directories.
Click to hide internal directories.