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-cli"
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
docgenie generate . --no-diffs --no-file-review --no-output-links
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
no_emojis: false
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:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Run the test suite (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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 make DocGenie better
- Inspired by the need for better automated documentation tools
- Built with love for the open-source community
If DocGenie helps you, please star this repository.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docgenie_cli-1.1.1.tar.gz.
File metadata
- Download URL: docgenie_cli-1.1.1.tar.gz
- Upload date:
- Size: 59.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19d7fff3af8ee922cd1daf2e8874dc88ee459f353a31f8835a303eef96e2bdb8
|
|
| MD5 |
e24a5b1c3e1c89b8180b79ab69592d8b
|
|
| BLAKE2b-256 |
866ac19f2a7b807975845d9b08e7806a018ad1dc4e57a97eafac578367720bf5
|
File details
Details for the file docgenie_cli-1.1.1-py3-none-any.whl.
File metadata
- Download URL: docgenie_cli-1.1.1-py3-none-any.whl
- Upload date:
- Size: 68.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e3aa598bb7983e1aaeee76ffba619323422764ea086595f3f7baa0bd24aa59
|
|
| MD5 |
df2d7362c997eeb58c21d17090f17458
|
|
| BLAKE2b-256 |
f2fe92d0f63221d3fffb0e802fab16566d3026bbe157d4b1b5b5b4e51a8c6e7e
|