chrome-cdp

Installation
Summary

Lightweight Chrome DevTools Protocol CLI for inspecting and interacting with local browser tabs via WebSocket.

  • Connects directly to Chrome/Chromium/Brave/Edge with remote debugging enabled; no Puppeteer dependency, supports 100+ tabs with instant connection
  • Core commands: list tabs, shot (viewport screenshots), snap (accessibility tree), eval (JavaScript), click/clickxy (interactions), type (text input), nav (navigation), html (DOM extraction), net (resource timing)
  • Handles coordinate conversion between native image pixels and CSS pixels via device pixel ratio (DPR); clickxy takes CSS pixel coordinates
  • Requires Node.js 22+, Chrome with remote debugging enabled via chrome://inspect/#remote-debugging, and optional CDP_PORT_FILE env var for non-standard DevToolsActivePort locations
  • Background daemon persists sessions for 20 minutes, eliminating repeated "Allow debugging" prompts after first tab access
SKILL.md

Chrome CDP

Lightweight Chrome DevTools Protocol CLI. Connects directly via WebSocket — no Puppeteer, works with 100+ tabs, instant connection.

Prerequisites

  • Chrome (or Chromium, Brave, Edge, Vivaldi) with remote debugging enabled: open chrome://inspect/#remote-debugging and toggle the switch
  • Node.js 22+ (uses built-in WebSocket)
  • If your browser's DevToolsActivePort is in a non-standard location, set CDP_PORT_FILE to its full path

Commands

All commands use scripts/cdp.mjs. The <target> is a unique targetId prefix from list; copy the full prefix shown in the list output (for example 6BE827FA). The CLI rejects ambiguous prefixes.

List open pages

scripts/cdp.mjs list
Installs
1.6K
GitHub Stars
3.0K
First Seen
Mar 13, 2026