New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pr2prompt

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pr2prompt

A CLI tool that converts GitHub Pull Requests into AI-friendly prompts

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

PR2Prompt

A CLI tool that converts GitHub Pull Requests into AI-friendly prompts.

Features

  • Fetch PRs from GitHub repositories
  • Convert PRs to structured prompts
  • Support multiple output formats (Markdown, JSON, YAML)
  • Customizable templates
  • Bilingual support (English/Chinese)

Installation

npm install -g pr2prompt
# or
pnpm add -g pr2prompt

Usage

pr2prompt --repo owner/repo --prs 12,34,56 --out prompt.md

Options

  • --repo <owner/name>: GitHub repository (required)
  • --prs <list>: Comma/space separated PR numbers
  • --pr-file <file>: File with one PR number per line
  • --format <fmt>: Output format (markdown | json | yaml, default: markdown)
  • --template <file>: Custom Handlebars template
  • --out <file>: Write to file instead of STDOUT
  • --extra-fields <fields>: Additional PR fields (comma separated)
  • --lang <zh|en>: Prompt language

Examples

# Basic usage
pr2prompt --repo owner/repo --prs 12,34,56

# With custom template
pr2prompt --repo owner/repo --prs 12 --template custom.hbs

# Output in YAML format
pr2prompt --repo owner/repo --prs 12 --format yaml

# Chinese output
pr2prompt --repo owner/repo --prs 12 --lang zh

Development

# Install dependencies
pnpm install

# Run locally
ts-node src/index.ts --repo owner/repo --prs 12

License

ISC

Keywords

github

FAQs

Package last updated on 16 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts