npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

llmpr

v2.0.0

Published

CLI tool for generating AI-powered PR descriptions and code reviews

Readme

LLMPR

AI-powered Pull Request descriptions with one command

LLMPR generates professional PR descriptions—and now structured code reviews—from your Git changes using OpenAI's language models.

Features

  • 🔄 Git Integration: Analyzes your current branch changes
  • 🎨 Two Styles: Choose concise or verbose descriptions
  • 📊 Smart Visualizations: Generates diagrams and code comparisons when needed
  • 🔍 Context-Aware: Can request specific file contents for better understanding
  • 📁 Directory Visualization: Shows repository structure with focus on changed files
  • 📏 Customizable Length: Control the maximum size of your PR descriptions
  • 🚀 Interactive PR Creation: Create GitHub PRs directly from the CLI with interactive prompts
  • 🧠 AI Review Mode: Request a structured Good/Bad/Suggestions/Critical review of your diff

Installation

You can install the package globally using npm:

npm install -g llmpr

Or, to install from source:

git clone https://github.com/yourusername/llmpr.git
cd llmpr
npm install
npm run build
npm install -g .

Prerequisites

You need to have an OpenAI API key. You can get one from OpenAI's website.

Set your API key as an environment variable:

export OPENAI_API_KEY=your_api_key

Or add it to your shell profile for persistence (e.g., ~/.bash_profile, ~/.zshrc):

echo 'export OPENAI_API_KEY=your_api_key' >> ~/.zshrc
source ~/.zshrc

Quick Start

  1. Set your OpenAI API key:

    export OPENAI_API_KEY=your_api_key
  2. Run in your Git repository:

    llmpr

Usage

llmpr [options]

Options

| Option | Description | |--------|-------------| | -b, --base <branch> | Base branch to compare against (default: "main") | | -m, --model <model> | OpenAI model to use (default: "gpt-5") | | -o, --output <file> | Save PR description to file | | -r, --review | Generate a structured code review instead of a PR description | | -v, --verbose | Show detailed logs and API responses | | -s, --style <style> | PR style: "concise", "standard", or "verbose" (default: "standard") | | -l, --max-length <words> | Maximum length in words (default: 500) | | -c, --create-pr | Create a GitHub PR after generating description (interactive) | | -h, --help | Display help | | -V, --version | Display version |

Examples

# Generate against develop branch
llmpr --base develop

# Save to file
llmpr -o pr.md

# Concise description
llmpr --style concise

# Generate a structured code review
llmpr -r

# Save the review to a file
llmpr -r -o review.md

# Limit length to 300 words
llmpr --max-length 300

# Use specific OpenAI model
llmpr --model gpt-4-turbo

# Generate description and create PR interactively
llmpr --create-pr

# Create PR with custom base branch
llmpr --base develop --create-pr

# Combine options for complete workflow
llmpr --base develop --style verbose --create-pr

Interactive PR Creation

The --create-pr flag enables an interactive workflow that:

  1. ✅ Generates an AI-powered PR description
  2. ✅ Suggests a title based on your commits
  3. ✅ Shows a preview of the generated description
  4. ✅ Allows you to edit the title and description
  5. ✅ Lets you confirm the base branch
  6. ✅ Creates the PR as draft or ready for review
  7. ✅ Prompts to push your branch to origin if needed, then retries PR creation automatically
  8. ✅ Displays the PR URL and details

Prerequisites for PR Creation

  • GitHub CLI (gh) must be installed and authenticated
    • Install: brew install gh (macOS) or visit https://cli.github.com/
    • Authenticate: gh auth login
  • Repository access: You must be a collaborator with write access
    • If you don't have access, you can fork the repo and create PRs from your fork
    • Or use llmpr without --create-pr to generate the description and create the PR manually

Example Interactive Flow

$ llmpr --create-pr

Starting LLMPR...
✔ Diff against main successfully retrieved
✔ Repository structure analyzed
✔ PR description generated in 3.45s after 1 round
─────────────────────────────────────────────────────

PR Creation Flow

ℹ Current branch: feature/new-feature
─────────────────────────────────────────────────────
Generated Description Preview
Add interactive PR creation feature with gh CLI...
─────────────────────────────────────────────────────
? PR Title: › Add interactive PR creation with GitHub CLI
? Edit the generated description? › No
? Base branch: › main
? Create as draft PR? › No
? Create pull request? › Yes

✔ Pull request created successfully!
─────────────────────────────────────────────────────
✔ Pull Request Created!
─────────────────────────────────────────────────────

┌─────────────────────── PR Details ────────────────────────┐
│                                                            │
│  Title: Add interactive PR creation with GitHub CLI       │
│                                                            │
│  Base Branch: main                                         │
│  Status: Ready for Review                                  │
│                                                            │
│  URL: https://github.com/user/repo/pull/123               │
│                                                            │
└────────────────────────────────────────────────────────────┘

ℹ Open in browser: https://github.com/user/repo/pull/123

# If the branch is not yet pushed
✖ Failed to create pull request
Current branch must be pushed before creating a PR.
? Push feature/new-feature to origin now? › Yes
✔ Branch feature/new-feature pushed to origin
✔ Pull request created successfully!

GitHub Action

LLMPR can automatically generate PR descriptions when PRs are created or on demand.

Setup

  1. Add your OpenAI API key to GitHub Secrets as OPENAI_API_KEY
  2. Create a workflow file at .github/workflows/pr-description.yml:
name: Generate PR Description

on:
  pull_request:
    types: [opened]

jobs:
  generate-pr-description:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
      
      - name: Install llmpr
        run: npm install -g llmpr
      
      - name: Generate PR description
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        run: |
          llmpr --base ${{ github.event.pull_request.base.ref }} --output pr_description.md --style verbose
      
      - name: Update PR description
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            const fs = require('fs');
            const prDescription = fs.readFileSync('pr_description.md', 'utf8');
            
            await github.rest.pulls.update({
              owner: context.repo.owner,
              repo: context.repo.repo,
              pull_number: context.issue.number,
              body: prDescription
            });

Comment Trigger

Add a comment-based trigger to generate PR descriptions on demand:

  1. Create .github/workflows/comment-trigger.yml
  2. In any PR, comment /generate-pr-description

Why LLMPR?

  • Save Time: Generate comprehensive PR descriptions in seconds
  • Consistency: Create standardized, high-quality documentation
  • Clarity: Help reviewers understand changes more quickly
  • Collaboration: Improve team communication with clear change explanations

License

MIT