npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ship-digital/pull-watch

v1.8.1

Published

A tool that watches a git repository for changes and runs a specified command

Downloads

5

Readme

             _ _                      _       _
            | | |                    | |     | |
 _ __  _   _| | |________      ____ _| |_ ___| |__
| '_ \| | | | | |______\ \ /\ / / _` | __/ __| '_ \
| |_) | |_| | | |       \ V  V / (_| | || (__| | | |
| .__/ \__,_|_|_|        \_/\_/ \__,_|\__\___|_| |_|
| |
|_|

pull-watch -- ./do_something_when_your_git_repo_changes.sh

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!

Which way?

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

✨ Features

  • 🕒 Configurable poll interval (because sometimes you need a coffee break)
  • 🎯 Graceful process management (no rough handling here!)
  • 📁 Support for different git directories (home is where your .git is)
  • 📢 Smart logging levels (quiet, normal, and verbose - you choose how chatty it gets!)
  • 🛡️ Proper signal handling (catches signals like a pro)
  • ⏱️ Context-aware git operations with timeouts (patience is a virtue, but timeouts are better)
  • 🔄 Run on start option (for the eager beavers)
  • ⌚ Optional timestamps in logs (when you need to know when things happened)

🚀 Installation

Quick and easy - just like ordering pizza!

Go Install

go install github.com/ship-digital/pull-watch@latest

Homebrew

brew tap ship-digital/tap
brew install pull-watch

NPM / NPX

You can install it globally:

npm install -g @ship-digital/pull-watch

Or run it directly using npx:

npx @ship-digital/pull-watch -- <your_command>

🎮 Usage


  Usage: pull-watch [options] -- <command>

   Watch git repository for remote changes and run commands.

   It's like: 'git pull && <command>' 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

🌟 Examples

Watch current directory and restart a server when changes are detected:

Keep your server fresh and up-to-date!

pull-watch -- go run main.go

Watch specific directory with custom interval:

For when you want to keep an eye on things from a distance...

pull-watch -git-dir /path/to/repo -interval 1m -- npm start

Force kill processes (default):

The "no time for chitchat" approach

pull-watch -- node server.js

Graceful stop before force kill:

For the gentler souls among us

pull-watch -graceful -stop-timeout 10s -- ./my-server

Watch with different logging levels:

# 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.