A process runner with refresh capabilities.

Usage no npm install needed!

<script type="module">
  import lighterRun from '';



Chat Version Downloads Build Coverage Style

With lighter-run, you can run the node application that's in your current directory, and it will restart when files change.

Quick Start

  1. Install globally (using sudo if necessary).
npm install --global lighter-run
  1. Ensure that the "main" property in your package.json points to your application's entry point file.

  2. Run!


Passing Arguments

To pass arguments to your entry point, just list them after a double-dash:

lighter-run -- ARG1 ARG2 ARG3

Running Other Files

If you'd like to run a file other than the one that's specified as "main" in your package.json, then you can specify it as an argument to lighter-run:

lighter-run index

NOTE: You can omit the ".js" extension just as you would with the node executable.


lighter-run uses lighter-config for its configuration. Just create a "config/base.json" file in your project, and add some options under a property called "lighterRun". The following is an example of a configuration which uses the default values:

  "lighterRun": {
    "minRestartDelay": 500,
    "maxRestartDelay": 5000,
    "restartDelayBackoff": 2,
    "cleanTime": 2000,
    "ignore": [
    "live": [
    "watchDirs": null

Amount of time to wait before trying to restart (the first time).

Maximum amount of time to wait before trying to restart, after failing many times.

Multiplier to be applied to the restart delay time after each failure.

Length of time that a process must be running before it's considered to have started cleanly.

File patterns in which changes should be ignored.

File patterns that can be live-reloaded instead of restarting the process.

Absolute paths for directories that should be watched. (Defaults to the current working directory).

More on lighter-run...