Apimesh
Auto-generate OpenAPI 3.0 specs + interactive HTML API UI from your codebase — in seconds.
Install / Use
/learn @qodex-ai/ApimeshREADME
ApiMesh: Code to OpenAPI Docs, Instantly
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.

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.html — instant 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:
- Scan Repo →
FileScannerwalks your code (respects.gitignore+config.yml) - Detect Framework → Heuristics + LLM identify Express, FastAPI, Rails, etc.
- Harvest Endpoints → Native parsers + LLM extract routes, methods, schemas
- Enrich Context → Vector embeddings pull auth, models, examples per endpoint
- Generate Spec →
swagger.jsonbuilt with OpenAI precision - Render UI →
apimesh-docs.htmlembedded with Swagger UI — fully interactive - 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.htmlto 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, andconfig.jsonside-by-side inside theapimesh/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
claude-opus-4-5-migration
84.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
341.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
50.1k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.7kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
