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.85.tar.gz (49.7 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.85-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docgenie_cli-1.1.85.tar.gz
  • Upload date:
  • Size: 49.7 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.85.tar.gz
Algorithm Hash digest
SHA256 7bbdb3e53fd99f67b3a51d2e723644d8e590f57786377edf8ee4e9accb304855
MD5 e012f6d2ba36bc05e16111262d24ce75
BLAKE2b-256 42955eb70f27444e29ea64dd46c73c9776900c14213918f1fcbcf03d22b827dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docgenie_cli-1.1.85-py3-none-any.whl
  • Upload date:
  • Size: 59.2 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.85-py3-none-any.whl
Algorithm Hash digest
SHA256 ab9fb8f33f232a7427e02c1a62bc7af42b5af2367d3532a15a55821f6ce742ff
MD5 b4e66078cc38ded526f9a72d07d31e01
BLAKE2b-256 ea65831d5925b6e20e280f4b4f3221f473665c236c08ff69ad402b4894b7e0b8

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