A Node.js package wraps the Chrome Debugging Protocol so scripts can control and instrument Chrome and compatible browsers over a debug port.
Overview
Chrome Remote Interface offers a JavaScript API on top of the Chrome Debugging Protocol. Developers connect to a running browser or compatible runtime, then issue commands and listen for network, page, and runtime events with less boilerplate than raw WebSocket messaging.
The package targets any implementation that speaks the protocol, including desktop Chrome, Chromium, Opera, Edge, Firefox Nightly, Node.js inspect mode, and iOS Safari through extra proxy setup. Typical setup starts the browser with remote debugging enabled on a known host and port, then attaches from Node or, with constraints, from a browser bundle.
Installation is through npm; a bundled interactive client supports REPL-style inspection, target listing, and tab management subcommands. TypeScript definitions ship via DefinitelyTyped, and the API exposes connection helpers plus protocol descriptor access.
Compared with driving a browser only through Selenium-style stacks, this library focuses on low-level CDP access for custom automation, logging, and debugging workflows.
Key features
- CDP command and event abstraction
- Chrome, Opera, Edge, Firefox targets
- Node.js inspect attachment
- Bundled CLI inspect REPL
- Target list and tab management
- Configurable protocol descriptors
- Webpack and browser bundle support
- Promise-based connection API
Use cases
- Logging every network request from a tab
- Automating headless Chrome over CDP
- Debugging Node scripts via --inspect
- Remote control of Opera or Edge debug ports
- Building custom browser instrumentation tools