Skip to main content

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:

Gemini Preset

python -m docauto --gemini -k your_api_key [paths...]

Uses the following configuration:

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 codebase
  • paths: 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)

Source distribution for docauto 0.0.2
File Size Uploaded
docauto-0.0.2.tar.gz 17.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docauto 0.0.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

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