PRetty CLI
Run npx @alexandrakay/pretty-pr inside any repo. It reads your git history, understands what you built, and writes the PR description your team deserves.
Install
No install required — run it directly with npx.
npx @alexandrakay/pretty-pr
Or install globally if you use it every day:
npm install -g @alexandrakay/pretty-pr
Setup
PRetty calls the Anthropic API. You need an API key from console.anthropic.com.
Set it as an environment variable:
export ANTHROPIC_API_KEY=sk-ant-...
Or drop it in a .env.local file at your repo root — PRetty will pick it up automatically.
Commands & flags
npx @alexandrakay/pretty-prCommits only. Fastest. Good enough for most PRs.
--diffIncludes the git diff. Richer output — better descriptions and testing notes.
--fullEverything: commits + diff + branch name. Slowest, best results.
--base <branch>Compare against a specific base branch. Defaults to main.
--range <a..b>Generate from a specific commit range instead of branch diff.
--out <file>Write output to a markdown file instead of printing to terminal.
--openOpen a GitHub PR immediately after generating. Requires the gh CLI.
--draftUsed with --open. Creates the PR as a draft.
Output quality ladder
The more context you give PRetty, the better the output. Start with commits-only and upgrade when you need more depth.
npx @alexandrakay/pretty-pr
Decent PR title, okay description, thin on context.
npx @alexandrakay/pretty-pr --diff
Strong title, solid description, inferred testing notes.
npx @alexandrakay/pretty-pr --full
Full picture — best title, reviewer notes, complete testing checklist.
What you get
Every run produces five sections:
- —PR Title. Conventional commit style, clean and specific.
- —PR Description. What changed, why it changed, how to test it.
- —Changelog Entry. Ready to paste into your CHANGELOG.md.
- —Reviewer Notes. What to focus on, what to skip, what's risky.
- —Testing Checklist. Auto-generated from your actual diff.
Open a PR directly
If you have the GitHub CLI installed and authenticated, PRetty can open the PR for you:
npx @alexandrakay/pretty-pr --full --open
Add --draft to open it as a draft instead.
Prefer the browser?
Paste your commits into the web app and generate PR copy without touching the terminal.
Try the web app