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

@mrxgroot/devwatch

v1.0.0

Published

A professional file watcher and process runner for Node.js development

Readme

devwatch

A professional file watcher and auto-runner for Node.js development.
A full-featured, configurable alternative to nodemon — with lifecycle hooks, env management, crash-loop protection, and desktop notifications.


Install

# Global (recommended for CLI use)
npm install -g devwatch

# Local to a project
npm install --save-dev devwatch

Quick start

devwatch server.js
devwatch src/index.js --env dev --delay 300

Configuration

Scaffold a config file:

devwatch --init

This creates devwatch.config.js in your current directory.
You can also add a "devwatch" key to your package.json.

Full devwatch.config.js reference

module.exports = {
  // Entry point (can also be the first CLI argument)
  entry: "src/index.js",

  // Runtime: "node" | "bun" | "ts-node" | "esm"
  runtime: "node",
  runtimeArgs: [], // flags before your file, e.g. ["--inspect"]
  scriptArgs: [], // flags after  your file, e.g. ["--port","3000"]

  // Environment
  env: "default", // devwatch --env dev  switches to .env.development
  envFiles: {
    default: ".env",
    dev: ".env.development",
    prod: ".env.production",
    test: ".env.test",
  },

  // Watch settings
  watch: {
    paths: ["src", "config"], // extra dirs/files to watch
    ignore: ["node_modules", ".git", "dist", "*.log"],
    extensions: [".js", ".ts", ".json"],
  },

  // Runner behaviour
  runner: {
    debounce: 250, // ms to wait after last change
    clearConsole: true, // clear terminal on restart
    gracefulShutdown: true, // SIGTERM → wait → SIGKILL
    killTimeout: 3000,
    restartOnError: false, // restart even on non-zero exit
    maxRestarts: 0, // crash-loop guard (0 = unlimited)
    restartWindowMs: 10000,
  },

  // Lifecycle hooks: shell string OR async function(ctx)
  // ctx = { file, env, config, changedFile?, exitCode? }
  hooks: {
    beforeStart: "npm run build",
    beforeRestart: "npm run lint --silent",
    afterRestart: async ({ changedFile }) =>
      console.log("changed:", changedFile),
    onCrash: async ({ exitCode }) => console.error("crashed:", exitCode),
  },

  // Desktop notifications (optional: npm install node-notifier)
  notify: {
    enabled: true,
    onRestart: true,
    onCrash: true,
  },

  // Logging
  log: {
    level: "info", // silent | error | warn | info | debug
    timestamps: true,
    colors: true,
    prefix: "devwatch",
    file: "devwatch.log", // also write to file
  },
};

CLI options

| Flag | Alias | Description | | ----------------- | ----- | ----------------------------------- | | --config <path> | -c | Path to config file | | --env <name> | -e | Environment (default/dev/prod/test) | | --delay <ms> | -d | Debounce delay in ms | | --quiet | -q | Suppress all output | | --no-clear | | Don't clear console on restart | | --init | | Scaffold devwatch.config.js | | --version | -v | Print version | | --help | -h | Show help |


Runtimes

| Value | Requires | | --------- | ---------------------------------------- | | node | Node.js (default) | | bun | Bun installed | | ts-node | npm i -g ts-node | | esm | Node.js with --experimental-vm-modules |


Features

  • chokidar watching — reliable, cross-platform, recursive
  • Debounce — ignores rapid save storms
  • Graceful shutdown — SIGTERM → wait → SIGKILL
  • Crash-loop guard — stops after N restarts in a window
  • Lifecycle hooks — shell commands or async functions
  • Env management — per-environment .env files via dotenv
  • Multiple runtimes — node / bun / ts-node / esm
  • Desktop notifications — via optional node-notifier
  • Structured logging — levels, colours, timestamps, log file
  • Zero-config — works with just devwatch server.js

License

MIT