Skip to content

Add cdpilot - Zero-dependency CDP automation CLI#167

Open
mehmetnadir wants to merge 2 commits intoChromeDevTools:masterfrom
mehmetnadir:add-cdpilot
Open

Add cdpilot - Zero-dependency CDP automation CLI#167
mehmetnadir wants to merge 2 commits intoChromeDevTools:masterfrom
mehmetnadir:add-cdpilot

Conversation

@mehmetnadir
Copy link
Copy Markdown

What is cdpilot?

cdpilot is a zero-dependency browser automation CLI that communicates directly with Chromium-based browsers over the Chrome DevTools Protocol via HTTP and WebSocket.

Key features:

  • Pure CDP - Uses HTTP + WebSocket directly (urllib + asyncio), no wrapper libraries
  • 40+ commands - Navigation, DOM interaction, debugging, network interception, device emulation, screenshots, PDF export, accessibility audits, and more
  • Built-in MCP server - JSON-RPC over stdin/stdout for AI agent integration
  • Zero dependencies - Python stdlib only, no pip packages needed
  • Node.js entry point - npx cdpilot finds Python3 and browser automatically
  • 50KB total size

Installation:

npx cdpilot launch

npm: https://www.npmjs.com/package/cdpilot
GitHub: https://github.com/mehmetnadir/cdpilot

Added to Libraries for driving the protocol as a Python/Node.js CDP client with CLI and MCP server capabilities.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Mar 25, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment thread readme.md
- Python: [chromewhip](https://github.com/chuckus/chromewhip) - drop-in replacement for the `splash` service
- Python: [pyppeteer](https://github.com/pyppeteer/pyppeteer) - Puppeteer port
- Python: [ChromeController](https://github.com/fake-name/ChromeController) - high-level browser mgmt
- Python/Node.js: [cdpilot](https://github.com/mehmetnadir/cdpilot) - Zero-dependency browser automation CLI with 40+ commands and built-in MCP server for AI agents. Uses CDP over HTTP/WebSocket.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Python/Node.js: [cdpilot](https://github.com/mehmetnadir/cdpilot) - Zero-dependency browser automation CLI with 40+ commands and built-in MCP server for AI agents. Uses CDP over HTTP/WebSocket.
- Python: [cdpilot](https://github.com/mehmetnadir/cdpilot) - zero-dep CLI with 40+ commands and built-in MCP

@paulirish
Copy link
Copy Markdown
Member

fwiw you could just put a cdpilot-cli.py in your package.json bin.
but.. i think then you'd recommend npm install -g cdpilot && cdpilot ... instead.

just mentioning cuz i ship diff-so-fancy and git-recent and git-open on npm despite them not being JS.

but.. with the npx command .. probably that at least requires a minimal js wrapper i suppose.


can you sign the cla and make the suggested edit

@mehmetnadir
Copy link
Copy Markdown
Author

Hi Paul, thanks for the feedback! You're right that's a simpler shape. I went with a thin Node wrapper for three concrete reasons:

  1. Cross-platform Python discovery — On Windows the python3 shebang doesn't fire; the wrapper resolves python vs python3 vs py -3 and surfaces a friendly install hint when none are found. Verified in CI: https://github.com/mehmetnadir/cdpilot/actions/runs/24766371036 (matrix covers ubuntu/macos/windows × py 3.9/3.11/3.12 × node 18/20/22).

  2. Browser auto-detection at launch time — Brave/Chrome/Vivaldi/Edge live at platform-specific paths; the wrapper resolves them before delegating so the Python side never has to deal with macOS/Linux/Windows path differences.

  3. npx cdpilot as the primary install path — most AI-agent integration cases (Claude Code MCP, etc.) call us via npx cdpilot mcp from a JSON config. A bare Python bin works for npm i -g, but npx would either fall back to system Python with an unclear error or break Windows entirely.

That said, you're not wrong that the wrapper looks heavy. The trade is intentional but I'd love to slim it if there's a better path I'm missing. Either way — would the current shape be acceptable for awesome-chrome-devtools, or is there a specific concern (binary size, install behavior) I should address before we move forward? Happy to iterate.

@mehmetnadir
Copy link
Copy Markdown
Author

@googlebot I signed it!

1 similar comment
@mehmetnadir
Copy link
Copy Markdown
Author

@googlebot I signed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants