Metadata-Version: 2.4
Name: readmeai-py
Version: 0.1.0
Summary: AI-powered README generator for any project
Author-email: erico964-blip <erico964@gmail.com>
License: MIT License
        
        Copyright (c) 2025 erico964-blip
        
        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.
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25
Dynamic: license-file

# 🤖 readmeai

> **AI-powered README generator for any project.**

[![PyPI version](https://badge.fury.io/py/readmeai-py.svg)](https://badge.fury.io/py/readmeai-py)
[![GitHub stars](https://img.shields.io/github/stars/erico964-blip/readmeai?style=social)](https://github.com/erico964-blip/readmeai)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**readmeai** analyzes your project directory and generates a professional README.md using AI. No more staring at a blank page – just run `readmeai` and get a complete, well-structured README in seconds.

---

## ✨ Features

- 🔍 Scans project structure and key configuration files
- 🧠 Uses AI to write a comprehensive README tailored to your project
- 📦 Supports Python, Node.js, Rust, Go, and more
- 🎨 Includes badges, install instructions, usage examples, and contributing guide
- ✍️ Interactive mode: preview before saving
- 🔌 Pluggable AI providers: **OpenCode**, **OpenAI**, **Ollama**
- 🐍 Zero heavy dependencies – only `requests`

---

## 🚀 Quickstart

### 1. Install

```bash
pip install readmeai-py
```

### 2. Configure your AI provider (default: OpenCode)

```bash
export OPENCODE_API_URL="http://localhost:8080/v1/chat/completions"
export OPENCODE_API_KEY="your-key-here"
```

For **OpenAI**:

```bash
export OPENAI_API_KEY="sk-..."
```

For **Ollama**:

```bash
export OLLAMA_API_URL="http://localhost:11434/api/generate"
```

### 3. Generate a README

```bash
cd your-project
readmeai
```

Or specify a directory and use interactive mode:

```bash
readmeai /path/to/project --interactive
```

---

## 📦 Usage

```
readmeai [directory] [options]
```

| Option | Description |
|--------|-------------|
| `directory` | Project directory (default: current) |
| `-o, --output` | Output file path (default: README.md in project root) |
| `-i, --interactive` | Preview and confirm before writing |
| `--provider` | AI provider: `opencode` (default), `openai`, `ollama` |
| `--model` | Model name |
| `--api-url` | Override API base URL |
| `--api-key` | Override API key |
| `--version` | Show version |

---

## 🔧 Supported AI Providers

| Provider | Default Model | Env Vars |
|----------|--------------|----------|
| **OpenCode** | `opencode` | `OPENCODE_API_URL`, `OPENCODE_API_KEY` |
| **OpenAI** | `gpt-4o-mini` | `OPENAI_API_KEY` |
| **Ollama** | `llama3` | `OLLAMA_API_URL` |

---

## 🤖 How It Works

1. Recursively scans the project directory (ignoring common junk folders)
2. Collects the file tree and reads important files (e.g., `pyproject.toml`, `package.json`)
3. Constructs a summary and sends it to the AI with a specialized prompt
4. The AI returns the full README content, which is written to disk
5. Optionally shows a preview for approval

---

## 🛠 Development

Clone and install in editable mode:

```bash
git clone https://github.com/erico964-blip/readmeai
cd readmeai
pip install -e .
```

---

## 📜 License

MIT © erico964-blip
