Metadata-Version: 2.4
Name: autopr-core
Version: 0.5.0
Summary: AI-powered Pull Request Generator & Reviewer - Automate PR titles, descriptions, and code reviews
Author-email: AutoPR Team <autopr@example.com>
Maintainer-email: AutoPR Team <autopr@example.com>
License: MIT
Project-URL: Homepage, https://github.com/surenkotian/AutoPR
Project-URL: Documentation, https://autopr.readthedocs.io/
Project-URL: Repository, https://github.com/surenkotian/AutoPR
Project-URL: Issues, https://github.com/surenkotian/AutoPR/issues
Project-URL: Changelog, https://github.com/surenkotian/AutoPR/blob/main/CHANGELOG.md
Keywords: ai,pull-request,code-review,automation,github,git
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.92.0
Requires-Dist: uvicorn[standard]>=0.20.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: click>=8.1.0
Requires-Dist: pytest>=7.0.0
Requires-Dist: openai>=1.0.0
Requires-Dist: anthropic<1.0.0,>=0.75.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: questionary>=2.0.0
Dynamic: license-file

# AutoPR — AI-powered Pull Request Generator & Reviewer

[![PyPI version](https://badge.fury.io/py/autopr.svg)](https://pypi.org/project/autopr/)
[![Try the demo](https://img.shields.io/badge/demo-autopr_demo-blue.svg)](https://github.com/your-user/autopr-demo)

AutoPR automates the repetitive parts of pull requests for teams: it writes concise PR titles & descriptions, validates CI/tests, runs deterministic static and lint checks, and provides an AI-assisted review summary.

## Quickstart

### Install from PyPI (Recommended)

```bash
pip install autopr
```

### Install from Source

```bash
git clone https://github.com/surenkotian/AutoPR.git
cd AutoPR
pip install -e .
```

2. **Run the API server:**
   ```bash
   uvicorn autopr.main:app --reload --port 8000
   ```

3. **Try the CLI:**
   ```bash
   autopr gen --diff "+ added line" --commits "fix: add helper" --issue "#123"
   ```

## API Documentation

Once the server is running, visit [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) for interactive API docs.

## Command Cheat Sheet

| Command | Description |
|---------|-------------|
| `autopr gen` | Generate PR title and description |
| `autopr review` | Perform AI-assisted code review |
| `autopr analyze` | Run static analysis on code diffs |
| `autopr ci-parse` | Parse CI/test logs |
| `autopr coverage-compare` | Compare coverage reports |
| `autopr validate-issue` | Check if changes align with issue |

## Features

- **FastAPI Backend** with `/generate` and `/review` endpoints
- **CLI Tool** for all operations
- **Static Analysis** for Python code
- **CI/Test Validation** tools
- **Multiple LLM Providers** (OpenAI, Anthropic, Stub)
- **GitHub Actions Integration**

## Using Real LLM Providers

Set `AUTOPR_PROVIDER` to `openai` or `anthropic` and provide API keys:

```bash
export OPENAI_API_KEY="your-key"
export AUTOPR_PROVIDER="openai"
```

See `.env.example` for all configuration options.

## Demo

Try AutoPR in action with our ready-to-deploy demo repository. See `publish-demo/README.md` for setup instructions.

## License

MIT
