https://github.com/matrixxboy/apimatic
Apimatic automates the creation of API documentation. This module intelligently fetches data from your APIs and compiles it into a clear, organized .md file, eliminating manual updates. It ensures your documentation is always accurate and up-to-date, freeing you to focus on development.
https://github.com/matrixxboy/apimatic
ai airflow api explainer gemini-api groq-api npm ollama openai-api python-package pytohn3
Last synced: 26 days ago
JSON representation
Apimatic automates the creation of API documentation. This module intelligently fetches data from your APIs and compiles it into a clear, organized .md file, eliminating manual updates. It ensures your documentation is always accurate and up-to-date, freeing you to focus on development.
- Host: GitHub
- URL: https://github.com/matrixxboy/apimatic
- Owner: Matrixxboy
- License: mit
- Created: 2025-08-25T10:29:04.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-09-01T05:06:43.000Z (6 months ago)
- Last Synced: 2025-10-08T16:50:06.974Z (4 months ago)
- Topics: ai, airflow, api, explainer, gemini-api, groq-api, npm, ollama, openai-api, python-package, pytohn3
- Language: Python
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Apimatic 🚀
[](https://github.com/Matrixxboy)
[](https://pypi.org/project/Apimatic/)
[](https://pepy.tech/project/Apimatic)
[](https://pypi.org/project/Apimatic/)
[](LICENSE)
A tool to **automatically generate beautiful and comprehensive API documentation** (Markdown) from your source code.
Supports **Flask, FastAPI, and more frameworks** with optional **AI-powered enhancements via Ollama, OpenAI, Google Gemini, and Groq**.
---
## 📦 Installation
```bash
# Run this in your global environment
pip install Apimatic
```
Upgrade to the latest version:
```bash
pip install --upgrade Apimatic
```
---
## ⚡ Usage
Apimatic now uses commands to separate actions.
**1. Generate Documentation:**
```bash
apimatic generate [OPTIONS]
```
**2. Configure API Keys:**
```bash
apimatic config [OPTIONS]
```
---
## 🔑 Configuration
To use AI enhancements from providers like OpenAI, Google Gemini, or Groq, you must set an API key.
```bash
# Set your OpenAI API key
apimatic config --set-openai-key YOUR_API_KEY
# Set your Google Gemini API key
apimatic config --set-gemini-key YOUR_API_KEY
# Set your Groq API key
apimatic config --set-groq-key YOUR_API_KEY
```
The key will be stored securely in your home directory.
---
## ⚙️ Generation Options
| Option | Description |
| --- | --- |
| `-h, --help` | Show help message and exit |
| `--src SRC` | Root directory of the project to scan (Default: current directory) |
| `--framework [FRAMEWORK ...]` | Force a specific framework (`flask`, `fastapi`, etc.). If omitted, auto-detected |
| `--format {markdown}` | Output format (Default: `markdown`) |
| `--output OUTPUT` | Path for the generated output file (Default: `API_Docs.md`) |
| `--use-ollama` | Enhance with a local Ollama model |
| `--ollama-model MODEL` | Ollama model to use (e.g., `phi3:mini`) |
| `--use-openai` | Enhance with an OpenAI model |
| `--openai-model MODEL` | OpenAI model to use (e.g., `gpt-4o-mini`) |
| `--use-google-gemini` | Enhance with a Google Gemini model |
| `--google-gemini-model MODEL` | Gemini model to use (e.g., `gemini-1.5-flash`) |
| `--use-groq` | Enhance with a Groq model |
| `--groq-model MODEL` | Groq model to use (e.g., `llama3-8b-8192`) |
---
## 📝 Examples
**Basic Generation:**
```bash
# Generate Markdown docs from the current project
apimatic generate --src . --output API_Docs.md
```
**Force Framework:**
```bash
# Force detection for a Flask app
apimatic generate --src ./my_flask_app --framework flask
```
**AI-Enhanced Documentation:**
First, set your key:
```bash
apimatic config --set-openai-key sk-xxxxxxxx
```
Then, generate with enhancement:
```bash
# Use OpenAI's gpt-4o-mini model
apimatic generate --src . --use-openai --openai-model gpt-4o-mini
# Use Google Gemini
apimatic generate --src . --use-google-gemini
# Use Groq's fast Mixtral model
apimatic generate --src . --use-groq
# Use a local Ollama model
apimatic generate --src . --use-ollama --ollama-model phi3:mini
```
---
## 🤖 Recommended AI Models
| Provider | Recommended Model | Notes |
| --- | --- | --- |
| **Ollama (Local)** | `phi3:mini`, `llama3:8b` | Fast, free, and runs on your machine. Great for privacy. |
| **OpenAI** | `gpt-4o-mini` | Excellent balance of cost, speed, and intelligence. |
| **Google Gemini** | `gemini-1.5-flash` | Fast and cost-effective model from Google. |
| **Groq** | `llama3-8b-8192` | Incredibly fast inference speeds. |
---
## 🤝 Contributing
Contributions are welcome! Please fork the repo, make your changes, and submit a PR.
---
## 📄 License
This project is licensed under the [MIT License](LICENSE).