Skip to main content

Auto-documentation tool that generates comprehensive README and HTML docs for any codebase.

Project description

DocGenie

Auto-documentation tool that generates README.md and HTML docs for a codebase.

Quick Guide

Installation

python3 -m pip install "docgenie"

Requirements: Python 3.10+

Setup (from source)

git clone https://github.com/ch1kim0n1/DocGenie.git
cd DocGenie
python3 -m pip install -e "."

Usage

Generate Markdown README

docgenie generate /path/to/project --format markdown

Generate HTML Documentation

docgenie generate /path/to/project --format html

Generate Both Formats

docgenie generate /path/to/project --format both

Convert Existing README to HTML

docgenie html README.md --source readme --output docs.html
# or, using the legacy convenience command:
docgenie-html README.md --source readme --output docs.html

Programmatic Usage (Python API)

from docgenie.core import CodebaseAnalyzer
from docgenie.html_generator import HTMLGenerator

analyzer = CodebaseAnalyzer('/path/to/project')
data = analyzer.analyze()

html_generator = HTMLGenerator()
html_content = html_generator.generate_from_analysis(data, "output.html")

Troubleshooting

  • Ensure all dependencies are installed
  • Check write permissions for output directory
  • Use UTF-8 encoding for source files

License

MIT License. See LICENSE file for details.

What DocGenie Analyzes

  • Project Structure: Directory tree and file organization
  • Source Code: Functions, classes, methods, and documentation
  • Dependencies: Package files (requirements.txt, package.json, etc.)
  • Configuration: Config files and project settings
  • Documentation: Existing docs and README files
  • Git Information: Repository details, branches, contributors
  • Statistics: Language distribution, code metrics
  • Version Diffs: Git ref/tag aware file-level changes
  • File Reviews: Risk-scored file and folder review cards
  • Output Links: Heuristic source-to-output file tracing
  • Impact Graph: HTML visualization of file dependency and output impact
  • Trust Badges: Section-level trust markers with source citations

Example Output

DocGenie generates README files with:

  • Project Overview: Auto-generated description and features
  • Installation Instructions: Detected from your dependency files
  • Usage Examples: Based on your code structure
  • API Documentation: Extracted from functions and classes
  • Project Structure: Visual directory tree
  • Dependencies: Organized by package manager
  • Contributing Guidelines: Standard open-source templates

Advanced Usage

Command Line Options

# Basic usage
docgenie --help                                 # Show help
docgenie generate . --verbose                   # Enable detailed output
docgenie generate . --force                     # Overwrite existing files

# Format options
docgenie generate . --format markdown           # README.md only
docgenie generate . --format html               # HTML documentation only
docgenie generate . --format both               # Generate both README.md and HTML (default)

# Output options
docgenie generate . --output custom_path        # Custom output location
docgenie generate . --preview                   # Preview without saving

# HTML converter
docgenie html README.md --source readme         # Convert README to HTML
docgenie html . --source codebase               # Generate HTML from code

# Analysis tools
docgenie analyze . --format json                # Output analysis as JSON
docgenie diff . --from-ref v1.0.0 --to-ref HEAD --format json
docgenie pr-summary . --from-ref v1.0.0 --to-ref HEAD --format markdown
docgenie init                                   # Create basic README template

# Pro documentation controls
docgenie generate . --from-ref v1.0.0 --to-ref HEAD --include-diffs
docgenie generate . --strict-readme
docgenie generate . --template-profile pro

Configuration

Create a .docgenie.yaml file in your project root:

ignore_patterns:
  - "*.log"
  - "temp/*"
  - "private/"

template_customizations:
  include_api_docs: true
  include_directory_tree: true
  max_functions_documented: 20
  include_trust_badges: true

Architecture

DocGenie consists of several key components:

  • CodebaseAnalyzer: Multi-language code analysis engine with caching and concurrency
  • ParserRegistry: Pluggable parsers (AST, tree-sitter, regex fallback) per language
  • ReadmeGenerator: Jinja2-based template rendering system for markdown
  • HTMLGenerator: Beautiful HTML documentation generator with responsive design
  • CLI Interface: Typer + Rich powered user experience

Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and add tests
  4. Run the test suite (pytest)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Setup

git clone https://github.com/ch1kim0n1/DocGenie.git
cd DocGenie
pip install -e ".[dev]"
pytest

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to all contributors who help improve DocGenie
  • Inspired by the need for better automated documentation tools
  • Built for the open-source community

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

docgenie_cli-1.1.8.tar.gz (49.3 kB view details)

Uploaded Source

Built Distribution

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

docgenie_cli-1.1.8-py3-none-any.whl (58.8 kB view details)

Uploaded Python 3

File details

Details for the file docgenie_cli-1.1.8.tar.gz.

File metadata

  • Download URL: docgenie_cli-1.1.8.tar.gz
  • Upload date:
  • Size: 49.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for docgenie_cli-1.1.8.tar.gz
Algorithm Hash digest
SHA256 599e14ce85483e1b6a98bd84ddbcbf6fb980d58ff52f19a5bc8b9cf590c4d889
MD5 1cdd4034b0235887021c4175ed6536c6
BLAKE2b-256 e000b0b80bd315b848fc48751fdfba21e30c5cc56bed86f3cc9817e2c99ec655

See more details on using hashes here.

File details

Details for the file docgenie_cli-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: docgenie_cli-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 58.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for docgenie_cli-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 01cb771e512334605c2026d752a7e697b20e23b98007efd2ea3d5b5b20891be1
MD5 6950b8c9149f86c730341fb539ebbecf
BLAKE2b-256 d2616f0a88f9f93b65c6cacfe4f2c377a391e1ec89ec1baae38079cdd0fbc0e3

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