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.
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.
| 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 |
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
| 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, Java, etc. | Any REST | LLM fallback + patterns |
Add custom patterns in
config.yml— PRs welcome!
| 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.yml |
Repo root | Customize scan, host, ignores |
Deploy
apimesh-docs.htmlto GitHub Pages, Netlify, or Vercel in 1 click.
# Navigate to your repository
cd /path/to/your/repo
# Run interactively - will prompt for any missing inputs
docker run -it --rm -v $(pwd):/workspace qodexai/apimesh:latestDownload the MCP server file
wget https://github.com/qodex-ai/apimesh/blob/main/swagger_mcp.py -O swagger_mcp.pyAdd 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.
curl -sSL https://raw.githubusercontent.com/qodex-ai/apimesh/refs/heads/main/bootstrap_swagger_generator.sh -o swagger_bootstrap.sh \
&& chmod +x swagger_bootstrap.sh \
&& ./swagger_bootstrap.shContributions 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 🚀