Skip to main content

AutoDocGen

AI-powered Markdown documentation generator for Python projects.

License: MIT Python 3.10+

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 ast module 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 def functions.
  • 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

Metadata

Release files for pypiautodocgen 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypiautodocgen 0.1.1
File Size Uploaded
pypiautodocgen-0.1.1.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypiautodocgen 0.1.1
File Interpreter ABI Platform
pypiautodocgen-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 56.4 kB

Release files / pypiautodocgen-0.1.1.tar.gz

Download URL pypiautodocgen-0.1.1.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a0b3d5135013972de304440cbb06fabc2ad5c5742a19f51d995fcfdb2a17ddec
BLAKE2b-256 checksum
How to use checksums
111d28870d5f7b8ce20b3fe1532284735dc999a523749bebb57681b8ed7bbfde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pypiautodocgen-0.1.1-py3-none-any.whl

Download URL pypiautodocgen-0.1.1-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
601b5c8d933c282d5be8665e87af583c345854dc40a18a714120d46b4d28a284
BLAKE2b-256 checksum
How to use checksums
5308d411581fbdd1d817d1929a00d724837d931ccc0129d966d47fd3e2a2fcf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page