SkillAgentSearch skills...

Apimesh

Auto-generate OpenAPI 3.0 specs + interactive HTML API UI from your codebase — in seconds.

Install / Use

/learn @qodex-ai/Apimesh

README

ApiMesh: Code to OpenAPI Docs, Instantly

Python Version License Docker Build Tutorial Examples Discord Twitter

Open-Source OpenAPI Generator – Automatically scan your codebase, generate accurate OpenAPI 3.0 specs, and render a beautiful interactive HTML API UI for instant exploration.

From code to live API docs in seconds — no manual writing, no drift, no hassle.


Overview

ApiMesh is the AI-powered open-source tool that:

  • Scans your codebase automatically.
  • Discovers all REST API endpoints, parameters, auth, and schemas.
  • Generates a valid swagger.json (OpenAPI 3.0).
  • Renders apimesh-docs.html — a fully interactive API UI powered by Swagger UI.

img.png

Open the HTML file in any browser. No server. No setup. Just click and explore.


✨ Key Features

| Feature | Benefit | |-------|--------| | 🔍 Smart Code Discovery | Finds endpoints across frameworks — no annotations needed | | 📄 OpenAPI 3.0 Spec | swagger.json ready for CI/CD, gateways, and tools | | 🌐 Interactive HTML UI | apimesh-docs.htmlinstant API playground with try-it-out | | 🌍 Multi-Language | Python, Node.js, Ruby on Rails, Go, and more | | ⚡ Zero Config Start | One command → full docs + UI | | 📱 Self-Contained HTML | Share via email, GitHub, or CDN — works offline |


🧠 How It Works

A precise, AI-augmented pipeline ensures reliable, up-to-date docs:

  1. Scan RepoFileScanner walks your code (respects .gitignore + config.yml)
  2. Detect Framework → Heuristics + LLM identify Express, FastAPI, Rails, etc.
  3. Harvest Endpoints → Native parsers + LLM extract routes, methods, schemas
  4. Enrich Context → Vector embeddings pull auth, models, examples per endpoint
  5. Generate Specswagger.json built with OpenAI precision
  6. Render UIapimesh-docs.html embedded with Swagger UI — fully interactive
  7. Optional Sync → Push to Qodex.ai for auto-tests and security scans

🌐 Supported Languages & Frameworks

| Language | Frameworks | Detection Method | |--------|------------|------------------| | Python | Django, Flask, FastAPI, DRF | Route files + decorators | | Node.js / TS | Express, NestJS | app.get, Router, decorators | | Ruby on Rails | Rails | routes.rb + controllers | | Go | Gin, Echo, Fiber, Chi, Gorilla Mux, net/http | Tree-sitter router analysis | | Java, etc. | Any REST | LLM fallback + patterns |

Add custom patterns in config.yml — PRs welcome!


📂 Output Files

| File | Location | Purpose | |------|----------|--------| | swagger.json | apimesh/swagger.json | OpenAPI 3.0 spec | | apimesh-docs.html | apimesh/apimesh-docs.html | Interactive API UI — open in browser | | config.json | apimesh/config.json | Persisted CLI configuration (repo path, host, API keys) | | config.yml | Repo root | Customize scan, host, ignores |

Deploy apimesh-docs.html to GitHub Pages, Netlify, or Vercel in 1 click.


Quick Start (30 Seconds)

Option 1: docker (Recommended)

Navigate to your repository

cd /path/to/your/repo

Run interactively - will prompt for any missing inputs

docker run --pull always -it --rm -v $(pwd):/workspace qodexai/apimesh:latest

Option 2: Using MCP

Download the MCP server file

curl https://raw.githubusercontent.com/qodex-ai/apimesh/main/swagger_mcp.py -o swagger_mcp.py

Add this to your MCP settings

{
  "mcpServers": {
    "apimesh": {
      "command": "uv",
      "args": ["run", "/path/to/swagger_mcp/swagger_mcp.py"]
    }
  }
}

Replace /path/to/swagger_mcp/swagger_mcp.py with the actual file path.

Option 3: Curl

Navigate to your repository

cd /path/to/your/repo

Inside your repo root

mkdir -p apimesh && \
  curl -sSL https://raw.githubusercontent.com/qodex-ai/apimesh/refs/heads/main/run.sh -o apimesh/run.sh && \
  chmod +x apimesh/run.sh && apimesh/run.sh

Each run leaves swagger.json, apimesh-docs.html, run.sh, and config.json side-by-side inside the apimesh/ workspace folder.


🤝 Contributing

Contributions are welcome!

Open an issue for bugs, feature requests, or improvements.

Submit PRs to enhance language/framework coverage.

Help us make API documentation automatic and effortless 🚀

Related Skills

View on GitHub
GitHub Stars284
CategoryProduct
Updated1d ago
Forks26

Languages

Python

Security Score

100/100

Audited on Mar 29, 2026

No findings