openapi2cli
Generate CLI tools from OpenAPI specs. Built for AI agents who hate writing curl commands.
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install openclaw-skills-openapi2cli
Repository
Skill path: skills/awlevin/openapi2cli
Generate CLI tools from OpenAPI specs. Built for AI agents who hate writing curl commands.
Open repositoryBest for
Primary workflow: Write Technical Docs.
Technical facets: Full Stack, Data / AI, Tech Writer.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: openclaw.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install openapi2cli into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/openclaw/skills before adding openapi2cli to shared team environments
- Use openapi2cli for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: openapi2cli
description: Generate CLI tools from OpenAPI specs. Built for AI agents who hate writing curl commands.
homepage: https://github.com/Olafs-World/openapi2cli
metadata:
{
"openclaw":
{
"emoji": "đź”§",
"requires": { "bins": ["uvx"] },
"install":
[
{
"id": "uv",
"kind": "pip",
"package": "uv",
"bins": ["uvx"],
"label": "Install uv (for uvx)",
},
],
},
}
---
# OpenAPI to CLI
Generate command-line tools from OpenAPI/Swagger specs. Perfect for AI agents that need to interact with APIs without writing curl commands.
## Quick Start
```bash
# generate a CLI from any OpenAPI spec
uvx openapi2cli generate https://api.example.com/openapi.json --output my-api
# use the generated CLI
python my-api.py users list
python my-api.py users get --id 123
python my-api.py posts create --title "Hello" --body "World"
```
## Features
- **Auto-generates CLI** from OpenAPI 3.x specs
- **Supports auth**: API keys, Bearer tokens, Basic auth
- **Rich help**: `--help` on any command shows params
- **JSON output**: Structured responses for parsing
- **Dry-run mode**: See the request without sending
## Usage
```bash
# from URL
uvx openapi2cli generate https://api.example.com/openapi.json -o my-cli
# from local file
uvx openapi2cli generate ./spec.yaml -o my-cli
# with base URL override
uvx openapi2cli generate ./spec.json -o my-cli --base-url https://api.prod.com
```
## Generated CLI
```bash
# set auth via env
export MY_CLI_API_KEY="sk-..."
# or via flag
python my-cli.py --api-key "sk-..." users list
# see available commands
python my-cli.py --help
# see command options
python my-cli.py users create --help
```
## Example: GitHub API
```bash
uvx openapi2cli generate https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json -o github-cli
python github-cli.py repos list --owner octocat
```
## Why?
AI agents work better with CLIs than raw HTTP:
- Discoverable commands via `--help`
- Tab completion friendly
- No need to construct JSON payloads
- Easy to chain with pipes
## Links
- [PyPI](https://pypi.org/project/openapi2cli/)
- [GitHub](https://github.com/Olafs-World/openapi2cli)
---
## Skill Companion Files
> Additional files collected from the skill directory layout.
### _meta.json
```json
{
"owner": "awlevin",
"slug": "openapi2cli",
"displayName": "OpenAPI to CLI",
"latest": {
"version": "1.0.0",
"publishedAt": 1770356159411,
"commit": "https://github.com/openclaw/skills/commit/90eb9b02e8c9cb1fb59b6201f2436b0a72096bdd"
},
"history": []
}
```