github-watch
v0.1.0
Published
CLI utility that monitors GitHub pull requests across local repositories
Maintainers
Readme
GitHub PR Watcher
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. Optionally auto-approves and auto-merges PRs that are ready.
Installation
npm install -g github-watchOr run it directly without installing:
npx github-watchRequires Node.js 18+ and the GitHub CLI (gh).
Quick Start
If installed globally:
# Watch repos starting from the current directory
github-watch
# Watch all repos under a specific path
github-watch ~/Source/MyOrg
# Auto-approve and auto-merge
github-watch --approve --merge
# Preview what would happen without taking action
github-watch --approve --merge --dry-runOr with npx (no install required):
npx github-watch ~/Source/MyOrg
npx github-watch --approve --merge
npx github-watch --approve --merge --dry-runWhat It Does
- Verifies
ghis installed and authenticated - Discovers git repos from your current directory (or a path you provide)
- Presents interactive menus to select repos, target branches, and contributors
- Polls GitHub for open PRs on your chosen interval
- Displays PRs in a clean, aligned terminal layout with color-coded status
- Optionally approves pending PRs and merges approved ones that pass checks
Your selections can be saved and automatically restored on the next run.
Flags
| Flag | Description |
|---|---|
| --path <path> | Starting directory for repo discovery |
| --approve | Auto-approve matching PRs pending review |
| --merge | Auto-merge approved PRs that pass all checks |
| --dry-run | Run without taking any actions |
| --depth <n> | Limit directory depth for repo discovery |
| --clear | Clear saved settings before starting |
Documentation
See docs/usage.md for the full walkthrough covering authentication, repo discovery, branch filtering, contributor selection, the polling loop, and saved settings.
Tech Stack
- 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
Contact
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
[email protected]
https://fredlackey.com
