api2cli

Generate TypeScript CLI wrappers from OpenAPI specs for REST APIs.

3|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/legout/pi-config --skill api2cli-legout
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api2cli
Source: https://github.com/legout/pi-config/tree/main/installed-skills/api2cli
Command: npx skills add https://github.com/legout/pi-config --skill api2cli-legout

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bun, commander, and includes references (resource) components.

What problem does it solve?

This Skill solves the friction of interacting with disparate REST APIs by providing a standardized, automated way to generate, install, and manage CLI wrappers that are immediately ready for agentic use.

Core Features & Use Cases

  • Automated Scaffolding: Generate a fully functional, TypeScript-based CLI from OpenAPI specs or API documentation in seconds.
  • Agent-Ready Integration: Automatically symlinks skills to agent workspaces, enabling agents to discover and execute API commands via natural language.
  • Use Case: If you need to interact with a new SaaS platform, use this Skill to generate a CLI, link it to your agent, and immediately start querying resources or performing actions without writing custom integration code.

Quick Start

Use the api2cli skill to create a new CLI for the target API by providing the base URL and authentication type.

Frequently Asked Questions about api2cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a CLI from an OpenAPI spec for REST API automation?▼

You can generate a CLI from an OpenAPI spec by providing the base URL and authentication type to automatically scaffold a fully functional, TypeScript-based wrapper. This creates a standardized command line interface ready for immediate automation and agentic interaction.

What is an agent-ready CLI and how does it work with REST APIs?▼

An agent-ready CLI is a standardized command line wrapper that enables automated agents to discover and execute REST API commands via natural language. It works by symlinking generated skills to agent workspaces, ensuring consistent JSON-based communication between agents and external services.

Can I use api2cli to interact with SaaS platforms without writing custom integration code?▼

Yes, you can use api2cli to interact with new SaaS platforms without custom integration code. By generating a CLI wrapper from the platform's API documentation, you can immediately query resources and perform actions through standardized command line operations.

Do I need Bun runtime to scaffold a CLI wrapper for REST APIs?▼

Yes, the Bun runtime is required to scaffold and manage CLI wrappers for REST APIs. The tool relies on Bun and standard CLI development patterns to ensure consistent JSON-based communication and multi-platform publishing for developer tools.

What is the best way to automate REST API interactions for agentic workflows?▼

The best way to automate REST API interactions for agentic workflows is generating standardized CLI wrappers that support discovery, scaffolding, and resource implementation. This approach ensures consistent JSON-based communication, allowing agents to execute commands without bespoke integration logic.

Are there limitations when turning multiple disparate REST APIs into standardized CLIs?▼

When turning disparate REST APIs into standardized CLIs, limitations may arise from non-standard API documentation or unsupported authentication types. The tool requires valid OpenAPI specs or API documentation and depends on the Bun runtime to maintain consistent JSON-based communication.