A CLI tool to generate PR titles and descriptions for Git repositories
Project description
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 (OpenAI GPT) to generate high-quality, context-aware PR titles and descriptions, and to run "vibe checks" for PR quality—all from your terminal.
⚡ 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.
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, with Fallbacks: Uses OpenAI GPT for best results, with smart heuristics if no API key.
- Failsafe Defaults: Always allows user editing and review.
🛠️ How It Works
- Analyzes your branch:
Reads your commit messages, changed files, and branch name. - Generates PR content:
Uses OpenAI GPT (if available) or smart heuristics to create a professional PR title and description. - Runs vibe checks:
Optionally, flags issues like vague commits or missing tests.
⚠️ Note: Vibe checks require an OpenAI API key and do not fall back to heuristics. - Lets you edit and save:
Copy to clipboard, save drafts, or open in your editor. - 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.
⚙️ Requirements
- Python 3.7+
- OpenAI API key (for AI features)
- GitHub CLI (for auto PR creation, optional)
Without an API key, the generations fall back on heuristic measures, but they are not as accurate usually.
📝 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 an OpenAI API key?
- PR title/description generation will use smart heuristics instead of AI.
- Vibe checks will not work without an API key.
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
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 prpolish-0.2.6.tar.gz.
File metadata
- Download URL: prpolish-0.2.6.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4e6e526c6410c669e5d22dc39431535a1851a9060837148c561b77a36ec1387
|
|
| MD5 |
29e490ef6ab0cf9315fde53bbef00299
|
|
| BLAKE2b-256 |
8ba7ba20d768afb1f727d1f40242e57b0e0a449ab8eee21f86ce6da97e63abe6
|
File details
Details for the file prpolish-0.2.6-py3-none-any.whl.
File metadata
- Download URL: prpolish-0.2.6-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2838300cd3ce302141b88c42763c4c7cdd83778866512722a3bfbc911c7e8105
|
|
| MD5 |
8b964eddf94db415c607ac9051c15bc1
|
|
| BLAKE2b-256 |
de56d7282154d53a4993f8e34a31b50527876a372bc0df7f1012beb17cf50a84
|