A PR review router for herdr. Ctrl+click a GitHub PR or GitLab MR link in any pane and pick how to review it — tuicr, hunk, a plain diff, the browser, or your own tool.
Status: early (v0.1). tuicr + diff + browser tested on GitHub; hunk and GitLab are wired but lightly tested.
Ctrl+click a PR/MR link
└─ chooser popup: [t] tuicr [h] hunk [d] diff [o] browser
└─ the chosen reviewer opens in a herdr pane
- Config-driven — each reviewer is a few lines of TOML; add your own trivially.
- Auto-route — skip the chooser and go straight to a default; toggle with a keybind.
- Graceful — reviewers whose tools aren't installed are hidden; the browser always works.
- Single-key hotkeys and arrow/
j-k+ Enter.
The fastest way: paste this into any coding agent with shell access (Claude
Code, Cursor, …). It installs the plugin if needed, detects your tools, and
writes a tailored config (also in SETUP_PROMPT.md):
Set up my herdr-pickr config.
Plugin: https://github.com/tomasvarga/herdr-pickr
(if it isn't installed yet, run: herdr plugin install tomasvarga/herdr-pickr)
1. Detect tools — print FOUND/MISSING for each:
for t in tuicr hunk gh glab bat delta difft open xdg-open; do
command -v "$t" >/dev/null && echo "FOUND $t" || echo "MISSING $t"; done
2. Config path: herdr plugin config-dir pickr (create the dir if missing)
3. Write <path>/config.toml. Include a reviewer ONLY if its tools are installed.
Each reviewer is a [[backend]] block; the EXACT TOML keys are:
key, id, name, run (or run_github / run_gitlab), where, needs, platforms
(any other fields are optional — ignore them).
- run: {url} = the PR/MR URL. Use run_github/run_gitlab only when the command
differs (gh vs glab); otherwise a single run.
- where = pane|pager|detach ; needs = binaries required.
- platforms rule: list "gitlab" for a row ONLY if glab is installed, else
["github"]. tuicr and browser don't need glab, so they can list both.
If a row is github-only, OMIT its run_gitlab line (no dead entries).
Candidates — include only if installed; use these exact key and name:
tuicr : key="t" name="tuicr — full review" run="tuicr pr {url}" where=pane needs=["tuicr"] platforms=["github","gitlab"]
hunk : key="h" name="hunk — diff viewer" run_github="gh pr diff {url} --no-color | hunk patch -"
run_gitlab="glab mr diff {url} | hunk patch -" where=pane needs=["gh","hunk"]
diff : key="d" name="diff — plain read-only (bat)" run_github="gh pr diff {url} | bat --paging=always -l diff"
run_gitlab="glab mr diff {url} | bat --paging=always -l diff" where=pager needs=["gh","bat"]
browser: key="o" name="open in browser" run="open {url}" (macOS) or "xdg-open {url}" (Linux — use what you detected)
where=detach needs=[] platforms=["github","gitlab"]
Add [pickr]: auto=false, and default = ask me which enabled reviewer to use;
if you can't ask (non-interactive), use "browser".
4. Validate: python3 -c 'import tomllib; tomllib.load(open("<path>","rb"))' (must parse).
5. Show the config, list enabled reviewers, suggest installs for anything useful
I'm missing. To confirm, I'll Ctrl+click a PR and check the chooser.
Development (local):
herdr plugin link /path/to/herdr-pickrherdr plugin link doesn't run the build hook — the scripts are already executable.
From a repo (once published):
herdr plugin install <owner>/herdr-pickrRequires herdr ≥ 0.7.0. Each reviewer needs its own tool on PATH
(tuicr, hunk, gh/glab, bat); missing tools just hide their row.
cp config/config.example.toml "$(herdr plugin config-dir pickr)/config.toml"[pickr]
auto = false # true → skip the chooser, go straight to `default`
default = "tuicr"
[[backend]]
key = "t"
id = "tuicr"
name = "tuicr — full review"
run = "tuicr pr {url}" # {url} substituted; run_github / run_gitlab per platform
where = "pane" # pane | pager | detach
needs = ["tuicr"] # binaries required (gh ↔ glab on GitLab)
platforms = ["github", "gitlab"]Custom backends — any command is a reviewer. Point run at your own script
and it becomes a chooser row. For example, wire in a personal AI pre-reviewer:
[[backend]]
key = "a"
id = "ai-review"
name = "AI pre-review (my tool)"
run = "my-ai-review {url}"
where = "pane"
needs = ["my-ai-review"]
platforms = ["github"]Auto-route — bind a key to the toggle action in your herdr config:
[[keys.command]]
key = "prefix+p"
type = "plugin_action"
command = "pickr.toggle-auto"Install the reviewers you want — rows for tools you don't have stay hidden, so you only see what works.
| Reviewer | Install |
|---|---|
| tuicr | brew install agavra/tap/tuicr |
| hunk | brew install modem-dev/tap/hunk |
| diff (bat) | brew install bat (+ gh, or glab for GitLab) |
| browser | built in |
| sniffr — AI pre-review | herdr plugin install tomasvarga/herdr-sniffr |
Pairs great with herdr-sniffr —
a sibling herdr plugin that pre-reviews a PR with an AI agent and drops draft
comments on the risky lines. Install it and pickr's chooser gains an AI
pre-review entry (it runs sniffr {url}); the row appears automatically once
sniffr is on your PATH.
Auto-route — skip the chooser and always open the default:
[pickr]
auto = true
default = "tuicr"Swap the diff engine — point one run at delta / difftastic / etc.:
[[backend]]
key = "d"
id = "diff"
name = "diff — delta"
run_github = "gh pr diff {url} | delta"
where = "pager"
needs = ["gh", "delta"]
platforms = ["github"]Minimal (zero extra tools) — just the browser floor:
[pickr]
default = "browser"
[[backend]]
key = "o"
id = "browser"
name = "open in browser"
run = "open {url}"
where = "detach"
needs = []
platforms = ["github", "gitlab"]Bring your own reviewer — any command works (see the commented block in
config.example.toml): point run at your script and it becomes a chooser row.
- Tested: tuicr, diff (bat), browser on GitHub.
- Wired, lightly tested: hunk and GitLab (tuicr MR review works; confirm
glab+ hunk locally). - No native popup — herdr plugins can't summon herdr's own menu widget, so the chooser is a styled overlay pane. Close, not identical.
- Link patterns are fixed in the manifest (herdr constraint); you configure the reviewers, not which links fire. (A general link router is a possible future sibling — see the repo notes.)
herdr-pickr/
├── herdr-plugin.toml # manifest (link handlers → actions → panes)
├── install.sh # build hook (chmod)
├── bin/
│ ├── pickr-open # action: open the chooser for a clicked URL
│ ├── pickr-chooser # the overlay chooser + dispatch
│ ├── pickr-toggle # auto-route on/off
│ └── pickr-config # TOML config reader (python3)
└── config/config.example.toml
MIT — see LICENSE.