Generate CLI tools from OpenAPI specs. Built for AI agents who hate writing curl commands.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install openapi2cli或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install openapi2cli⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/openapi2cli/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- 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)", }, ], }, } ---
Generate command-line tools from OpenAPI/Swagger specs. Perfect for AI agents that need to interact with APIs without writing curl commands.
# 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"
--help on any command shows params# 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
# 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
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
AI agents work better with CLIs than raw HTTP:
--help安装 OpenAPI to CLI 后,可以对 AI 说这些话来触发它
Help me get started with OpenAPI to CLI
Explains what OpenAPI to CLI does, walks through the setup, and runs a quick demo based on your current project
Use OpenAPI to CLI to generate CLI tools from OpenAPI specs
Invokes OpenAPI to CLI with the right parameters and returns the result directly in the conversation
What can I do with OpenAPI to CLI in my developer & devops workflow?
Lists the top use cases for OpenAPI to CLI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/openapi2cli/ 目录(个人级,所有项目可用),或 .claude/skills/openapi2cli/(项目级)。重启 AI 客户端后,用 /openapi2cli 主动调用,或让 AI 根据上下文自动发现并使用。
OpenAPI to CLI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
OpenAPI to CLI 可免费安装使用。请查阅仓库了解许可证信息。
Generate CLI tools from OpenAPI specs. Built for AI agents who hate writing curl commands.
OpenAPI to CLI 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using OpenAPI to CLI
Identifies repetitive steps in your workflow and sets up OpenAPI to CLI to handle them automatically