
cli-printing-press-generator
Generate AI-agent-first CLIs from any API (OpenAPI, GraphQL, or browser-sniffed) with SQLite sync, compound commands, and MCP servers
- Installs
- 241
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/devtools-skills --skill cli-printing-press-generator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads cli-printing-press-generator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
CLI Printing Press Generator
Skill by ara.so — Devtools Skills collection.
CLI Printing Press generates production-ready CLIs from any API — REST, GraphQL, or browser-sniffed traffic. Each generated CLI includes SQLite-backed local storage, offline full-text search, compound insight commands, and dual interfaces (Cobra CLI + MCP server). Designed for AI agents first with typed exit codes, auto-JSON output when piped, and token-efficient --compact mode.
What It Does
The Printing Press follows a 6-phase autonomous workflow:
- Research: Discovers official docs, competing CLIs, MCP servers, and community patterns
- Non-Obvious Insight: Identifies the API's secret identity (what it's actually useful for)
- Code Generation: Builds Go CLI with domain-specific SQLite tables, FTS5 indexes, sync engine
- Verification: Runs scorecard, dogfood tests, proof-of-behavior checks, live API smoke tests
- Polish: Auto-fixes verify failures, removes dead code, cleans descriptions
- Publishing: Packages for library, generates PR with quality score
Key differentiators:
- Local-first: High-gravity resources get domain tables (not JSON blobs) with incremental sync
- Compound commands: Cross-resource queries (
stale,health,bottleneck) impossible with stateless wrappers - Dual output: Every API generates both
<api>-pp-cli(Cobra) and<api>-pp-mcp(MCP server) - No spec required: Point at a website, captures traffic, reverse-engineers the API
- Agent-native: Auto-JSON when piped, typed exit codes,
--compactflag,--dry-run
Installation
Prerequisites
- Go 1.26.3+ (install)
- Claude Code or compatible AI agent harness
- Git (for cloning skills repo)
1. Install Binary
go install github.com/mvanhorn/cli-printing-press/v4/cmd/printing-press@latest
Verify:
printing-press --version
2. Install Skills (Recommended Method)
Clone the repo to get skills and automatic updates via git pull:
git clone https://github.com/mvanhorn/cli-printing-press.git
cd cli-printing-press
3. Start Printing Session
From the cloned repo root:
# Load skills directly from this repo
claude --plugin-dir .
# Or in a new git worktree (for parallel runs)
claude --plugin-dir . -w
Core Commands
Primary Generation Command
Inside Claude Code session:
/printing-press <api-name>
/printing-press <url>
/printing-press <api-name> codex
Examples:
# Generate from API name (auto-discovers docs/specs)
/printing-press Notion
# Generate from website (browser-sniff traffic)
/printing-press https://postman.com/explore
# Use Codex for code generation (60% fewer Opus tokens)
/printing-press HubSpot codex
# Reprint existing CLI under latest machine
/printing-press-reprint notion
Polish Existing CLI
Runs diagnostics, fixes verify failures, removes dead code:
/printing-press-polish <api-name>
Example:
/printing-press-polish linear
Publish to Library
Validates, packages, creates PR:
/printing-press-publish <api-name>
Example:
/printing-press-publish superhuman
Amend from Dogfood Session
Turn session friction into PR (auto-detects target CLI):
/printing-press-amend
/printing-press-amend <api-name>
Binary CLI Usage
The printing-press binary is called by skills but can be used directly:
# Research phase
printing-press research <api-name> --output ./output
# Generate full CLI
printing-press generate notion --output ~/clis/notion-pp-cli
# Verify generated CLI
printing-press verify ~/clis/notion-pp-cli
# Score quality
printing-press scorecard ~/clis/notion-pp-cli
# Dogfood test
printing-press dogfood ~/clis/notion-pp-cli
Configuration
Output Locations
Default structure (auto-managed by skills):
~/printing-press/
├── .runstate/<scope>/runs/<run-id>/working/<api>-pp-cli/ # Active runs
├── library/<api>/ # Published CLIs
└── manuscripts/<api>/<run-id>/ # Archived runs
├── research/
├── proofs/
├── discovery/
└── pipeline/
<scope> derives from git checkout path (parallel worktrees don't conflict).
Override Output
printing-press generate stripe --output /custom/path/stripe-cli
Environment Variables
Generated CLIs use these patterns:
# API authentication
export NOTION_API_KEY="secret_..."
export LINEAR_API_KEY="lin_api_..."
export GITHUB_TOKEN="ghp_..."
# SQLite store location (override default)
export NOTION_PP_STORE_PATH="/custom/notion.db"
# Refresh settings for auto data-source
export LINEAR_PP_REFRESH_TTL="5m"
Generated CLI Patterns
Every generated CLI follows these conventions:
Authentication Setup
# Interactive auth setup (writes to ~/.config/<api>-pp-cli/config.yaml)
notion-pp-cli auth login
# Or set directly
export NOTION_API_KEY="secret_abc123"
Data Source Modes
# Auto mode: refresh if TTL expired (default)
linear-pp-cli issues list --data-source auto
# Force live API call
linear-pp-cli issues list --data-source live
# Local-only (offline)
linear-pp-cli issues list --data-source local
Sync and Search
# Initial sync
notion-pp-cli sync
# Incremental sync
notion-pp-cli sync --incremental
# Full-text search (FTS5)
notion-pp-cli search "authentication flow"
# Direct SQL query
notion-pp-cli sql "SELECT title FROM pages WHERE updated_at > date('now', '-7 days')"
Agent-Native Features
# Auto-JSON when piped
linear-pp-cli issues list | jq '.[] | select(.priority == "urgent")'
# Compact mode (60-80% fewer tokens)
linear-pp-cli issues list --compact
# Dry-run (safe exploration)
linear-pp-cli issues create --title "Test" --dry-run
# Typed exit codes
linear-pp-cli issues get ISSUE-123
echo $? # 0=success, 2=not found, 3=auth, 4=validation, 5=server, 7=offline
Compound Commands
Generated CLIs include domain-specific insight commands:
# Linear example
linear-pp-cli stale --threshold 7d # Issues blocked >7 days
linear-pp-cli health --team backend # Team velocity metrics
linear-pp-cli bottleneck # Most-blocking issues
# Discord example
discord-pp-cli knowledge --channel docs # Thread knowledge graph
discord-pp-cli stale-threads --days 30 # Unanswered >30 days
# Stripe example
stripe-pp-cli churn-signals # Failed charges + cancellations
stripe-pp-cli cohort-health --month 2026-04
Code Examples
Using a Generated CLI in Go
package main
import (
"context"
"fmt"
"os"
"os/exec"
"encoding/json"
)
// Call generated Linear CLI
func getBlockedIssues() ([]Issue, error) {
cmd := exec.Command("linear-pp-cli", "stale",
"--threshold", "7d",
"--output", "json")
output, err := cmd.Output()
if err != nil {
return nil, fmt.Errorf("CLI error: %w", err)
}
var issues []Issue
if err := json.Unmarshal(output, &issues); err != nil {
return nil, err
}
return issues, nil
}
// Use MCP server programmatically
func callMCPServer(ctx context.Context, method string, params map[string]interface{}) error {
// MCP servers expose stdio interface
cmd := exec.CommandContext(ctx, "linear-pp-mcp")
stdin, _ := cmd.StdinPipe()
stdout, _ := cmd.StdoutPipe()
if err := cmd.Start(); err != nil {
return err
}
req := map[string]interface{}{
"jsonrpc": "2.0",
"method": method,
"params": params,
"id": 1,
}
json.NewEncoder(stdin).Encode(req)
var resp map[string]interface{}
json.NewDecoder(stdout).Decode(&resp)
return cmd.Wait()
}
Integrating Generated CLI into Scripts
#!/bin/bash
# Deploy blocker detection script
# Sync latest data
notion-pp-cli sync --incremental
# Find stale blockers
BLOCKERS=$(notion-pp-cli sql "
SELECT b.id, b.title, i.title as blocked_issue
FROM issues i
JOIN issues b ON i.blocker_id = b.id
WHERE b.state = 'in_progress'
AND b.updated_at < date('now', '-7 days')
" --output json)
# Send to Slack if any found
if [ "$(echo "$BLOCKERS" | jq 'length')" -gt 0 ]; then
echo "$BLOCKERS" | jq -r '.[] | "⚠️ \(.blocked_issue) blocked by stale: \(.title)"' \
| slack-cli send --channel "#deploy-alerts"
fi
Creating Custom Commands
Generated CLIs support plugin architecture:
// Add to cmd/custom/reconcile.go in generated CLI
package custom
import (
"github.com/spf13/cobra"
"github.com/mvanhorn/linear-pp-cli/internal/store"
)
func NewReconcileCmd(st *store.Store) *cobra.Command {
cmd := &cobra.Command{
Use: "reconcile",
Short: "Find issues in API but missing from local store",
RunE: func(cmd *cobra.Command, args []string) error {
// Query local store
localIDs := st.GetAllIssueIDs()
// Query live API
liveIDs := fetchLiveIssueIDs()
// Diff
missing := difference(liveIDs, localIDs)
for _, id := range missing {
fmt.Printf("Missing: %s\n", id)
}
return nil
},
}
return cmd
}
Troubleshooting
Generation Failures
Problem: Research phase hangs or fails
# Check if API has publicly accessible docs
curl -I https://developers.notion.com
# Try explicit spec URL
/printing-press https://raw.githubusercontent.com/notion/openapi/main/spec.yaml
# Use browser-sniff mode for private APIs
/printing-press https://internal-tool.company.com
Problem: Codex mode fails repeatedly
The press auto-falls back to local generation after 3 Codex failures. Check logs:
tail -f ~/.printing-press/.runstate/<scope>/runs/<run-id>/logs/generation.log
Verification Errors
Problem: Scorecard shows low score
# Run polish to auto-fix
/printing-press-polish <api-name>
# Check specific failure
printing-press verify ~/printing-press/library/<api> --verbose
Problem: Auth tests fail
# Verify credentials work manually
export API_KEY="your_key"
curl -H "Authorization: Bearer $API_KEY" https://api.service.com/test
# Check generated auth.go
cat ~/printing-press/library/<api>-pp-cli/internal/auth/auth.go
Runtime Issues with Generated CLIs
Problem: Sync fails with rate limit
# Use incremental sync with backoff
api-pp-cli sync --incremental --rate-limit 10/min
# Check cursor tracking
api-pp-cli sql "SELECT resource, cursor, updated_at FROM sync_cursors"
Problem: Search returns no results
# Rebuild FTS5 index
api-pp-cli sql "DELETE FROM pages_fts"
api-pp-cli sync --rebuild-index
# Verify FTS table
api-pp-cli sql "SELECT * FROM sqlite_master WHERE type='table' AND name LIKE '%_fts'"
Problem: Compound command errors
# Check if required tables exist
api-pp-cli sql ".schema" | grep -A 5 "CREATE TABLE"
# Run with debug output
api-pp-cli stale --threshold 7d --log-level debug
MCP Server Issues
Problem: MCP server not responding
# Test stdio interface directly
echo '{"jsonrpc":"2.0","method":"ping","id":1}' | linear-pp-mcp
# Check MCP manifest
cat ~/printing-press/library/linear-pp-mcp/mcp.json
Problem: IDE can't find MCP server
Add to Claude Code config (~/.config/claude-code/mcp-servers.json):
{
"linear": {
"command": "/path/to/linear-pp-mcp",
"env": {
"LINEAR_API_KEY": "${LINEAR_API_KEY}"
}
}
}
Performance Optimization
Problem: Large dataset sync is slow
# Enable batch mode
api-pp-cli sync --batch-size 1000 --workers 4
# Use partial sync
api-pp-cli sync --resources "issues,comments" --since "2026-01-01"
Problem: Search queries are slow
# Analyze query plan
api-pp-cli sql "EXPLAIN QUERY PLAN SELECT * FROM pages_fts WHERE pages_fts MATCH 'search term'"
# Add covering index
api-pp-cli sql "CREATE INDEX idx_pages_updated ON pages(updated_at DESC)"
Best Practices
- Always run polish after generation: Auto-fixes 80% of verify failures
- Use
--compactfor agent calls: 60-80% fewer tokens, same data - Sync incrementally in production: Full sync only on init
- Set refresh TTL based on data volatility: Real-time (1m), hourly (5m), daily (1h)
- Use typed exit codes for error handling: Don't parse stderr
- Leverage compound commands: They're the CLI's superpower
- Credit sources in custom commands: Check generated README's "Sources and Inspiration"
Additional Resources
FAQ
What does the cli-printing-press-generator skill do?
Generate AI-agent-first CLIs from any API (OpenAPI, GraphQL, or browser-sniffed) with SQLite sync, compound commands, and MCP servers
How do I install cli-printing-press-generator?
Run npx skills add https://github.com/reason-machines/devtools-skills --skill cli-printing-press-generator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/cli-printing-press-generator/ (personal) or .claude/skills/cli-printing-press-generator/ (project).
Which AI agents can use cli-printing-press-generator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is cli-printing-press-generator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains cli-printing-press-generator?
It is published by reason-machines in reason-machines/devtools-skills. It has 241 recorded installs.
More from reason-machines/devtools-skills
cc-switch-cli
reason-machines/devtools-skills
Cross-platform CLI tool for managing Claude Code, Codex, Gemini, OpenCode & OpenClaw providers, MCP servers, prompts, skills, and proxies.
wx-cli-wechat-local-data
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
chrome-devtools-mcp-automation
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
officecli-office-automation
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
cli-anything-agent-native-software
reason-machines/devtools-skills
Generate and use command-line interfaces that make any software controllable by AI agents with structured JSON output
autocli-web-scraping
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.