Skip to content

Latest commit

 

History

History
112 lines (80 loc) · 2.29 KB

File metadata and controls

112 lines (80 loc) · 2.29 KB

PR CLI

A TypeScript CLI application that helps you manage GitHub Pull Requests that require your attention.

Features

  • 📋 List all PRs that require your attention from configured repositories
  • 🌐 Open PRs directly in your browser
  • 🙈 Ignore PRs you don't want to see
  • 👀 Watch mode: Run in background and get desktop notifications for new PRs
  • ⚡ Fast and easy to use

Installation

npm install
npm run build

Or for development:

npm install

Configuration

Before using the CLI, you need to configure it with your GitHub token and repositories:

npm run dev configure

You'll need:

  • A GitHub Personal Access Token with repo scope
  • List of repositories in owner/repo format (comma-separated)

The configuration is stored in ~/.pr-cli-config.json.

Usage

List PRs that require your attention:

npm run dev list

This will:

  1. Fetch all open PRs from your configured repositories
  2. Filter PRs where you are:
    • Requested as a reviewer
    • Assigned to the PR
    • Mentioned in the PR title or description
  3. Show an interactive menu to:
    • Open PRs in your browser
    • Ignore specific PRs
    • Exit

Watch for New PRs

Run in the background and get notifications for new PRs:

npm run dev watch

Or specify a custom check interval (in minutes):

npm run dev watch -- -i 10

This will:

  • Run in the background checking for new PRs
  • Send desktop notifications when new PRs are found
  • Remember which PRs you've already been notified about
  • Continue running until you stop it (Ctrl+C)

Development

# Run in development mode
npm run dev

# Build TypeScript
npm run build

# Run built version
pnpm start

How it works

The CLI:

  • Uses GitHub's REST API via Octokit
  • Stores configuration in ~/.pr-cli-config.json
  • Stores watch state in ~/.pr-cli-watch-state.json
  • Filters out PRs you created
  • Shows only PRs that need your attention
  • Sends native desktop notifications in watch mode
  • Shows only PRs that need your attention

Creating a GitHub Token

  1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Generate new token
  3. Select scopes: repo (full control of private repositories)
  4. Copy the token and use it during configuration

License

MIT