/dirwatch

Simple command line tool to watch files/directories

Primary LanguageJavaScriptMIT LicenseMIT

Dirwatch

Simple command line tool to watch files/directories and call a command when a change has been detected. Uses Chokidar underneath. There's also Chokidar-CLI, which is a more complete version but doesn't provide an option to configure the stabilityThreshold.

I use it to watch a folder for syncing it with Google Drive.

Usage

Clone repository and run npm install.

See all the options

$ node index.js

Watch a folder and run a command

$ node index.js <folder> -c <command>

Building an executable binary

$ npm run build
$ ./dirwatch-linux  # will show the command help 

LICENSE

MIT