api2cli  by alexknowshtml

API to CLI and AI skill generator

Created 2 weeks ago

New!

373 stars

Top 76.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

A Claude Code skill that transforms any API into a functional Command Line Interface (CLI) and an AI-discoverable skill. It targets developers and AI engineers seeking to enable AI agents to interact with diverse APIs seamlessly, offering a dual-mode output for both human readability and machine processing, thereby simplifying API integration and automation.

How It Works

The project leverages Claude Code to ingest API definitions from documentation URLs, live API probing, or network traffic captures (peek-api). It automatically discovers endpoints, catalogs API details like authentication and pagination, and generates a Commander.js-based CLI. Concurrently, it produces a SKILL.md file, enabling Claude sessions to utilize the generated CLI without direct code inspection, featuring agent-first design patterns like JSON envelopes and HATEOAS-style next actions.

Quick Start & Requirements

  • Primary install / run command: Clone the repository (git clone https://github.com/alexknowshtml/api2cli.git) and copy the skill/ directory into your Claude Code project's skills directory (e.g., cp -r api2cli/skill/ /path/to/your/project/.claude/skills/api2cli/).
  • Non-default prerequisites and dependencies: Requires Claude Code. Node.js and TypeScript (tsx) are implied for CLI generation and execution.
  • Links: Repository: https://github.com/alexknowshtml/api2cli.git

Highlighted Details

  • Dual-Mode CLI Output: Generates CLIs that provide human-readable output in the terminal and a structured JSON envelope with suggested next actions when piped, suitable for AI agents.
  • Comprehensive API Client Generation: Automatically includes features such as authentication handling, pagination support, retry mechanisms with backoff, rate limiting, and caching.
  • Multiple API Discovery Methods: Supports discovery via parsing API documentation pages, active probing of live endpoints, and analyzing network traffic captures.
  • Agent-First Design: Incorporates patterns like self-documenting root commands, agent-friendly error suggestions, and context-safe output formats.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or roadmap were found in the provided README content.

Licensing & Compatibility

  • License type: MIT License.
  • Compatibility notes: The MIT license is permissive and generally compatible with commercial use and linking within closed-source projects.

Limitations & Caveats

This tool is specifically a Claude Code skill and is not designed as a standalone application. Its functionality is entirely dependent on the Claude Code environment for discovery, generation, and execution. The effectiveness of API discovery relies on the quality and accessibility of the provided API documentation or network traffic.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
374 stars in the last 16 days

Explore Similar Projects

Feedback? Help us improve.