A tool for observing file trees and acting on changes


A tool for observing file directories and reacting to changes. Also includes reaktd for working with long-running processes.

$ reakt [options] <command>
$ reaktd [options] <command>
    -h, --help                     output usage information
    -V, --version                  output the version number
    -g, --grep [pattern|regexp]    run <command> when files matching [pattern|regexp] change (see below)
    -v, --invert [pattern|regexp]  do not run <command> if files matching [pattern|regexp] change (see below)
    -i, --interval [milliseconds]  polling interval in ms - defaults to 1000ms
$ reakt say "files updated"
$ reakt coffee -c src/ -o lib
$ reakt -g "src/*.coffee" "make && make test"
$ reakt -g "/^src/" foo
$ reaktd ./

Currently --grep and --invert accept file glob or regex patterns.

All patterns are re-expanded on every file change to ensure new files matching the glob are watched. Internally, reakt uses (node-glob)[] to handle expanding globs:

// $ reakt -g "src/*.coffee" bar 
var includePattern = glob.sync("src/*.coffee")

If the patterns you specify begin and end with a '/', they will be converted into RegExps internally:

// $ reakt -g "/^src/" foo 
var includeRegExp = RegExp("/^src/");