fsw

Monitor files and directories for changes and trigger actions on detection.

brewmacoslinux
Try with needOr install directly
Source

About

File change monitor with multiple backends

Commands

fsw

Examples

run a command when files change$ fsw -e FileChange /path/to/watch -- ./rebuild.sh
watch multiple directories for changes$ fsw /path/to/dir1 /path/to/dir2 -- echo 'Files changed'
monitor file changes and rebuild automatically$ fsw src/ -- npm run build
watch specific file types for changes$ fsw -e FileChange -f '.*\.js$' . -- npm test
trigger script on any file system event$ fsw --list-events