Back to browse
Hubcap – A single Go binary to automate Chrome via CDP

Hubcap – A single Go binary to automate Chrome via CDP

by tomyandell·Mar 17, 2026·3 points·0 comments

AI Analysis

●●SolidNiche GemShip It

118 CDP commands in a single Go binary for AI agents.

Strengths
  • Single Go binary means no Node.js runtime or npm dependencies to manage.
  • Covers deep CDP domains like network interception and heap snapshots.
  • Semantic exit codes enable natural composition with pipes and shell logic.
Weaknesses
  • Chrome-only; CDP doesn't support Firefox or Safari browsers.
  • Niche utility primarily for AI agents rather than general automation scripts.
Target Audience

AI agent developers, automation engineers

Similar To

Puppeteer · Playwright · cdp-cli

Post Description

Hi HN, I built this. Hubcap is a single Go binary that wraps CDP in 118 shell commands — navigation, DOM queries, screenshots, network interception, device emulation, accessibility audits, performance profiling, heap snapshots, and so on.

Each command prints JSON to stdout and uses semantic exit codes (0 success, 1 error, 2 can't connect, 3 timeout), so they compose naturally with pipes and &&.

I built it because I wanted AI agents to be able to do everything Chrome DevTools can do, not just the basics. Existing options were either too narrow (MCP browser tools cover click/navigate/fill but not network interception or heap snapshots) or too heavy (Puppeteer/Playwright are great but they're libraries — an agent has to write and run a script rather than just call a command).

There's no session to manage and no browser object to keep alive. An agent just runs hubcap goto --wait https://example.com && hubcap text '#price'.

It also includes a Claude Code skill. The skill only loads command categories into context and pulls full docs on demand via hubcap help, so an agent gets coverage of 118 commands without the context cost.

Source: https://github.com/tomyan/hubcap Docs: https://hubcap.tomyandell.dev

Similar Projects