Overview
DocuGen AI provides a command-line interface for generating technical documentation from Python projects. The CLI is built with Typer and offers a simple yet powerful interface.Installation
After installing the package, thedocugen command is available globally:
Command Structure
Commands
generate
Generates a technical README file from a Python project by analyzing its source code.
Arguments
Path to the Python project directory to analyze. Can be absolute or relative.Examples:
.- Current directory./src- Source subdirectory/home/user/project- Absolute path
Options
Aliases:
-oOutput Markdown file name. Can be a filename or a path.- If relative, the file is created inside the project directory
- If absolute, the file is created at the specified location
- Parent directories are created automatically if they don’t exist
Gemini model name to use for content generation.Supported models:
gemini-3.1-flash-lite-preview(default, fastest)gemini-pro(balanced performance)gemini-ultra(highest quality)
Aliases:
-pOptional additional instruction to customize the AI’s documentation generation. Use this to emphasize specific aspects or request particular formatting.Examples:Path to a TOML configuration file. If not specified, DocuGen will search for configuration files in standard locations.Examples:
Complete Examples
Exit Codes
DocuGen uses standard exit codes to indicate success or failure:| Code | Meaning |
|---|---|
0 | Success - Documentation generated successfully |
1 | Error - Invalid path, missing API key, no Python files found, or generation failed |
Output Information
When generation completes successfully, DocuGen displays:- Location of the generated documentation file
- Statistics about the analyzed project:
- Number of files scanned
- Number of classes found
- Number of functions found
- Number of methods found
