Generate documentation for your repository
Project description
📄 codereviewer
AI-powered documentation generator for GitHub repositories — fetch, extract, and document any repo in seconds.
✨ Features
- 🔍 Fetches repository information directly from GitHub
- 📂 Extracts and filters relevant source files
- 🤖 Uses AI (Gemini + Groq) to generate human-readable documentation
🛠️ Tech Stack
| Layer | Technology |
|---|---|
| Language | Python 3.12+ |
| AI Providers | Gemini, Groq |
| Core Deps | gemini, git_pull, regex, scouter, doc_writer, groq |
⚙️ Requirements
- Python 3.12+
GEMINI_API_KEY— Get it hereGROQ_API_KEY— Get it hereTOKEN— Personal GitHub access token
🚀 Installation
# 1. Clone the repository
git clone https://github.com/Abbos1308/Documentation-Maker-AI.git
cd codereviewer
# 2. Create and activate a virtual environment
python -m venv myenv
source myenv/bin/activate # Linux/Mac
# myenv\Scripts\activate # Windows
# 3. Install the package
pip install .
# 4. Set environment variables
export GEMINI_API_KEY=your_gemini_key
export GROQ_API_KEY=your_groq_key
export TOKEN=your_github_token
⚡ Quickstart
python main.py https://github.com/owner/repo.git
Or use it programmatically:
from doc_writer import doc_maker
print(doc_maker("https://github.com/owner/repo.git"))
🔧 Configuration
All configuration is done via environment variables:
| Variable | Description | Required |
|---|---|---|
GEMINI_API_KEY |
Gemini API Key | ✅ Yes |
GROQ_API_KEY |
Groq API Key | ✅ Yes |
TOKEN |
Personal GitHub access token | ✅ Yes |
📁 Project Structure
codereviewer/
├── main.py # Entry point — run from CLI
├── doc_writer.py # Core documentation generation logic
└── pyproject.toml # Project metadata & dependencies
📖 API Reference
doc_maker(link: str) -> str
Generates documentation for a given GitHub repository.
Parameters:
| Name | Type | Description |
|---|---|---|
link |
str |
Full URL of the GitHub repository |
Returns: str — The generated documentation.
Example:
from doc_writer import doc_maker
docs = doc_maker("https://github.com/owner/repo.git")
print(docs)
❗ Error Reference
| Error Message | Cause |
|---|---|
ERROR: Failed to fetch repository. Could be deleted or private. Please check and retry |
Repo is private, deleted, or the token is invalid |
ERROR: Failed to connect with AI. Please try again in few minutes |
AI service is unreachable or rate-limited |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docmakerai-0.1.5.tar.gz.
File metadata
- Download URL: docmakerai-0.1.5.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2db85964ee96c4e9cc58e2cf89537bb0b068ff6a72d21253e33b56393eb852b
|
|
| MD5 |
fe10cfa75a58aa7b45d42ed6bfc5d3b7
|
|
| BLAKE2b-256 |
85a09d3d3ec32c84eb8c03a8dd55b651fe24cae4d7b8264b82c9840745c53907
|
File details
Details for the file docmakerai-0.1.5-py3-none-any.whl.
File metadata
- Download URL: docmakerai-0.1.5-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40476cd85e6b53cea449a49327a9e306ddf63966f257671210067960366ca69a
|
|
| MD5 |
695fb4778177386f0350a648265fad36
|
|
| BLAKE2b-256 |
04d68f053078be15d48d0ebcf59a5796ed17bc9453637c644838c8d6eea47a84
|