A CLI tool that monitors GitHub pull requests across your local repositories. It discovers repos, lets you pick which contributors and branches to watch, and polls on an interval. You choose the watch mode -- just observe, auto-approve, auto-merge, or both.
npm install -g github-watchOr run it directly without installing:
npx github-watchRequires Node.js 18+ and the GitHub CLI (gh).
# Watch repos starting from the current directory
github-watch
# Watch all repos under a specific path
github-watch ~/Source/MyOrg
# Limit directory depth for repo discovery
github-watch -d 2 ~/Source
# Preview what would happen without taking action
github-watch --dry-run
# Skip all prompts using saved settings from last session
github-watch -y
# Clear saved settings and start fresh
github-watch --clear- Verifies
ghis installed and authenticated - Offers to restore saved settings from a previous session (if any exist)
- Discovers git repos from your current directory (or a path you provide)
- Presents interactive menus to select repos, target branches, and contributors
- Lets you pick a watch mode: watch only, approve, merge, or approve and merge
- Polls GitHub for open PRs on your chosen interval
- Displays PRs in a clean, aligned terminal layout with color-coded status
- Takes action on PRs based on the selected mode
Your selections (including the GitHub account, watch mode, and logging preference) can be saved and automatically restored on the next run. When saved settings exist, each menu pre-selects your previous choices so you can just hit Enter to confirm.
| Flag | Short | Description |
|---|---|---|
--path <path> |
-p |
Starting directory for repo discovery |
--dry-run |
-t |
Run without taking any actions on PRs |
--depth <n> |
-d |
Limit directory depth for repo discovery |
--clear |
-c |
Clear saved settings before starting |
--yes |
-y |
Auto-accept all saved settings without prompting |
The --yes flag requires saved settings to exist. If there are no saved settings, it has no effect and the interactive wizard runs normally.
Unknown options are rejected with an error and the usage text is displayed.
The watch mode is selected through an interactive menu during setup:
| Mode | Behavior |
|---|---|
| Watch only | Display matching PRs each cycle, take no action |
| Approve | Auto-approve pending PRs (skips your own) |
| Merge | Auto-merge approved PRs that pass all checks |
| Approve and merge | Both approve and merge in a single pass |
The selected mode is saved with your settings and pre-selected on the next run.
See USAGE.md for the full walkthrough covering authentication, repo discovery, branch filtering, contributor selection, watch modes, the polling loop, and saved settings.
- Node.js (ES modules)
- Commander.js for CLI parsing
- Chalk for terminal styling
- Custom interactive menus (no external prompting libraries)
- GitHub CLI (
gh) for all GitHub operations
Have an idea, feature request, or bug report? Pull requests are always welcome, but if you'd rather just reach out directly, feel free to get in touch.
Fred Lackey fred.lackey@gmail.com https://fredlackey.com