Skip to main content

A powerful Python documentation generator that swoops in to automatically create and maintain clean, comprehensive docstrings for your codebase

Project description

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docauto-0.0.2.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docauto-0.0.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file docauto-0.0.2.tar.gz.

File metadata

  • Download URL: docauto-0.0.2.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for docauto-0.0.2.tar.gz
Algorithm Hash digest
SHA256 37fa2f0d95525467b591612ebb0cfc298a0d13f20c47992991001a21412925c5
MD5 59f6ee05905ad04b1cd707467598129a
BLAKE2b-256 24ea695f82773fbde8e2e340e8a6c248aa63d30ea81376131156cff2e732a970

See more details on using hashes here.

File details

Details for the file docauto-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: docauto-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for docauto-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e772df5dcf8a8ae47be169f0e0b00bd532718bb8089083b37344d950936da127
MD5 4a85dab003c6b045f12cc7afc42dfc1f
BLAKE2b-256 428ac4b806079bcefdfe11ce039f54c1ffd0bc0bd1ef1c92a71edb3974e7db2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page