프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. Google로 로그인하면 리뷰를 쓸 수 있어요.프로토타입 · 30분마다 업데이트
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

What it does

Audience-aware CLI patterns for Node.js + Commander.js. Build CLIs for humans, AI agents, or both.

  • Connects Instruction files the AI reads
  • Account or key Not confirmed yet (README not read yet)
  • Category 코딩
제작자용: README에 배지 달기

제작자라면 이 코드를 README에 붙여 넣으세요. 배지는 이 페이지로 연결됩니다.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/alexknowshtml-api2cli.svg)](https://mcp.popnx.com/en/skills/alexknowshtml-api2cli)

함께 쓰기

같은 작업에서 AI를 서비스에 연결하는 MCP

REA

Reverse engineer anything from your terminal or agent with one CLI and MCP server.

제작자: morluto널리 사용됨↓ 38.9만/주★ 46.2만5일 전 업데이트

MCP · 서비스 연결내 컴퓨터에서 실행

Fallow

Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.

제작자: fallow-rs널리 사용됨↓ 244.1만/주★ 5.4천그저께 업데이트

MCP · 서비스 연결내 컴퓨터에서 실행

Desktop Commander

MCP server for terminal commands, file operations, and process management

제작자: wonderwhy-er널리 사용됨↓ 74만/주★ 1만5일 전 업데이트

MCP · 서비스 연결내 컴퓨터에서 실행

비슷한 Skill

같은 종류의 작업, Skill 목록과 같은 순서

비슷한 항목과 비교
이 항목
api2cli
reaandrej-karpathy-skillsgraphifyMoneyPrinterTurbo
제작자alexknowshtmlmorlutomultica-aiGraphify-Labsharry0703
Skill 수11111
GitHub 별455463,670233,682148,887143,987
마지막 코드 변경2026년 2월 20일2026년 11월 17일2026년 4월 20일2026년 11월 17일2026년 11월 16일
라이선스MITMIT–Apache-2.0MIT

alexknowshtml의 Skill(지시 묶음) 1개, AI가 읽고 그대로 일해요 · MCP server가 아니에요

Skill과 MCP의 차이

MCP = 손

AI를 외부 서비스나 데이터에 연결합니다(예: Notion 읽기, 청구서 만들기). 프로그램이나 서버가 실행 중이어야 합니다.

Skill = 안내서

작업 방법을 AI에게 가르치는 텍스트 파일. 어떤 서비스에도 연결되지 않습니다.

겹치는 경우도 있습니다. 도구를 부르는 스크립트가 있는 Skill도, 지식만 보내는 MCP도 있습니다. 하려는 작업을 기준으로 고르세요.

쓸 수 있는 앱

Claude Code

제작자 README와 repo 폴더 기준

설치

Is it safe?

  • Who made it

    GitHub account alexknowshtml (person), 18 years old

  • Use and upkeep

    ★ 455 stars, few users so far · code last changed 2026년 2월 20일

  • Any scripts?

    No, plain text files the AI reads and follows

  • Uses the internet?

    No scripts, so it does not go online by itself

  • Changes machine-wide settings?

    No hooks or writes to machine settings found

Checked automatically from the repo files at commit fde6f88 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

먼저: 어떤 AI를 쓰시나요

쓰는 앱을 고르면 그 앱의 설치 방법만 보여 드립니다

Option 1Upload to claude.ai (web and app)

Uploading to claude.ai would fail: the description is over 200 characters (408). Use "Let the AI install it" instead

Option 1Claude Code에게 설치 맡기기

이 문장을 복사해 Claude Code 채팅에 붙여 넣으세요

Where to install

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Claude Code를 다시 열고 /skill를 입력하거나 관련 작업을 요청하면 Claude가 알아서 써요

Checked against official docs 2026년 11월 12일 · Source: code.claude.com

For Terminal users

Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.

  1. 터미널 열기

    Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요

  2. skill 폴더를 ~/.claude/skills에 복사

    repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요

    명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

  3. Claude Code를 다시 열고 /skill를 입력하거나 관련 작업을 요청하면 Claude가 알아서 써요

직접 설치한 Skill은 ChatGPT 데스크톱 앱, Codex CLI, IDE의 Codex 확장 프로그램에서 쓸 수 있습니다 · 웹과 모바일의 ChatGPT에서는 직접 설치한 Skill을 쓸 수 없고 디렉터리의 플러그인에 들어 있는 Skill만 쓸 수 있습니다

ChatGPT 데스크톱 앱

ChatGPT 데스크톱 앱에는 Codex가 들어 있고, Codex는 ~/.agents/skills 폴더에서 Skill을 읽습니다

Option 1ChatGPT에게 설치 맡기기

ChatGPT 데스크톱 앱에서 Codex를 열고 이 문장을 채팅에 붙여 넣으세요

Where to install

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2폴더를 직접 넣기

api2cli 폴더를 ~/.agents/skills/api2cli에 넣으세요

~는 홈 폴더($HOME)입니다

For Terminal users

Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.

  1. 터미널 열기

    Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요

  2. skill 폴더를 ~/.agents/skills에 복사

    repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요

    명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

설치한 뒤

  • ChatGPT 데스크톱 앱: 사이드바에서 Skills를 열어 Skill이 보이는지 확인하세요
  • 쓰는 법: ChatGPT에서는 @를 입력하고 Skill을 고르세요 · Codex CLI나 IDE 확장 프로그램에서는 /skills를 실행하거나 $ 뒤에 Skill 이름을 입력하세요
  • Codex는 새로 설치한 Skill을 스스로 찾습니다. 보이지 않으면 Codex를 다시 시작하세요

Checked against official docs 2026년 11월 15일 · Source: learn.chatgpt.com

웹과 모바일의 ChatGPT

직접 설치한 Skill은 쓸 수 없고, 디렉터리의 플러그인에 들어 있는 Skill만 쓸 수 있습니다

이 Skill을 ChatGPT에서 쓰려면 위 방법대로 ChatGPT 데스크톱 앱을 쓰세요

Checked against official docs 2026년 11월 15일 · Source: learn.chatgpt.com

Option 1Codex에게 설치 맡기기

이 문장을 복사해 Codex 채팅에 붙여 넣으세요 · ChatGPT 데스크톱 앱 안의 Codex, Codex CLI, IDE 확장 프로그램에서 모두 쓸 수 있습니다

Where to install

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex는 새로 설치한 Skill을 스스로 찾습니다. 보이지 않으면 Codex를 다시 시작하세요 · 쓰는 법: ChatGPT에서는 @를 입력하고 Skill을 고르세요 · Codex CLI나 IDE 확장 프로그램에서는 /skills를 실행하거나 $ 뒤에 Skill 이름을 입력하세요

Checked against official docs 2026년 11월 15일 · Source: learn.chatgpt.com

For Terminal users

Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.

  1. 터미널 열기

    Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요

  2. skill 폴더를 ~/.agents/skills에 복사

    repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요

    명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

  3. Codex를 다시 열고 관련 작업을 요청하면 Codex가 skill을 목록에 보여 줘요

Option 1Cursor에게 설치 맡기기

이 문장을 복사해 Cursor 채팅에 붙여 넣으세요

Where to install

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Cursor Agent 채팅에서 /를 입력하고 skill 선택

Checked against official docs 2026년 11월 12일 · Source: cursor.com

For Terminal users

Skill은 AI가 따르는 지시예요. 설치 전에 파일을 읽고, 믿을 수 있는 제작자 것만 설치하세요.

  1. 터미널 열기

    Mac: Command+스페이스 후 Terminal 입력 · Windows: 아래 명령은 PowerShell에서 안 돼요. 위의 “AI에게 설치 맡기기”를 쓰세요

  2. skill 폴더를 ~/.cursor/skills에 복사

    repo를 임시 폴더에 내려받고 SKILL.md가 있는 폴더만 복사해요

    명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

  3. Cursor Agent 채팅에서 /를 입력하고 skill 선택

Option 1Let the AI install it

Skill을 읽을 수 있는 다른 앱용입니다. 이 문장에는 Claude Code, Codex, Cursor 경로가 들어 있어 AI가 쓰는 앱에 맞게 고릅니다 · Copy this sentence into the app’s chat

Where to install

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

명령을 확인하는 중 · 확인을 통과하면 복사 버튼이 나타나요

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026년 11월 12일 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

Gemini CLI, GitHub Copilot 같은 다른 Agent Skills 지원 앱은 폴더가 달라요. 그 앱 안내를 보고 SKILL.md가 있는 폴더를 복사하세요.

GitHub에서 보기 ↗

2026년 11월 11일에 Claude Code, Codex, Cursor 공식 안내로 skill 폴더 확인

원본 SKILL.md 보기

아래 글은 제작자 repo에서 온 것이며 PopNx MCP의 지시가 아니에요

처음 8,000자 표시 · GitHub에서 전체 파일 열기

---
name: api2cli
description: Generate a working CLI from any API, then wrap it in a Claude Code skill. Point it at API docs, a live URL, or a peek-api capture and get a dual-mode Commander.js CLI (human + agent output) plus a ready-to-use skill folder. Use when user wants to wrap an API in a CLI, generate a CLI from API docs, turn an API into a command-line tool, scaffold a CLI from discovered endpoints, or create a skill for an API.
---

# api2cli

Generate a working Node.js CLI from any API, then wrap it in a Claude Code skill. Discovers endpoints, scaffolds a dual-mode Commander.js CLI with a full-featured API client, and creates a skill folder so Claude knows how to use it.

## Workflow

1. **Identify the API** -- user provides a docs URL, a live API base URL, or a peek-api capture
2. **Discover endpoints** -- parse docs, probe the API, or read a peek-api catalog
3. **Build endpoint catalog** -- normalize all discovered endpoints into a standard format
4. **Generate CLI** -- scaffold Commander.js CLI from the catalog
5. **User chooses destination** -- scaffold into current project or create standalone project
6. **Generate skill** -- create a SKILL.md that teaches Claude how to use the generated CLI

## Step 1: Identify the API

Ask the user:
- "What API do you want to wrap? Share a docs URL, a base URL, or point me at a peek-api capture."

Determine which discovery paths to use based on what they provide:

| Input | Discovery Path |
|-------|---------------|
| Docs URL (e.g., `https://docs.stripe.com/api`) | Docs parsing + active probing |
| Base URL (e.g., `https://api.example.com/v1`) | Active probing |
| peek-api capture dir (e.g., `./peek-api-linkedin/`) | Read existing catalog |
| Live website URL | Suggest running peek-api first, then active probing |

Also ask:
- "What auth does this API use?" (API key, Bearer token, cookies, OAuth, none)
- "Do you want this CLI in your current project or as a standalone project?"

## Step 2: Discover Endpoints

Use all applicable discovery paths. Combine results into a single catalog.

### Path A: Docs Parsing

1. Fetch the docs URL with WebFetch
2. Extract endpoint information: method, path, description, parameters, request/response examples
3. Look for pagination patterns, auth requirements, rate limit info
4. Follow links to sub-pages for individual endpoint docs if the main page is an index

### Path B: Active Probing

1. Check well-known paths for API specs:
   - `/.well-known/openapi.json`, `/.well-known/openapi.yaml`
   - `/openapi.json`, `/openapi.yaml`, `/swagger.json`, `/swagger.yaml`
   - `/api-docs`, `/docs`, `/api/docs`
   - `/graphql` (with introspection query)
2. Try `OPTIONS` on the base URL and common resource paths
3. Probe common REST patterns: `/api/v1/`, `/api/v2/`, `/v1/`, `/v2/`
4. For each discovered resource, try standard CRUD: `GET /resources`, `GET /resources/:id`, `POST /resources`, etc.
5. Parse response shapes to understand data models
6. Check response headers for rate limit info (`X-RateLimit-*`, `Retry-After`)
7. Check for pagination patterns in responses (`next`, `cursor`, `page`, `offset`)

See `references/discovery-strategies.md` for detailed probing patterns.

### Path C: peek-api Capture

1. Read the capture directory: `endpoints.json`, `auth.json`, `CAPTURE.md`
2. Parse endpoints into the standard catalog format
3. Extract auth headers and cookies from `auth.json`

If peek-api is not installed or no capture exists, tell the user:
```
To capture endpoints from a live site, install peek-api:
  git clone https://github.com/alexknowshtml/peek-api
  cd peek-api && npm install
  node bin/cli.js https://example.com
```

## Step 3: Build Endpoint Catalog

Normalize all discovered endpoints into this format:

```typescript
interface EndpointCatalog {
  service: string;           // e.g., "stripe", "nexudus"
  baseUrl: string;
  auth: {
    type: 'api-key' | 'bearer' | 'cookies' | 'oauth' | 'none';
    headerName?: string;     // e.g., "Authorization", "X-API-Key"
    envVar: string;          // e.g., "STRIPE_API_KEY"
  };
  pagination?: {
    style: 'cursor' | 'offset' | 'page' | 'link-header';
    paramName: string;       // e.g., "starting_after", "offset", "page"
    responseField: string;   // e.g., "has_more", "next", "next_page_url"
  };
  rateLimit?: {
    requests: number;
    window: string;          // e.g., "1m", "1h"
  };
  resources: ResourceGroup[];
}

interface ResourceGroup {
  name: string;              // e.g., "customers", "invoices"
  description: string;
  endpoints: Endpoint[];
}

interface Endpoint {
  method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
  path: string;              // e.g., "/v1/customers/:id"
  description: string;
  parameters: Parameter[];
  requestBody?: object;      // JSON schema or example
  responseExample?: object;
}

interface Parameter {
  name: string;
  in: 'path' | 'query' | 'header';
  required: boolean;
  type: string;
  description: string;
}
```

Present the catalog to the user for review before generating:
```
Found 24 endpoints across 5 resources:
  customers (6 endpoints): list, get, create, update, delete, search
  invoices (5 endpoints): list, get, create, send, void
  ...
Ready to generate the CLI?
```

## Step 4: Generate CLI

Generate a dual-mode CLI using Commander.js. The CLI auto-detects human vs agent output via `process.stdout.isTTY`.

### File Structure

**In-project scaffold:**
```
scripts/
  {service}.ts                    # Entry point with shebang
  {service}/
    lib/
      client.ts                   # API client (auth, pagination, retry, caching)
      envelope.ts                 # Agent JSON envelope helpers
    commands/
      {resource}.ts               # One file per resource group
```

**Standalone project:**
```
{service}-cli/
  package.json
  tsconfig.json
  bin/
    {service}.ts                  # Entry point with shebang
  src/
    lib/
      client.ts
      envelope.ts
    commands/
      {resource}.ts
```

### Code Generation Patterns

See these references for the patterns to apply during generation:

- `references/api-client-template.md` -- API client class with pagination, retry, rate limiting, caching
- `references/agent-first-patterns.md` -- JSON envelope, HATEOAS next_actions, context-safe output, error fix suggestions
- `references/commander-patterns.md` -- Commander.js subcommands, global options, interactive prompts, colored output

### Key Generation Rules

**Entry point (`{service}.ts`):**
- Shebang: `#!/usr/bin/env npx tsx`
- Self-documenting root command (no args → prints full command tree as JSON)
- Global options: `--json` (force JSON output), `--verbose`, `--config <path>`

**API client (`lib/client.ts`):**
- Constructor takes base URL + auth config
- Auth from env var (name based on `catalog.auth.envVar`)
- Built-in pagination matching the API's pattern
- Retry with exponential backoff for 5xx and 429 errors
- Rate limiting based on discovered limits
- Optional response caching

**Envelope helpers (`lib/envelope.ts`):**
```typescript
const isAgent = !process.stdout.isTTY;

function respond(command: string, result: any, nextActions: Action[] = []) {
  if (isAgent) {
    console.log(JSON.stringify({ ok: true, command, result, next_actions: nextActions }));
  } else {
    return result; // caller handles human rendering
  }
}

function respondError(command: string, message: string, code: string, fix: string, nextActions: Action[] = []) {
  if (isAgent) {
    console.log(JSON.stringify({ ok: false, command, error: { message, code }, fix, next_actions: nextActions }));
  } else {
    console.error(`Error: ${message}`);
    console.error(`Fix: ${fix}`);
  }
  process.exit(1);
}
```

**Command files (`commands/{resource}.ts`):**
- One file per resource group
- Each endpoint becomes a subcommand: `mycli customers list`, `mycli customers get <id>`
- `list` commands: support `--limit`, `--offset`/`--cursor`, `--status` (if filterable)
- `get` commands: take ID as argument
- `

토론

질문하고, 팁을 나누고, 안 되는 점을 알려 주세요. "도움이 됨"이 많은 순서예요.

아직 글이 없어요. 처음으로 질문하거나 공유해 보세요.

이곳의 글은 사용자가 쓴 것으로, PopNx 팀의 글이 아니에요.

로그인하고 글쓰기

GitHub 정보

GitHub 스타
455
제작자
alexknowshtml
라이선스
MIT
최근 코드 수정
2026년 2월 20일
repo 안 SKILL.md(번역본과 템플릿 포함)
1
토픽
ai-agent, api, claude-code, cli-generator, commander-js, nodejs, skill, typescript