AI-powered PR description generator. Generates clear, structured pull request descriptions from your git diffs.
npx gitprgenOr install globally:
npm install -g gitprgen# Generate PR description for current branch vs main
gitprgen
# Specify base branch
gitprgen --base develop
# Use custom template
gitprgen --template ./pr-template.md
# Specify LLM provider and model
gitprgen -p anthropic -m claude-sonnet-4-20250514Create ~/.gitprgen.json to set defaults:
{
"provider": "anthropic",
"model": "claude-sonnet-4-20250514"
}ANTHROPIC_API_KEY— Required when using Anthropic providerOPENAI_API_KEY— Required when using OpenAI provider
- Reads the diff between your current branch and the base branch (main by default)
- Collects commit messages and changed files summary
- Sends everything to an LLM
- Outputs a structured PR description (summary, changes, testing)
MIT