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
Metadata
Release files for autopr-core 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autopr_core-0.5.1.tar.gz | 53.0 kB | Without provenance | Details for autopr_core-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autopr_core-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for autopr_core-0.5.1-py3-none-any.whl |
Total release size: 105.8 kB
Release files / autopr_core-0.5.1.tar.gz
| Download URL | autopr_core-0.5.1.tar.gz |
|---|---|
| Size | 53.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d84a7773ebca943bd185ab6ddb36aaf991db43a0fef575579b12e73f7bdb597d
|
|
BLAKE2b-256 checksum How to use checksums |
22f34d5f38f75690860a30b779c1655909f05034bb060e3004fe87e611aca38b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / autopr_core-0.5.1-py3-none-any.whl
| Download URL | autopr_core-0.5.1-py3-none-any.whl |
|---|---|
| Size | 52.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd143c705c9951fb5c199bffe14dcc8dde16aea771ef4e2120fb272f81a0ec0f
|
|
BLAKE2b-256 checksum How to use checksums |
22a72794e81e625d9cb43e981526f97500805cea60e127671906f1b1d06c9ce7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Security for autopr-core 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.