プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Openapi Sync MCP

作者:akintomiwa-fisayoバージョン 6.4.2i★ 1iパソコンで動くリポジトリ ↗
レジストリ名io.github.akintomiwa-fisayo/openapi-sync-mcp

インストール方法

What it does

Type-safe MCP server for OpenAPI Sync to inspect, validate, and synchronize OpenAPI specs.

  • Connects パソコンで動く
  • Account or key No key needed
  • Category 開発者ツール

一緒に使える

この種の作業を AI に教える Skill。これと一緒に使えます

rea

Reverse engineer anything with agents, from app behavior down to native binaries.

作者:morluto★ 467,2351 個の skill

Skill · 手順書

andrej-karpathy-skills

A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.

作者:multica-ai★ 234,1251 個の skill

Skill · 手順書ライセンス記載なし

graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

作者:Graphify-Labs★ 149,8731 個の skill

Skill · 手順書

この順位の理由

一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり

人気23/80GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます
新しさ12/1230 日以内のリリースかコード更新で満点
応答中0/8前回の確認でクラウドのエンドポイントが応答
利用スコア35/100

品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: 59 (「急上昇」タブでのみ使用)

インストール

使っているAIアプリを選んで、設定をコピーしてください。

ひとことで AI にインストールしてもらう

Openapi Sync MCP をインストールして。https://mcp.popnx.com/i/akintomiwa-fisayo-openapi-sync-mcp.md に従い、コマンドを見せて、私が OK するまで実行しないで。

パソコンで作業できる AI(Claude Code や Cursor など)に貼り付けます。手順を読み、コマンドを見せて、あなたの OK を待ちます。キー不要・登録不要。 · AI が読む全文を見る

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月13日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server Openapi Sync MCP を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "openapi-sync": { "command": "npx", "args": [ "-y", "openapi-sync-mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Openapi Sync MCP のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "openapi-sync": {
          "command": "npx",
          "args": [
            "-y",
            "openapi-sync-mcp"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    Openapi Sync MCP を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が Openapi Sync MCP を使っていると言うか、回答に Openapi Sync MCP のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ Openapi Sync MCP につなげません

Openapi Sync MCP はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · Openapi Sync MCP につなげるアプリを使う

  • 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)

B · 開発者ツール の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server Openapi Sync MCP を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user openapi-sync -- npx -y openapi-sync-mcp 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Openapi Sync MCP のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user openapi-sync -- npx -y openapi-sync-mcp
  4. Claude Code で /mcp と入力

    Openapi Sync MCP が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    Openapi Sync MCP を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が Openapi Sync MCP を使っていると言うか、回答に Openapi Sync MCP のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server Openapi Sync MCP を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "openapi-sync": { "command": "npx", "args": [ "-y", "openapi-sync-mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Openapi Sync MCP のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    Openapi Sync MCP を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が Openapi Sync MCP を使っていると言うか、回答に Openapi Sync MCP のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server Openapi Sync MCP を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "openapi-sync": { "type": "stdio", "command": "npx", "args": [ "-y", "openapi-sync-mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Openapi Sync MCP のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    Openapi Sync MCP を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が Openapi Sync MCP を使っていると言うか、回答に Openapi Sync MCP のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?Openapi Sync MCP を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user openapi-sync -- npx -y openapi-sync-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "openapi-sync": {
      "command": "npx",
      "args": [
        "-y",
        "openapi-sync-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "openapi-sync": {
      "command": "npx",
      "args": [
        "-y",
        "openapi-sync-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "openapi-sync": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "openapi-sync-mcp"
      ]
    }
  }
}

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
888/週
接続方法
パソコンで動く
最新バージョンi
6.4.2
レジストリ公開日i
2026年9月18日
コードの最終更新i
2026年11月15日
作者
akintomiwa-fisayo
パッケージ
npm: openapi-sync-mcp
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月19日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント akintomiwa-fisayo で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:4 日前

  • ✓ 合格

    ライセンスがある

    ISCを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

OSV.dev に openapi-sync-mcp@6.4.2 の登録はありません

このバージョンのパッケージ本体のみ確認。すべての依存関係ではありません · 確認日 2026年11月15日

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける

作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/akintomiwa-fisayo-openapi-sync-mcp.svg)](https://mcp.popnx.com/en/servers/akintomiwa-fisayo-openapi-sync-mcp)

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

ユーザーレビュー

まだレビューはありません

ログインしてレビューを書く

開発者ツールのほかのサーバーとの比較i

  • このカテゴリのほかの6103件のうち69%よりスターが多い
  • このカテゴリのほかの6103件のうち37%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの6103件のうち99%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Openapi Sync MCPは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は4 日前、最新バージョン(6.4.2)がレジストリに届いたのは2 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

作者:ahmedkhaleel2004広く使われている★ 1.9万2 か月前更新

クラウドで動く✓ 提供元 · gitdiagram.comPopNx チームが実際に試用

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

作者:Appllama広く使われている★ 52273 か月前更新

クラウドで動く✓ 提供元 · appllama.io

Omnara

Deploy durable AI agents with Omnara, an open-source managed-agent platform.

作者:omnara-ai広く使われている★ 34172 か月前更新

クラウドで動く✓ 提供元 · omnara.com

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

作者:repowise-dev広く使われている↓ 6506/週★ 8170 リポジトリ全体のスター6 日前更新

パソコンでもクラウドでも✓ 提供元 · repowise.dev
似たものと比べる
これ
Openapi Sync MCP
GitDiagramAppllamaCloudflare MCPOmnaraRepowise
動く場所パソコンにインストールが必要クラウドで動き、インストール不要クラウドで動き、インストール不要クラウドで動き、インストール不要クラウドで動き、インストール不要クラウドでもパソコンにインストールでも使える
キーが必要いいえいいえいいえいいえいいえいいえ
Claude で + から追加いいえいいえいいえはいいいえいいえ
基本チェック3/34/44/44/44/45/5
ライセンスISCMITMITApache-2.0Apache-2.0AGPL-3.0
料金登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

OpenAPI Sync

OpenAPI Sync is a powerful developer tool that automates the synchronization of your API documentation with your codebase using OpenAPI (formerly Swagger) specifications. It generates TypeScript types, fully-typed API clients (Fetch, Next.js Fetch, Axios, React Query, SWR, RTK Query), endpoint definitions, runtime validation schemas (Zod, Yup, Joi), and comprehensive documentation from your OpenAPI schema—ensuring type safety from API specification through client implementation to runtime validation.

📘 [Full documentation available at openapi-sync.com](https://openapi-sync.com)

Core Features

  • ⚡ Zero-Config Presets - 10 pre-configured framework presets (React Query, SWR, Axios, Fetch, RTK Query, Next.js, Python) for instant setup
  • 🔄 Real-time API Synchronization - Automatically syncs OpenAPI specs from remote URLs with configurable intervals
  • 📝 Automatic Type Generation - Generates TypeScript interfaces for all endpoints with full nested support
  • 🔐 Runtime Validation - Generate Zod, Yup, or Joi schemas from OpenAPI specs with all constraints preserved
  • 🎯 Interactive Setup Wizard - Streamlined configuration with auto-enabled tag-based folder splitting
  • 🛡️ Enterprise Ready - Error handling, validation, state persistence, and custom code preservation
  • 📦 Folder Splitting - Organize code by tags or custom logic with aggregator files for easy imports
  • 📚 Rich Documentation - JSDoc comments with cURL examples and inline usage guides
  • 🤖 Agent-Ready Endpoints - Browse endpoints with pagination and path filtering, inspect deep endpoint details, and read generated types without reloading the spec
  • 🩺 Diagnostic Doctor - Diagnostic health checks for config validity, spec accessibility, peer dependencies, cache, and folder write permissions
  • 🧹 Stale File Purge - Manifest-based stale code detection and cleanup with dry-run support to prevent orphaned code
  • 🔄 Custom Code Injection - Preserve your custom code between regenerations with protected sections

View all features →

Installation

npm install openapi-sync

or

npm install -g openapi-sync

or use directly

npx openapi-sync


🤖 Using with AI Agents

All CLI commands and programmatic APIs are agent-safe — no interactive prompts, fully non-blocking. Use --json for machine-readable output and --silent to suppress logs.

Full agent reference: llms.txt — a structured discovery file for LLMs, Copilots, and MCP tools.

Agent Quick-Start (no prompts)
# 1. Create config (all settings as flags — no stdin required)

npx openapi-sync init --no-interactive \ --api-name petstore \ --api-url https://petstore3.swagger.io/api/v3/openapi.json \ --output-folder ./src/api \ --client-type react-query \ --validation-library zod \ --config-format typescript \ --json

Or for protected specs, configure auth directly on init:

npx openapi-sync init --no-interactive \ --api-name backend \ --api-url https://api.example.com/openapi.json \ --auth-type bearer \ --auth-token '${env.SPEC_TOKEN}' \ --preset react-query-zod \ --json

2. Validate config + specs before writing any files

npx openapi-sync validate --json

3. Sync — generate types, endpoints, and schemas

npx openapi-sync --json

4. Generate a typed API client

npx openapi-sync generate-client --type react-query --json

Machine-Readable Output (--json)

Every command emits a single, pure JSON object to stdout when --json is passed, making it safe to pipe directly into jq or consume from automated agents. All human-readable progress logs are suppressed or directed to stderr.

$ npx openapi-sync --json

{ "success": true, "apis": ["petstore"], "filesWritten": ["src/api/petstore/types.ts", "src/api/petstore/endpoints.ts"], "endpointCount": 20, "warnings": [], "errors": [], "phases": { "sync": { "filesWritten": ["src/api/petstore/types.ts", "src/api/petstore/endpoints.ts"], "endpointCount": 20 }, "client": { "filesWritten": [], "endpointCount": 20 } } }

$ npx openapi-sync validate --json

{ "valid": true, "apis": { "petstore": { "valid": true, "endpointCount": 20 } }, "configErrors": [] }

$ npx openapi-sync list-endpoints --json

{ "petstore": [ { "name": "getPetById", "method": "GET", "path": "/pet/{petId}", "tags": ["pet"], "summary": "Find pet by ID" }, { "name": "addPet", "method": "POST", "path": "/pet", "tags": ["pet"], "summary": "Add a new pet" } ] }

$ npx openapi-sync list-endpoints --api petstore --path-contains pet --limit 2 --offset 0 --json
$ npx openapi-sync get-endpoint --api petstore --operation-id getPetById --json
$ npx openapi-sync read-type --api petstore --type-name Pet --json
Dry Run (preview without writing files)

Compact, fast previews of planned files:

npx openapi-sync --dry-run --json

npx openapi-sync generate-client --type fetch --dry-run --json

Layouts & Output Directories
  • Flat Mode (Default): When folderSplit is omitted or empty ({}), files are placed directly in the API folder (endpoints.ts, types/index.ts, types/shared.ts).
  • Tag-Split Mode: Setting folderSplit: { byTags: true } organizes endpoints into tag subfolders (e.g. {tag}/endpoints.ts, {tag}/types.ts, shared.ts).
  • Custom Client Directory: clientGeneration.outputDir (or CLI --output) is fully supported in both flat and folder-split layouts. In flat mode, clients are placed directly in {outputDir}/clients.ts (or api.ts), while in folder-split mode clients are placed in {outputDir}/{tag}/client.ts and aggregated at {outputDir}/clients.ts, with relative imports resolving back to your generated types and endpoints.
Programmatic API (TypeScript)
import {

ValidateConfig, Init, GenerateClient, ListEndpoints, GetEndpointDetails, ReadGeneratedType, Doctor, Purge, } from "openapi-sync";

// Pre-flight check — no files written const validation = await ValidateConfig({ silent: true }); if (!validation.valid) throw new Error(JSON.stringify(validation));

// Diagnostic health check on config, specs, peer dependencies, and directories const health = await Doctor({ silent: true }); console.log("Health check:", health.healthy ? "All checks passed" : "Issues detected");

// Inspect API surface with pagination and filtering const endpoints = await ListEndpoints({ apiName: "petstore", pathContains: "pet", limit: 5, offset: 0, silent: true, }); console.log(endpoints.petstore.length, "endpoints found");

// Inspect a single endpoint in full detail (4-tier fuzzy matching) const detail = await GetEndpointDetails({ apiName: "petstore", operationId: "getPetById", silent: true }); console.log(detail.endpoint.path);

// Read an exact generated type declaration (with optional line pagination) const typeDecl = await ReadGeneratedType({ apiName: "petstore", typeName: "Pet", silent: true }); console.log(typeDecl);

// Sync and get structured result const syncResult = await Init({ silent: true }); if (!syncResult.success) throw new Error(JSON.stringify(syncResult)); console.log("Files written:", syncResult.filesWritten);

// Generate client const clientResult = await GenerateClient({ type: "react-query", silent: true }); console.log(JSON.stringify(clientResult));

// Detect and purge stale files from disk const purgeResult = await Purge({ yes: true, silent: true }); console.log("Purged files:", purgeResult.purged);

Exit Codes
CodeMeaning
0Success
1Config error or validation failed
2Network / spec fetch error
3Generation / file write error
Agent-safe vs Interactive Commands
CommandAgent-safe?Description
npx openapi-sync✅Sync specs, generate types, endpoints, schemas
npx openapi-sync validate✅Validate config + specs; no files written
npx openapi-sync doctor✅Diagnostic health check on config, network, peer deps, cache
npx openapi-sync list-endpoints✅List endpoints with filtering and pagination; no files written
npx openapi-sync get-endpoint✅Inspect detailed schema for one endpoint by operationId or name
npx openapi-sync read-type✅Read generated TypeScript declaration block
npx openapi-sync generate-client✅Generate typed API client (fetch, next-fetch, axios, react-query, swr, rtk-query)
npx openapi-sync purge --yes✅Remove stale generated files without prompting
npx openapi-sync init --no-interactive✅Create config file without prompts
npx openapi-sync init (no flag)❌Interactive wizard (requires stdin)

Quick Start

Option 1: Interactive Setup (Recommended) 🎯

The easiest way to get started is with the interactive setup wizard:

npx openapi-sync init

The wizard will guide you through:

  • 📝 Configuration file format selection (TypeScript, JSON, or JavaScript)
  • 🌐 API specification source (URL or local file)
  • 📁 Folder organization options (split by tags or custom logic)
  • 🚀 Client generation options (React Query, SWR, Fetch, Axios, RTK Query)
  • ✅ Validation library setup (Zod, Yup, Joi)
  • 🔧 Custom code preservation settings
  • 🏷️ Type naming preferences (operationId usage, prefix)
  • 🚫 Endpoint filtering (exclude by tags)
  • 📚 Documentation options (cURL examples)
Option 2: Manual Setup

1. Create `openapi.sync.json` in your project root:

{

"refetchInterval": 5000, "folder": "./src/api", "api": { "petstore": "https://petstore3.swagger.io/api/v3/openapi.json" } }

2. Run the sync command:

npx openapi-sync

3. Use generated types and endpoints:

import { getPetById } from "./src/api/petstore/endpoints";

import { IPet } from "./src/api/petstore/types";

const petUrl = getPetById("123"); // Returns: "/pet/123"

View detailed quick start guide →

⚡ Presets (Zero-Config Framework Setup)

Presets bundle opinionated defaults for your framework, client library, and validation stack into a single name. Instead of configuring dozens of settings by hand, pick a preset during npx openapi-sync init or set "preset": " " in your config file. Any explicit configuration values you define always override preset defaults.

Preset NameTarget Framework / HTTP ClientValidation LibraryFeatures ConfiguredRecommended Dependencies
react-query-zod *(Default/Recommended)*TanStack React Query v5ZodTyped Query & Mutation hooks, Zod schemas, preserved custom code, operationId namingnpm i @tanstack/react-query axios zod
react-query-yupTanStack React Query v5YupTyped Query & Mutation hooks, Yup validation schemas, preserved custom codenpm i @tanstack/react-query axios yup
swr-zodVercel SWRZodSWR hooks with mutation support (useSWRMutation), Zod schemas, preserved custom codenpm i swr axios zod
swr-yupVercel SWRYupSWR hooks with mutation support, Yup schemas, preserved custom codenpm i swr axios yup
axios-zodAxios ClientZodStandalone typed Axios client instance, Zod schemas, preserved custom codenpm i axios zod

| axios-joi | Axios Client | Joi | Standalone typed Axios client, Joi validation schemas (great for

冒頭だけを表示しています。続きはリポジトリで読めます