- Category
- AI Agents
- Rank
- No. 1125Tools index
Previous survey · No. 1094 ·
- Listed in
- #1 Turn an API into a CLI
- Pricing
- Open Source
- Platform
- cli
- Type
- TOOL
- Builder
- @alexknowshtml
- GitHub
- 453 stars
- Date
About
A Claude Code skill that automatically converts any API into a working CLI tool with dual-mode output for both humans and AI agents. Simply point it at API documentation or live endpoints and get a Commander.js CLI plus a ready-to-use skill.
What it does
api2cli gives Claude Code a guided workflow for mapping an API before producing software. It gathers endpoint, authentication, pagination, and rate-limit details, asks the user to approve the catalog, then creates a Node.js command interface and usage guidance for later Claude sessions.
Why it's ranked here
The concept is practical and the workflow includes a valuable catalog review checkpoint. Its agent-oriented responses are more considered than a basic command scaffold. However, the repository supplies detailed generation instructions and code patterns, not a standalone generator, so results depend heavily on Claude applying those instructions correctly.
What's good
Generated commands serve people and automation differently: terminals receive readable output, while pipes receive structured results, contextual next actions, and suggested fixes. The plan also covers authentication, several pagination styles, retries, rate limiting, caching, command discovery, and practical multi-step usage examples.
Tradeoffs
It requires Claude Code and installs through manual folder copying. Active discovery includes probing write and delete operations, so careless use against production could be risky. The retry reference also treats every client error as non-retryable, conflicting with the stated requirement to retry rate-limit responses.
How to use it well
It suits engineers who repeatedly expose documented or controlled APIs to Claude-driven workflows. Review the endpoint catalog and generated source before testing, especially around authentication and mutating requests. Use constrained credentials during discovery. It does not independently capture browser traffic, and it is not a standalone CLI generator outside Claude Code.
Technical notes+
skill/SKILL.md defines the six-step orchestration, normalized TypeScript catalog shapes, Commander.js scaffold layouts, verification, and generated skill template. skill/references/discovery-strategies.md covers OpenAPI paths, REST probing, GraphQL introspection, and documentation parsing. skill/references/api-client-template.md supplies client, pagination, rate-limiter, cache, and retry examples; its cache sample uses statSync without importing it, while withRetry rejects all 4xx responses, including 429. skill/references/agent-first-patterns.md defines JSON envelopes, next_actions, fix guidance, and output truncation. skill/references/commander-patterns.md adds optional prompts, progress, color, configuration, stdin, completion, exit-code, and test patterns.
Observed
- License
- MIT
- Package type
- Claude Code skill installed by copying the skill folder into a project
- Runtime surface
- Generates Node.js TypeScript command-line tools using Commander.js and tsx
- Interfaces
- Claude Code skill plus generated CLI with terminal and piped JSON output modes
- Discovery inputs
- Documentation URLs, live API base URLs, and peek-api captures
- Generated deployment shapes
- Supports an in-project scaffold or a standalone project
Read from README.md, LICENSE, skill/SKILL.md, skill/references/commander-patterns.md, skill/references/api-client-template.md, skill/references/agent-first-patterns.md, skill/references/discovery-strategies.md.
What it can do
Discover API endpoints from documentation
API documentation → List of available API endpoints
Probe live API endpoints
Live API endpoint URLs → Discovered endpoint structure and parameters
Generate Commander.js CLI tool
API endpoint information → Working CLI application with subcommands
Create CLI subcommands for each endpoint
Individual API endpoints → Commander.js subcommands with appropriate parameters
Generate Claude skill file
Generated CLI tool → Skill file that teaches Claude how to use the CLI
Convert API into dual-mode output tool
API documentation or endpoints → CLI tool with human-readable and AI agent-compatible output
Tags
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
