AI-powered Pull Request Generator & Reviewer - Automate PR titles, descriptions, and code reviews
Project description
AutoPR — AI-powered Pull Request Generator & Reviewer
AutoPR automates the repetitive parts of pull requests: it writes concise PR titles & descriptions, validates CI/tests, runs deterministic static and lint checks, and provides an AI-assisted review summary.
Quickstart
1. Install
pip install autopr-core
2. Configure your API key
AutoPR requires your own OpenAI or Anthropic API key. Run the interactive setup:
autopr configure
This will prompt you to:
- Choose a provider (
openaioranthropic) - Enter your API key (stored locally in
.env, never shared)
Or set environment variables manually:
# For OpenAI
export OPENAI_API_KEY="your-openai-api-key"
export AUTOPR_PROVIDER="openai"
# For Anthropic
export ANTHROPIC_API_KEY="your-anthropic-api-key"
export AUTOPR_PROVIDER="anthropic"
3. Use AutoPR
# Generate a PR title & description
autopr gen --diff "$(git diff)" --commits "feat: add helper"
# AI-assisted code review
autopr review --diff "$(git diff)"
# Run static analysis
autopr analyze --diff "$(git diff)" --summary
Command Cheat Sheet
| Command | Description |
|---|---|
autopr configure |
Interactive setup — set your AI provider and API key |
autopr gen |
Generate PR title and description |
autopr review |
Perform AI-assisted code review |
autopr analyze |
Run static analysis on code diffs |
autopr analyze-files |
Batch-analyze files in a directory |
autopr ci-parse |
Parse CI/test logs |
autopr coverage-compare |
Compare coverage reports |
autopr validate-issue |
Check if changes align with an issue |
autopr doctor |
Check system health and configuration |
autopr init |
Initialize AutoPR config in your repo |
autopr suggest-reviewers |
Suggest reviewers based on git history |
Features
- AI-Powered PR Generation — Titles, descriptions, and risk assessments
- AI Code Review — Senior-engineer-level review with actionable findings
- Static Analysis — Deterministic Python code analysis (security, complexity, style)
- CI/Test Parsing — Parse pytest, unittest, and GitHub Actions logs
- Coverage Comparison — Diff coverage reports before and after changes
- Multiple LLM Providers — OpenAI and Anthropic with robust error handling
- FastAPI Backend — REST API with
/generateand/reviewendpoints - CLI Tool — Full-featured command-line interface
API Server
Run the FastAPI server for REST API access:
uvicorn autopr.main:app --reload --port 8000
Visit http://127.0.0.1:8000/docs for interactive API docs.
Install from Source
git clone https://github.com/surenkotian/AutoPR.git
cd AutoPR
pip install -e .
autopr configure
License
MIT
Project details
Release history Release notifications | RSS feed
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 autopr_core-0.5.1.tar.gz.
File metadata
- Download URL: autopr_core-0.5.1.tar.gz
- Upload date:
- Size: 53.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d84a7773ebca943bd185ab6ddb36aaf991db43a0fef575579b12e73f7bdb597d
|
|
| MD5 |
7522930632f868b6ac4e491d0e181b85
|
|
| BLAKE2b-256 |
22f34d5f38f75690860a30b779c1655909f05034bb060e3004fe87e611aca38b
|
File details
Details for the file autopr_core-0.5.1-py3-none-any.whl.
File metadata
- Download URL: autopr_core-0.5.1-py3-none-any.whl
- Upload date:
- Size: 52.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd143c705c9951fb5c199bffe14dcc8dde16aea771ef4e2120fb272f81a0ec0f
|
|
| MD5 |
52192ac2673f0a1d7bcf4a826c486eb0
|
|
| BLAKE2b-256 |
22a72794e81e625d9cb43e981526f97500805cea60e127671906f1b1d06c9ce7
|