mvanhorn/cli-printing-press
Every API has a secret identity. This finds it, absorbs every feature from every competing tool, then builds the GOAT CLI — designed for AI agents first, with SQLite sync, offline search, and compound insight commands.
CLI Printing Press – AI‑driven generator of production‑ready CLIs (and MCP servers)
What it is – A Go‑based tool that lets an AI‑assistant (Claude Code, Codex, etc.) turn any web service or API into a token‑efficient command‑line interface plus a matching MCP (Machine‑Code‑Plugin) server. It does the whole pipeline automatically:
- Research – reads official docs, scrapes community CLIs, even captures browser traffic for undocumented sites.
- Absorb – builds a manifest of every useful feature found in existing tools.
- Generate – emits a Go CLI (Cobra‑based) and an MCP server that share the same client/store code.
- Persist – creates a local SQLite store with full‑text search, incremental sync, and compound‑command support.
- Verify – runs a scorecard, dog‑food tests, proof‑of‑behavior checks, and live smoke tests before publishing.
The result is a ready‑to‑install binary like notion‑pp-cli and a companion notion‑pp-mcp that agents can call directly, with minimal token cost.
Why it matters for AI agents
- Speed & token economy – agents can invoke a concise CLI instead of walking through long API docs. Flags are designed for machine consumption (compact output, typed exit codes, auto‑JSON).
- Local‑first data – All fetched data lives in a SQLite DB, enabling ultra‑fast
search,sql, and compound commands (stale,health,bottleneck) that a stateless API wrapper could never provide. - Dual interface – The same generated code powers both a shell‑friendly CLI and an MCP server, so the tool works in terminal‑based agents (Claude Code, Codex) and IDE‑integrated agents (Claude Desktop, Cursor, Windsurf, Cline).
- Zero‑spec workflow – Point the press at a website (e.g., ESPN, Google Flights) and it captures traffic, reverse‑engineers an OpenAPI spec, and builds the CLI automatically.
Quick install (binary + skills)
# one‑liner installs the Go generator and registers all Printing‑Press skills for Claude Code
curl -fsSL https://raw.githubusercontent.com/mvanhorn/cli-printing-press/main/scripts/install.sh | bash
Add --cli-only or --skills-only to install just one side, and --agent codex to target Codex instead of Claude Code.
Manual alternative (if you prefer Go tooling):
go install github.com/mvanhorn/cli-printing-press/v4/cmd/cli-printing-press@latest
npx -y skills@latest add mvanhorn/cli-printing-press/skills --skill '*' -g -a claude-code -y
Generating a CLI (the agent workflow)
- Start your Claude Code (or Codex) session.
- Inside the chat, run the skill:
Examples:/printing-press <app‑name-or‑URL>/printing-press ESPN,/printing-press https://postman.com/explore - The skill calls the
cli-printing-pressbinary, which runs the full 5‑phase pipeline and drops two binaries into~/printing-press/library/<api>/:<api>-pp-cli– the Cobra CLI.<api>-pp-mcp– the MCP server.
- Use the CLI directly (
<api>-pp-cli --help) or let your IDE‑agent discover the MCP server.
Core features of the generated CLI
| Feature | What it does | Agent benefit |
|---|---|---|
sync |
Pulls fresh data into the local SQLite store. | One‑time network call, then all later queries are offline. |
search / sql |
Full‑text or SQL queries over the local data. | Millisecond‑scale answers, far fewer tokens. |
stale, health, bottleneck |
Domain‑specific analytics derived from historic data. | Gives agents high‑level insights without custom code. |
--compact |
Emits only high‑gravity fields (60‑80 % token reduction). | Keeps prompts short. |
| Typed exit codes | Machine‑readable status (0, 2, 3, …). |
Agents can branch logic without parsing text. |
| Auto‑JSON | Emits JSON when piped, no --json flag needed. |
Seamless composition with jq or other tools. |
Publishing & improving
- Publish –
/printing-press-publish <api>validates, packages, and opens a PR to the public Printing‑Press Library. - Polish –
/printing-press-polish <api>runs diagnostics, fixes verification failures, and cleans up docs. - Amend – After a dog‑food session,
/printing-press-amendextracts friction points, creates a PR, and scrubs any PII automatically.
How it works under the hood (high‑level flow)
Phase 0 Resolve spec or URL (1‑3 min)
Phase 1 Research brief – identity, competitors, data‑layer (5‑10 min)
Phase 1.5 Absorb ecosystem – catalog existing CLI/MCP features (5‑10 min)
Phase 1.7 Browser sniff – capture HAR if no spec (2‑5 min)
Phase 2 Generate Go CLI + MCP server (1‑2 min)
Phase 3 Build “GOAT” – add local store, compound commands, analytics (10‑20 min)
Phase 4‑5 Verify, score, and optionally publish
All phases are orchestrated by the cli-printing-press binary; the heavy lifting (code generation) can be delegated to Codex (/printing-press <api> codex) to save Claude Code token usage.
Example generated CLI (ESPN)
espn-pp-cli games --date today --compact
# → JSON with NBA playoff scores, leading scorers, injury news in a single call
The same functionality is available via espn-pp-mcp for IDE‑based agents.
Who might use this
- AI‑agent developers who need fast, low‑token tooling for dozens of services.
- DevOps / automation engineers wanting a local, searchable cache of SaaS data.
- Researchers who need to explore undocumented web APIs without writing scrapers.
- Tool builders who want to ship both a CLI and an MCP plugin from a single source.
Links
- Catalog of ready‑made CLIs – https://printingpress.dev
- Printing‑Press Library (GitHub) – https://github.com/mvanhorn/printing-press-library
- Installation script –
scripts/install.sh - Docs for Codex –
docs/CODEX.md - Docs for Cursor –
docs/CURSOR.md
CLI Printing Press automates the entire lifecycle of turning any API—documented or not—into a high‑performance, agent‑friendly command‑line tool and an MCP server, dramatically cutting token cost and development effort for AI‑augmented workflows.
Related
- Project
- Project
- Project
- Project
- Project