Skip to main content

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

Project description

AI PR Helper PyPI version License

prpolish: AI-Powered Pull Request Helper 🚀

Supercharge your GitHub PRs with AI-generated titles, descriptions, and quality checks.
Make every PR shine ✨


💡 Why prpolish?

Writing great pull requests is hard. Most devs (including us!) struggle with:

  • Vague or low-effort PR titles and descriptions
  • Forgetting to link issues, docs, or tickets
  • Missing tests or unclear testing instructions
  • Inconsistent PR templates across teams

prpolish fixes this by using AI to generate high-quality, context-aware PR titles and descriptions, and to run "vibe checks" for PR quality—all from your terminal.


⚙️ Requirements


⚡ Quickstart

pip install prpolish
export OPENAI_API_KEY=sk-...
prpolish generate
  • Instantly get a polished PR title and description, ready to copy or edit.
  • Optionally, run vibe checks to catch low-quality commits or missing tests.
  • Use your own PR templates, or let prpolish auto-detect them.

Demo on 𝕏


🚧 Features

  • AI-Powered PR Title & Description Generator: Context-aware, customizable, and always editable.
  • 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 API for best results
  • Failsafe Defaults: Always allows user editing and review.

🛠️ How It Works

  1. Analyzes your branch:
    Reads your commit messages, changed files, and branch name.
  2. Generates PR content:
    Uses OpenAI GPT to create a professional PR title and description.
  3. Runs vibe checks:
    Optionally, flags issues like vague commits or missing tests.
  4. Lets you edit and save:
    Copy to clipboard, save drafts, or open in your editor.
  5. Creates the PR:
    Pushes your branch and opens a PR via GitHub CLI (optional).

💻 CLI Usage

# Generate PR title and description
prpolish generate [--template <str|path>] [--save, -s title|description|both] [--fast, -f]

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

# Generate only the PR description
prpolish generate-desc [--template <str|path>] [--save, -s]
  • --save, -s: Save title, description, or both to draft files.
  • --fast, -f: Automatically create the PR and commit it.

📝 Custom PR Templates

Provide your own template using the --template flag (string or file path).
If a pull_request_template.md exists, prpolish will auto-detect and use it.


❓ FAQ & Troubleshooting

What if I don't have GitHub CLI (gh)?

You can still copy the PR title/description and create the PR manually.

Can I use my team's PR template?

Yes! Use --template or place a pull_request_template.md in your repo.


📄 License

MIT
Made by @yashg4509


🏆 Shoutout

Big thanks to Graphite for their excellent guides on PR best practices, which inspired the prompts and structure in prpolish.

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.3.2.tar.gz (16.5 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.3.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for prpolish-0.3.2.tar.gz
Algorithm Hash digest
SHA256 09a43f080b8e0ad70ae3b4095635647c3fccd1137b1cf59d3365fe3b2183e535
MD5 c14552ca8383043270c3bebc7ce7ea8b
BLAKE2b-256 473791af92daa1734767ee5683dd37721259061c93fa70b52d7515d8e61b2be5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for prpolish-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ed622f57d21eedb60b380f6592f3dc1e9cd36c73eea23d16978f0b539e37b4
MD5 82fdfbea8df9627830841e67a35ea314
BLAKE2b-256 6ed077a05794feda561adc4f300315266df042d5604e7ff9223b5d80444a21f7

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