AI-powered CLI tool that generates Markdown documentation from Python docstrings and code structure
Project description
AutoDocGen
AI-powered Markdown documentation generator for Python projects.
AutoDocGen scans your Python source code, extracts docstrings and structure using Python's built-in AST parser, and uses AI to generate comprehensive, readable Markdown documentation — one file per module plus a navigable index.
Features
- Multi-Provider Support — Works with OpenRouter, Groq, Google Gemini, and OpenAI.
- AST-based parsing — No fragile regex. Uses Python's
astmodule to accurately extract modules, classes, methods, and functions. - Jinja2 Templates — Clean, customizable Markdown output using industry-standard templates.
- Async function support — Correctly identifies and labels
async deffunctions. - Cross-module linking — Automatically traces imports to create related module links.
- Navigable index — Produces a comprehensive
index.md. - Flexible configuration — Supports
.env,autodocgen.yaml,pyproject.toml, and CLI flags.
Installation
git clone https://github.com/shifulegend/autodocgen
cd autodocgen
pip install .
Configuration
Set your API keys in a .env file (which is gitignored):
OPENAI_API_KEY=sk-...
GROQ_API_KEY=gsk_...
OPENROUTER_API_KEY=sk-or-...
GOOGLE_API_KEY=AIza...
autodocgen.yaml example
llm:
provider: groq
model: llama-3.1-8b-instant
output:
dir: docs
source:
- autodocgen
Usage
# Generate docs using settings from autodocgen.yaml
autodocgen . --verbose
# Override provider/model via CLI
autodocgen . --output docs_custom -v
Roadmap
- Multi-provider LLM support (OpenRouter, Groq, Gemini)
- Jinja2 template-based rendering
- Async AI calls for faster generation
- Incremental generation (skip unchanged files)
- HTML and reStructuredText output formats
License
MIT — Copyright (c) 2025-2026 AutoDocGen Team
Project details
Release history Release notifications | RSS feed
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 pypiautodocgen-0.1.1.tar.gz.
File metadata
- Download URL: pypiautodocgen-0.1.1.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0b3d5135013972de304440cbb06fabc2ad5c5742a19f51d995fcfdb2a17ddec
|
|
| MD5 |
9dc0861c302f81273481442945dfd319
|
|
| BLAKE2b-256 |
111d28870d5f7b8ce20b3fe1532284735dc999a523749bebb57681b8ed7bbfde
|
File details
Details for the file pypiautodocgen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pypiautodocgen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
601b5c8d933c282d5be8665e87af583c345854dc40a18a714120d46b4d28a284
|
|
| MD5 |
794d4a8eae88eb4b5f208670cbbf0637
|
|
| BLAKE2b-256 |
5308d411581fbdd1d817d1929a00d724837d931ccc0129d966d47fd3e2a2fcf4
|