winget install --id=ShipDigital.PullWatch -e
A tool that watches a git repository for changes and runs a specified command
PullWatch is a tool designed to watch a Git repository for changes and execute a specified command upon detecting updates. This automation saves time by eliminating manual checks and ensures commands run automatically when changes occur.
Key features of PullWatch include:
Ideal for developers and DevOps engineers working with Git repositories, PullWatch streamlines workflows by automating responses to repository changes. It can be installed via winget, ensuring easy setup across environments.
This tool enhances productivity by providing a reliable way to automate tasks in response to code updates.
_ _ _ _
| | | | | | |
_ __ _ _| | |________ ____ _| |_ ___| |__
| '_ \| | | | | |______\ \ /\ / / _` | __/ __| '_ \
| |_) | |_| | | | \ V V / (_| | || (__| | | |
| .__/ \__,_|_|_| \_/\_/ \__,_|\__\___|_| |_|
| |
|_|
A hobbyist-grade tool that watches a git repository for changes and runs a specified command when changes are detected.
Your friendly neighborhood Git repository watchdog! ๐ Guards your watch, your time, avoids wasting it, get it? No? Never mind. I am just a dad. It's muscle memory at this point!
> How it started: ๐ git pull
&& ./run.sh
&& CTRL/CMD+C && git pull
&& ./run.sh
&& CTRL/CMD+C && โพ๏ธ... ๐ต
>
> How it's going: pull-watch -- ./run.sh
Quick and easy - just like ordering pizza!
go install github.com/ship-digital/pull-watch@latest
brew tap ship-digital/tap
brew install pull-watch
You can install it globally:
npm install -g @ship-digital/pull-watch
Or run it directly using npx:
npx @ship-digital/pull-watch --
Usage: pull-watch [options] --
Watch git repository for remote changes and run commands.
It's like: 'git pull && ' but with polling and automatic process management.
Options:
-git-dir string
Git repository directory (default ".")
-graceful
Try graceful stop before force kill
-interval duration
Poll interval (e.g. 15s, 1m) (default 15s)
-no-restart
Pull changes without restarting the command, useful if the command has a built-in auto-reload feature
-quiet
Show only errors and warnings
-run-on-start
Run command on startup regardless of git state
-stop-timeout duration
Timeout for graceful stop before force kill (default 5s)
-timestamp
Show timestamps in logs
-verbose
Enable verbose logging
-version
Show version information
Keep your server fresh and up-to-date!
pull-watch -- go run main.go
For when you want to keep an eye on things from a distance...
pull-watch -git-dir /path/to/repo -interval 1m -- npm start
The "no time for chitchat" approach
pull-watch -- node server.js
For the gentler souls among us
pull-watch -graceful -stop-timeout 10s -- ./my-server
# Default mode - shows important info
pull-watch -- npm start
# Quiet mode - shows only errors and warnings
pull-watch -quiet -- npm start
# Verbose mode - shows all the details
pull-watch -verbose -- npm start
Made with โค๏ธ by @deblasis for developers who appreciate a touch of automation in their lives.