| Crates.io | needle-cli |
| lib.rs | needle-cli |
| version | 0.14.1 |
| created_at | 2025-12-13 21:51:08.170474+00 |
| updated_at | 2025-12-19 02:20:49.972672+00 |
| description | TUI that highlights the GitHub PRs that need you |
| homepage | |
| repository | https://github.com/cesarferreira/needle |
| max_upload_size | |
| id | 1983470 |
| size | 2,511,270 |
TUI that shows the few PRs that need you: review requests, failing CI, and long-running checks.
cargo install needle-cli
This installs the needle binary.
Demo mode (no GitHub token required):
needle --demo
Real mode (requires NEEDLE_GITHUB_TOKEN or GITHUB_TOKEN):
export NEEDLE_GITHUB_TOKEN=ghp_...
# or
export GITHUB_TOKEN=ghp_...
needle
--days <N>: only include PRs updated in the last N days (default: 30)--demo: run with diverse fake data--org <ORG>: only show PRs in these orgs/users (repeatable or comma-delimited)--include <owner/repo>: only show these repos (repeatable or comma-delimited)--exclude <owner/repo>: hide these repos (repeatable or comma-delimited)--include-team-requests: include PRs requested to teams you are in (default: user-only)--bell: ring terminal bell when a PR enters NEEDS YOU or when CI fails--no-notifications: disable desktop notifications (enabled by default)--hide-pr-numbers: hide PR numbers column--hide-repo: hide repository column--hide-author: hide author column--no-cache: start empty (skip cached PRs) and rely on fresh refresh--purge-cache: delete the cache DB before starting (also works with --demo)needle --days 7
Needle automatically creates a config file at ~/.config/needle/config.toml on first run. All CLI options can be set as defaults in this file:
# Only include PRs updated in the last N days
days = 14
# Only show PRs from these orgs/users
org = ["my-company", "my-username"]
# Exclude noisy repos
exclude = ["my-company/legacy-repo"]
# Ring terminal bell on important events
bell = true
# Auto-refresh intervals (seconds)
refresh_interval_list_secs = 120
refresh_interval_details_secs = 15
CLI arguments always override config file values.
Press p in list view to pin/unpin a PR. Pinned PRs appear in a dedicated 📌 PINNED section at the top of the list, regardless of their score. Pin state persists across sessions.
Needle shows desktop notifications for important events like CI failures, review requests, and PRs ready to merge.
On macOS, install terminal-notifier for click-to-open support:
brew install terminal-notifier
With terminal-notifier installed, clicking a notification opens the PR in your browser. Without it, notifications still work but won't be clickable.
NEEDLE_GITHUB_TOKEN or GITHUB_TOKENNeedle uses the GitHub API, so you’ll need a Personal Access Token.
export NEEDLE_GITHUB_TOKEN="ghp_..."
# or
export GITHUB_TOKEN="ghp_..."
[!NOTE] If both are set,
NEEDLE_GITHUB_TOKENtakes priority.
Add it to your bashrc/zshrc for future usage.
Included PRs:
--include-team-requests)For each PR it computes:
List view:
↑ / ↓: move selectionEnter: open selected PR in default browserTab: open details viewp: pin/unpin selected PR/: filter mode (type to filter by repo/title/author/#)
Esc: exit filter mode + clear filter textCtrl+n: toggle "only NEEDS YOU"Ctrl+c: toggle "only failing CI"Ctrl+v: toggle "only review requested"Ctrl+x: clear all filters?: help (explains what each section means)r: refresh now (shows shimmer while refreshing)q: quitDetails view:
↑ / ↓: select CI checkEnter: open selected CI check page (falls back to PR URL)f: open first failing CI check (falls back to PR URL)Tab: back to listr: refresh nowq: quitIn details view you get a list of CI steps (check runs / status contexts):
startedAt is available)rEach PR gets a score (higher = more urgent):
+50 review requested from user
+40 CI failed AND state changed since last_seen
+20 CI running longer than 10 minutes
+15 approved but unmerged for >24h
-20 waiting on others (no review requested, CI green, not approved)
-30 CI failed but unchanged since last_seen
Sort:
GITHUB_TOKEN.MIT. See LICENSE.