DocAuto
A tool for generating documentation from code using LLMs.
CLI Usage
DocAuto provides a command-line interface for generating documentation from your code. The CLI is implemented in cli.py and offers several commands and options.
Basic Usage
python -m docauto [paths...] [options]
Preset Configurations
DocAuto provides preset configurations for popular LLM services:
Ollama Preset
python -m docauto --ollama [paths...]
Uses the following configuration:
- Base URL: http://localhost:11434/v1
- Model: phi4
- Max Context: 16384
OpenAI Preset
python -m docauto --openai -k your_api_key [paths...]
Uses the following configuration:
- Base URL: https://api.openai.com/v1
- Model: gpt-4o-mini
- Max Context: 16384
- Requires API key
Gemini Preset
python -m docauto --gemini -k your_api_key [paths...]
Uses the following configuration:
- Base URL: https://generativelanguage.googleapis.com/v1beta/openai/
- Model: gemini-2.0-flash-exp
- Max Context: 131072
- Requires API key
Options
API Configuration
-b, --base-url: API base URL for the LLM service-k, --api-key: API key for authentication-m, --model: AI model to use-mc, --max-context: Maximum context size-c, --constraint: Add a documentation constraint (can be used multiple times)-d, --dry-run: Show changes without modifying files-v, --verbose: Enable verbose logging-o, --overwrite: [Dangerous] Overwrite existing docstrings in codebasepaths: One or more Python files or directories to process
Examples
# Process a single file
python -m docauto example.py
# Process multiple files with API key
python -m docauto file1.py file2.py -k your_api_key
# Process a directory in dry-run mode
python -m docauto ./src -d
# Process with custom model and verbose logging
python -m docauto ./src -m gpt-4 -v
# Use Ollama preset for local processing
python -m docauto ./src --ollama
# Use OpenAI preset with API key
python -m docauto ./src --openai -k your_api_key
The tool will process the specified Python files, generate documentation using the configured LLM, and update the files with the generated documentation. Use the --dry-run option to preview changes without modifying files.
Metadata
Release files for docauto 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| docauto-0.0.2.tar.gz | 17.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docauto-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.2 kB
Release files / docauto-0.0.2.tar.gz
| Download URL | docauto-0.0.2.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37fa2f0d95525467b591612ebb0cfc298a0d13f20c47992991001a21412925c5
|
|
BLAKE2b-256 checksum How to use checksums |
24ea695f82773fbde8e2e340e8a6c248aa63d30ea81376131156cff2e732a970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.9
|
Release files / docauto-0.0.2-py3-none-any.whl
| Download URL | docauto-0.0.2-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e772df5dcf8a8ae47be169f0e0b00bd532718bb8089083b37344d950936da127
|
|
BLAKE2b-256 checksum How to use checksums |
428ac4b806079bcefdfe11ce039f54c1ffd0bc0bd1ef1c92a71edb3974e7db2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.9
|