Skip to main content

A CLI tool to generate PR titles and descriptions for Git repositories

Project description

AI PR Helper

prpolish: AI-Powered PR Helper

Supercharge your pull requests with AI-generated titles, descriptions, and quality checks!
Make every PR shine ✨

PyPI version Build Status License Stars


Demo
Above: Example of prpolish generating a beautiful PR description and running vibe checks


Features

  • PR Title & Description Generator: AI-powered, context-aware, and customizable.
  • Vibe Check Warnings: Flags low-quality commits, missing tests, and more.
  • CLI Interface: Simple, interactive, and scriptable.
  • Custom Templates: Use your own PR templates (string or file).
  • LLM-Powered: Uses OpenAI GPT for best results, with fallback heuristics.
  • Failsafe Defaults: Always allows user editing and review.

Quickstart

# 1. Install dependencies
pip install -r requirements.txt

# 2. (Optional) Install GitHub CLI for auto PR creation
# https://cli.github.com/

# 3. Run the CLI from your repo root
python -m prpolish.cli generate

CLI Commands

Show all commands & options
# Generate PR title and description
python -m prpolish.cli generate [--template <str|path>] [--save, -s title|description|both] [--fast, -f]

# Generate only the PR title
ython -m prpolish.cli generate-title [--template <str|path>] [--save, -s]

# Generate only the PR description
python -m prpolish.cli generate-desc [--template <str|path>] [--save, -s]

# Install and authenticate GitHub CLI
ython -m prpolish.cli setup-gh

LLM-Powered PR Descriptions

  1. Get your OpenAI API key from OpenAI
  2. Set it in your environment:
export OPENAI_API_KEY=sk-...

If no API key is set, the tool falls back to a heuristic generator.


Custom PR Templates

You can provide your own template for the PR description using the --template flag. This can be either a string or a path to a file containing your template.

If you already have a pull_request_template.md, it will automatically detect it and use it.


Project Structure

prpolish/
├── __init__.py
├── cli.py
├── pr_description.py
├── vibe_check.py
├── git_utils.py
├── clipboard.py

License

License

Made by @yashg4509

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prpolish-0.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prpolish-0.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file prpolish-0.2.tar.gz.

File metadata

  • Download URL: prpolish-0.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for prpolish-0.2.tar.gz
Algorithm Hash digest
SHA256 b0c613a57b08edf4ed5bf22622a2d04fd8883063e37a01d366ed7556499b5b18
MD5 1bfb413a26d0ea336b58a21c0a042cf0
BLAKE2b-256 31f5ddcdfcb40214dfeb8221a7d33637af6ead6f40d2a7fb5e04f529b2fbc5d9

See more details on using hashes here.

File details

Details for the file prpolish-0.2-py3-none-any.whl.

File metadata

  • Download URL: prpolish-0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for prpolish-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e7857466bb124e7a140850860c433d6478fd5d91691ab16916f452eb4ce29359
MD5 86ae11ffd7f1ed722490aa07aae6005f
BLAKE2b-256 906f9793936c2052dcaa48124d24cad04d8d0d7354678ba0e61489d83170be63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page