prctrl 2.1.0

Terminal-native GitHub PR management. Stay on top of code reviews without leaving your terminal.
Documentation
# digest

**Generate a shareable weekly digest of your pending PR reviews โ€” perfect for Slack, Teams, or email.**

Unlike `report` (which shows what you've already reviewed), `digest` gives you a snapshot of what's currently waiting, grouped by age, repository, and author.

## When to Use

- Monday morning: "Let me share the team digest in Slack"
- Before a standup: "Quick status check for the channel"
- Weekly wrap-up: "Here's what's pending heading into the weekend"
- Stakeholder update: "Here's a plain-text summary of review load"

## Synopsis

```bash
prctrl digest [OPTIONS]
```

## Options

| Flag | Description | Default |
|------|-------------|---------|
| `-d, --days <DAYS>` | Number of days to include | `7` |
| `--raw` | Output as raw Markdown (for Slack/Teams) | `false` |
| `--repo <REPO>` | Filter by repository name (partial match, case-insensitive) | |
| `--author <AUTHOR>` | Filter by author username (partial match, case-insensitive) | |
| `-P, --priority` | Show priority scores and most urgent PR | `false` |
| `-s, --since-days <DAYS>` | Only show PRs created in the last N days (newer PRs) | |
| `--older-than <DAYS>` | Only show PRs older than N days (neglected PRs) | |

## Examples

```bash
# Pretty terminal digest
prctrl digest

# Shorter lookback (last 3 days)
prctrl digest --days 3

# Raw Markdown for pasting into Slack
prctrl digest --raw

# Raw Markdown with custom window
prctrl digest --days 14 --raw

# Filter by repository
prctrl digest --repo api

# Filter by author
prctrl digest --author alice

# Show priority scores and most urgent PR
prctrl digest --priority

# Combined: raw markdown filtered by repo with priority
prctrl digest --raw --repo backend --priority

# Only show PRs created in the last 3 days (recent PRs)
prctrl digest --since-days 3

# Only show PRs older than 7 days (neglected PRs)
prctrl digest --older-than 7
```

## Output Examples

### Terminal output

```
๐Ÿ“‹ Weekly Review Digest โ€” last 7 days
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

  ๐Ÿ“Š Summary
     Total PRs:          12
     Lines changed:      +2847 / -1203
     ๐Ÿšจ Overdue (15d+):  2

  โฑ๏ธ  Age Breakdown
     ๐Ÿ†• New: 3
     ๐ŸŒฑ Fresh: 4
     โณ Aging: 2
     ๐Ÿ”ฅ Stale: 1

  ๐Ÿ“ By Repository (top 5)
     api-gateway: 4
     frontend: 3
     shared-libs: 2

  ๐Ÿ‘ฅ By Author (top 5)
     alice: 4
     bob: 3
     carol: 2

  ๐Ÿšจ Overdue PRs (15d+)
     #4821 fix: critical auth bug โ€” 18d old
     #4798 refactor: legacy cache layer โ€” 16d old

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  ๐Ÿ’ก Use `--raw` to get Markdown output for Slack/Teams
```

### With `--priority` flag

```
๐Ÿ“‹ Weekly Review Digest โ€” last 7 days
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

  ๐Ÿ“Š Summary
     Total PRs:          12
     Lines changed:      +2847 / -1203
     ๐Ÿšจ Overdue (15d+):  2

  ๐Ÿšจ Most Urgent:
    fix: critical auth bug  #4821  โญโญโญโญโญ
    ๐Ÿ‘ค alice  โ€ข  ๐Ÿ“ฆ 1247 lines  โ€ข  โฑ๏ธ 18d  โ€ข  api-gateway

  โญ Priority Breakdown:
     โญโญโญโญโญ  2 PR(s)  โ€ข  oldest: 18d  โ€ข  +2340/-892 lines
     โญโญโญโญ   3 PR(s)  โ€ข  oldest: 10d  โ€ข  +847/-423 lines
     โญโญโญ    4 PR(s)  โ€ข  oldest: 5d  โ€ข  +432/-156 lines
     โญโญ     2 PR(s)  โ€ข  oldest: 2d  โ€ข  +156/-89 lines
     โญ      1 PR(s)  โ€ข  oldest: 0d  โ€ข  +72/-43 lines

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  ๐Ÿ’ก Use `--raw` to get Markdown output for Slack/Teams
  ๐Ÿ’ก Use `--priority` to show priority scores and most urgent PR
```

### Raw Markdown output (`--raw`)

```markdown
## ๐Ÿ“‹ Review Digest โ€” last 7 days

**Total:** 12 PRs | **+2847** / **-1203** lines | **Overdue:** 2

### By Repository
- **api-gateway**: 4 PR(s)
- **frontend**: 3 PR(s)
- **shared-libs**: 2 PR(s)

### By Author
- **alice**: 4 PR(s)
- **bob**: 3 PR(s)
- **carol**: 2 PR(s)

### Age Breakdown
- ๐Ÿ†• **New**: 3 PR(s)
- ๐ŸŒฑ **Fresh**: 4 PR(s)
- โณ **Aging**: 2 PR(s)
- ๐Ÿ”ฅ **Stale**: 1 PR(s)

### ๐Ÿšจ Overdue (15d+)
- [api-gateway#4821]https://github.com/org/api-gateway/pull/4821 *fix: critical auth bug* โ€” 18d old
- [shared-libs#4798]https://github.com/org/shared-libs/pull/4798 *refactor: legacy cache layer* โ€” 16d old
```

## Tips

- Use `--raw` when posting to Slack, Teams, or email โ€” the Markdown renders nicely in all three
- Pipe to `pbcopy` to copy to clipboard: `prctrl digest --raw | pbcopy`
- Use `--days 1` for a daily standup digest instead of weekly
- Use `--priority` to identify the most urgent PR at a glance
- Age buckets: ๐Ÿ†• New 0-1d ยท ๐ŸŒฑ Fresh 2-3d ยท โณ Aging 4-7d ยท ๐Ÿ”ฅ Stale 8-14d ยท ๐Ÿ’€ Overdue 15d+
- Combine filters for targeted digests: `digest --repo backend --author alice --priority`
- Use `--since-days 7` to show only recently created PRs
- Use `--older-than 7` to focus on neglected PRs waiting 7+ days
- `--since-days` and `--older-than` can be combined but `--since-days` takes precedence