AA

alexknowshtml/api2cli

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

454 stars 品質 59 トレンド 20MIT

alexknowshtml/api2cli は、https://github.com/alexknowshtml/api2cli. からインポートされたエージェントスキル候補です。

概要

alexknowshtml/api2cli は、https://github.com/alexknowshtml/api2cli. からインポートされたエージェントスキル候補です。

概要(AI 翻訳)

どんなAPIも動作するCLIに変換し、そのCLIをスキルでラップするClaude Codeスキルです。APIドキュメントやライブURL、ピークAPIキャプチャに向ければ、デュアルモードのCLI Commander.jsすぐに使えるClaude Codeスキルも手に入れられます。そうすれば、今後のClaudeセッションでもコードを読まずに使えます。

Claude Codeが必要です — これはスキルであり、単独のツールではありません。Claudeは発見、生成、配線を担当します。

それが何をするのか

  1. APIドキュメントのページ、ライブプロービング、またはピークAPIネットワークキャプチャからエンドポイントを発見
  2. 認証、ページネーション、レート制限情報を含むエンドポイントカタログを構築する
  3. **各エンドポイントに1つのサブコマンドを持つCLIを生成し、フル機能のAPIクライアント、デュアルモード出力(ターミナルでは人間が読み、パイプで送信時はJSONエンベロープ)
  4. スキルを生成する — CLIの使い方を教える SKILL.md で、コマンド、例、一般的なワークフローを含みます

例:再送信 API

api2cliをResend email APIに指すと、こういう感じです。

あなたはこう言う:

Claudeは5つのリソースで15のエンドポイントを発見:

Claudeはscripts/resend.ts: でCLIを生成します

クロードは.claude/skills/resend/SKILL.md:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

  1. Discovers endpoints from API docs pages, live probing, or peek-api network captures
  2. Builds an endpoint catalog with auth, pagination, and rate limit info
  3. 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)
  4. 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:

---
GitHub で README 全文を見る

推奨ツール

別のキーワードを試すか、フィルタを外してください。

インストール

npx skillfish add alexknowshtml/api2cli
MCP 初心者?mcpskill.org のガイドから始めましょう →