Metadata-Version: 2.4
Name: docgenie-cli
Version: 1.1.6
Summary: Auto-documentation tool that generates comprehensive README and HTML docs for any codebase.
Project-URL: Homepage, https://github.com/ch1kim0n1/DocGenie
Project-URL: Repository, https://github.com/ch1kim0n1/DocGenie
Project-URL: Documentation, https://github.com/ch1kim0n1/DocGenie
Project-URL: Changelog, https://github.com/ch1kim0n1/DocGenie/blob/main/CHANGELOG.md
Author-email: ch1kim0n1 <vxk230059@utdallas.edu>
License: MIT License
        
        Copyright (c) 2025 DocGenie Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: click>=8.1
Requires-Dist: gitpython>=3.1
Requires-Dist: jinja2>=3.1
Requires-Dist: markdown>=3.3
Requires-Dist: pathspec>=0.9
Requires-Dist: pygments>=2.10
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.25
Requires-Dist: rich>=13.7
Requires-Dist: structlog>=24.1
Requires-Dist: toml>=0.10
Requires-Dist: tree-sitter-language-pack>=0.13.0
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: hypothesis>=6.0; extra == 'dev'
Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
Requires-Dist: mkdocs>=1.5; extra == 'dev'
Requires-Dist: mkdocstrings[python]>=0.24; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.6; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: types-markdown; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Requires-Dist: types-toml; extra == 'dev'
Description-Content-Type: text/markdown

# DocGenie

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

## Quick Guide

### Installation

```bash
python3 -m pip install "docgenie"
```

Requirements: **Python 3.10+**

### Setup (from source)

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

### Usage

#### Generate Markdown README

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

#### Generate HTML Documentation

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

#### Generate Both Formats

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

#### Convert Existing README to HTML

```bash
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)

```python
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

```bash
# 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:

```yaml
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

```bash
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](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
