Auto-generate beautiful Markdown documentation from your Python codebase -- AST-powered API reference and module docs.
DocuMint parses your Python source files, extracts classes, functions, docstrings, and type annotations, then produces clean, structured Markdown documentation -- no manual effort required.
graph TD
A[CLI - Typer] --> B[CodeAnalyzer]
A --> C[DocuMintConfig - Pydantic]
B --> D[AST Parser]
D --> E[Extract Classes]
D --> F[Extract Functions]
D --> G[Extract Docstrings & Decorators]
E --> H[ModuleInfo / ClassInfo / FunctionInfo]
F --> H
G --> H
H --> I[DocGenerator]
I --> J[API Reference Tables]
I --> K[Class Hierarchy Diagrams]
I --> L[Module Dependency Graphs]
J --> M[Single-Page or Multi-Page Docs]
K --> M
L --> M
M --> N[Output Directory]
pip install -e .# From a directory
documint generate src/myproject/ --output docs/
# From a single file
documint generate src/myproject/core.py --output docs/
# Single-page mode
documint generate src/myproject/ --output docs/ --format singledocumint analyze src/myproject/Running documint generate src/documint/ --output docs/api produces:
docs/api/
index.md # Module index with summary table
core.md # Full docs for core.py
config.md # Full docs for config.py
utils.md # Full docs for utils.py
Each module page includes:
- Module docstring
- Dependency list (imports)
- Function summary table with return types
- Class documentation with method tables
- Text-based class hierarchy diagram
- Full function signatures with type annotations
- Pure AST analysis -- no imports or code execution required; safe for any codebase
- Extracts classes, methods, functions, decorators, and type annotations
- Preserves and formats docstrings
- Generates per-module docs, API reference tables, and a unified index
- Text-based class hierarchy diagrams and dependency graphs
- Single-page or multi-page output modes
- Configurable via CLI flags or environment variables
- Rich terminal output with progress indicators
| Option | CLI Flag | Env Var | Default |
|---|---|---|---|
| Output directory | --output / -o |
DOCUMINT_OUTPUT_DIR |
docs/api |
| Output format | --format / -f |
DOCUMINT_OUTPUT_FORMAT |
multi |
| Include private | --private |
DOCUMINT_INCLUDE_PRIVATE |
false |
| Include dunder | --dunder |
DOCUMINT_INCLUDE_DUNDER |
false |
| Project name | --name / -n |
DOCUMINT_PROJECT_NAME |
API Reference |
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
make test
# Lint & format
make lint
make format
# Type check
make typecheckDocuMint/
src/documint/
__init__.py # Package exports
__main__.py # CLI (Typer + Rich)
core.py # CodeAnalyzer & DocGenerator
config.py # Pydantic config model
utils.py # AST & Markdown helpers
tests/
test_core.py # Unit tests
docs/
ARCHITECTURE.md # Design documentation
pyproject.toml # Build & dependency config
Makefile # Dev shortcuts
LICENSE # MIT
AI documentation tools like pdoc, Sphinx, and mkdocstrings -- reimagined for simplicity and speed.
Built by Officethree Technologies | Made with ❤️ and AI