CLIs Deliver Token Savings and Reliability Gains Over APIs and MCPs

CLIs (command line interfaces) excel for AI agents like Claude Code because they return concise, pre-formatted text (typically 200 tokens) instead of raw JSON from APIs or bloated tool descriptions from MCP servers. APIs dump massive JSON bodies that inflate context windows and complicate pagination, while MCPs load 50+ tool descriptions upfront, wasting tokens even when unused—benchmarks show MCPs consume 35x more tokens than CLIs on the same task, with reliability dropping to 72% (vs. CLI's 100%) as complexity rises. CLIs run locally with SQLite mirroring for zero round-trips, no rate limits on execution, and composable chaining for workflows. Example: Fetching 10 Skool community posts (no API) used 260 input tokens and returned 132,000 output tokens routed outside context, adding only 2,000 tokens to the session vs. full pollution.

Prioritize CLIs as tier-1 for agent-tool interactions: if unavailable, fall back to APIs (convertible to CLIs), then MCPs last. Official CLIs often fail agents due to inefficiency; custom ones built for agents win.

Printing Press Unlocks Instant CLI Access and Custom Builds

Printing Press (printingpress.dev) offers a library of 50+ ready CLIs for sites without APIs—like ESPN (NBA games), Craigslist, eBay, Shopify, Linear, Airbnb—plus a factory to generate new ones in minutes via natural language in Claude Code. Install starter pack (ESPN, Flight Goat, Movie Goat, Recipe Goat) or clone individuals from GitHub (mvanhorn/printing-press-library). Requires Go (free Google language for CLI tools; Claude Code installs it in ~1 minute).

Post-setup, query pp catalog for installed/available CLIs, then invoke naturally: "NBA games tonight" triggers pp-espn for precise results (e.g., Knicks-Sixers at 7 ET, Spurs-Timberwolves at 9:30 ET). Built CLIs like custom Skool (pull wins by category with links), YouTube, Tally reverse-engineer sites, bypassing anti-scraping via real Chrome sessions while respecting quotas/OAuth.

Factory Builds and Shares Production CLIs Effortlessly

Use factory (pp factory) for custom CLIs: Prompt Claude Code with target site/URL (e.g., Hacker News), and it researches endpoints, catalogs features, generates Go code, verifies via dogfooding, and wraps in agent skills—completes in ~2 minutes despite 30-60 min estimates. Output: Binary with commands like hn top for top stories (e.g., last 24h, 100+ points ranked).

Share via private GitHub repos: Prompt to package CLI+skill, invite team to clone/swap keys (never commit secrets). Publish to public library for community use. Chain CLIs for skills (e.g., Contact Goat verifies emails via LinkedIn/Hunter.io/DeepLine). Result: Agents handle no-API sites efficiently, saving tokens and enabling daily insights like community wins or HN trends.