
alexknowshtml/api2cli
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
alexknowshtml/api2cli — это кандидат на навык агента, импортированный из https://github.com/alexknowshtml/api2cli.
Обзор
alexknowshtml/api2cli — это кандидат на навык агента, импортированный из https://github.com/alexknowshtml/api2cli.
Обзор (машинный перевод)
Навык Claude Code, который превращает любой API в рабочий CLI, а затем обертает этот CLI в навык. Направьте его на API-документацию, живой URL или peek-api захват и получите двойной режим Commander.js CLI плюс готовый к использованию навык Claude Code — чтобы любая будущая сессия Claude могла использовать его без чтения кода.
Требуется код Клода — это навык, а не отдельный инструмент. Клод занимается поиском, генерацией и подключением.
Что он делает
- Обнаруживает конечные точки из страниц документации API, живого зондирования или захвата сети через peek-API
- Создает каталог конечных точек с информацией об аутентификации, страницировании и лимите скорости
- Генерирует CLI с одной подкомандой на конечную точку, полнофункциональным API-клиентом и двухрежимным выходом (читаемый человеком в терминале, огибающая JSON при конвейере)
- Генерирует навык — SKILL.md, который учит Клода пользоваться CLI, с командами, примерами и распространёнными рабочими процессами
Пример: API для повторной отправки
Вот как это выглядит, когда вы направляете api2cli на API электронной почты Resend.
Ты говоришь:
Клод обнаруживает 15 конечных точек на 5 ресурсах:
Клод генерирует CLI в точке scripts/resend.ts:
Клод также генерирует навык на .claude/skills/resend/SKILL.md:
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
api2cli
A Claude Code skill that turns any API into a working CLI, then wraps that CLI in a skill. Point it at API docs, a live URL, or a peek-api capture and get a dual-mode Commander.js CLI plus a ready-to-use Claude Code skill – so any future Claude session can pick it up and use it without reading the code.
Requires Claude Code – this is a skill, not a standalone tool. Claude handles the discovery, generation, and wiring.
What It Does
- Discovers endpoints from API docs pages, live probing, or peek-api network captures
- Builds an endpoint catalog with auth, pagination, and rate limit info
- Generates a CLI with one subcommand per endpoint, a full-featured API client, and dual-mode output (human-readable in terminal, JSON envelope when piped)
- Generates a skill – a SKILL.md that teaches Claude how to use the CLI, with commands, examples, and common workflows
Example: Resend API
Here’s what it looks like when you point api2cli at the Resend email API.
You say:
Build me a CLI for the Resend API. Here are the docs: https://resend.com/docs/api-reference
Claude discovers 15 endpoints across 5 resources:
Found 15 endpoints across 5 resources:
emails (3 endpoints): send, get, batch
domains (4 endpoints): list, get, create, delete
api-keys (3 endpoints): list, create, delete
audiences (3 endpoints): list, get, create
contacts (2 endpoints): list, create
Ready to generate the CLI?
Claude generates a CLI at scripts/resend.ts:
# See all commands
$ npx tsx scripts/resend.ts
{
"ok": true,
"command": "resend",
"result": {
"description": "Resend email API CLI",
"commands": [
{ "command": "resend emails send", "description": "Send an email" },
{ "command": "resend emails get ", "description": "Get email by ID" },
{ "command": "resend domains list", "description": "List all domains" },
...
]
}
}
# Send an email
$ npx tsx scripts/resend.ts emails send \
--to [email protected] \
--subject "Hello" \
--html "Hi there"
# List domains (human-readable in terminal)
$ npx tsx scripts/resend.ts domains list
ID Domain Status
re_abc123 example.com verified
re_def456 staging.example.com pending
# Same command piped to an agent (auto-detects, returns JSON)
$ npx tsx scripts/resend.ts domains list | cat
{
"ok": true,
"command": "resend domains list",
"result": { "domains": [...], "count": 2 },
"next_actions": [
{ "command": "resend domains get re_abc123", "description": "View domain details" },
{ "command": "resend emails send --from [email protected]", "description": "Send from verified domain" }
]
}
Claude also generates a skill at .claude/skills/resend/SKILL.md:
---
Рекомендуемые инструменты
Попробуйте другой запрос или уберите фильтр.
Установка
npx skillfish add alexknowshtml/api2cli