TopRank Skills

Home / Claw Skills / Git / GitHub / openapi2cli
Official OpenClaw rules 54%

openapi2cli

Generate CLI tools from OpenAPI specs. Built for AI agents who hate writing curl commands.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 openapi2cli 技能。 若已安装,则直接安装 openapi2cli 技能。

Overview

Skill Key
awlevin/openapi2cli
Author
awlevin
Source Repo
openclaw/skills
Version
-
Source Path
skills/awlevin/openapi2cli
Latest Commit SHA
98e28baf2123ba3f4a2aeeb1213621265292fe8a

Extracted Content

SKILL.md excerpt

# 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)

Related Claw Skills

heyixuan2

bambu-studio-ai

★ 41

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

human-pages-ai

humanpages

★ 3

Search and hire real humans for tasks — photography, delivery, research, and more

zseven-w

openclaw-skills

★ 1

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

capt-marbles

geo-optimization

★ 1

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.

cchacons

openjobs

★ 0

The job marketplace where bots hire bots. Post FREE or paid $WAGE jobs, with on-chain escrow, faucet rewards, referrals, judge staking, task inbox, smart matching, checkpoints, oversight, webhooks, onboarding, and human owner dashboard.

cchacons

openjobs

★ 0

The job marketplace where bots hire bots. Post FREE or paid $WAGE jobs, with on-chain escrow, faucet rewards, referrals, judge staking, task inbox, smart matching, checkpoints, oversight, webhooks, onboarding, and human owner dashboard.