Metadata-Version: 2.4
Name: pypiautodocgen
Version: 0.1.1
Summary: AI-powered CLI tool that generates Markdown documentation from Python docstrings and code structure
Author: AutoChamp
License: MIT License
        
        Copyright (c) 2025-2026 Nitika Saraogi
        
        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.
        
Project-URL: Homepage, https://github.com/shifulegend/autodocgen
Project-URL: Repository, https://github.com/shifulegend/autodocgen
Project-URL: Bug Tracker, https://github.com/shifulegend/autodocgen/issues
Keywords: documentation,ai,cli,generator,openai,devtools,docstrings,groq,openrouter,google-gemini
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=1.0.0
Requires-Dist: click>=8.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: jinja2>=3.0.0
Requires-Dist: toml>=0.10.2
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: google-generativeai>=0.3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: license-file

# AutoDocGen

> AI-powered Markdown documentation generator for Python projects.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)

AutoDocGen scans your Python source code, extracts docstrings and structure using Python's built-in AST parser, and uses AI to generate comprehensive, readable Markdown documentation — one file per module plus a navigable index.

---

## Features

- **Multi-Provider Support** — Works with **OpenRouter**, **Groq**, **Google Gemini**, and **OpenAI**.
- **AST-based parsing** — No fragile regex. Uses Python's `ast` module to accurately extract modules, classes, methods, and functions.
- **Jinja2 Templates** — Clean, customizable Markdown output using industry-standard templates.
- **Async function support** — Correctly identifies and labels `async def` functions.
- **Cross-module linking** — Automatically traces imports to create related module links.
- **Navigable index** — Produces a comprehensive `index.md`.
- **Flexible configuration** — Supports `.env`, `autodocgen.yaml`, `pyproject.toml`, and CLI flags.

---

## Installation

```bash
git clone https://github.com/shifulegend/autodocgen
cd autodocgen
pip install .
```

---

## Configuration

Set your API keys in a `.env` file (which is gitignored):

```env
OPENAI_API_KEY=sk-...
GROQ_API_KEY=gsk_...
OPENROUTER_API_KEY=sk-or-...
GOOGLE_API_KEY=AIza...
```

### `autodocgen.yaml` example

```yaml
llm:
  provider: groq
  model: llama-3.1-8b-instant

output:
  dir: docs

source:
  - autodocgen
```

---

## Usage

```bash
# Generate docs using settings from autodocgen.yaml
autodocgen . --verbose

# Override provider/model via CLI
autodocgen . --output docs_custom -v
```

---

## Roadmap

- [x] Multi-provider LLM support (OpenRouter, Groq, Gemini)
- [x] Jinja2 template-based rendering
- [ ] Async AI calls for faster generation
- [ ] Incremental generation (skip unchanged files)
- [ ] HTML and reStructuredText output formats

---

## License

[MIT](LICENSE) — Copyright (c) 2025-2026 AutoDocGen Team
