ServicesPortfolioToolsJournalAbout
← Back to Tools
🔀
TypeScriptNode.jsCLI CLI Tool

gitprgen

AI-powered PR description generator. Generates clear, structured pull request descriptions from your git diffs.

Install
npm install -g gitprgen

Generate clear, structured pull request descriptions from your git diffs — powered by AI.

Setup

Set your LLM provider API key:

# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."

# OpenAI
export OPENAI_API_KEY="sk-..."

Optionally create a config file at ~/.gitprgen.json:

{
  "provider": "anthropic",
  "model": "claude-sonnet-4-20250514"
}

Usage

# 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-20250514

How It Works

  1. Reads the diff between your current branch and the base branch (main by default)
  2. Collects commit messages and changed files summary
  3. Sends everything to an LLM
  4. Outputs a structured PR description (summary, changes, testing)

Supported Providers

ProviderEnv Var
AnthropicANTHROPIC_API_KEY
OpenAIOPENAI_API_KEY

Features

  • Zero-config with sensible defaults
  • Supports Anthropic and OpenAI as providers
  • Custom PR templates
  • Configurable base branch
  • Structured output: summary, changes, testing notes