Executes commands in response to file modifications
APACHE-2.0 License
Software development often involves running the same commands over and over. Boring!
watchexec
is a simple, standalone tool that watches a path and runs a command whenever it detects modifications.
Example use cases:
xargs
.gitignore
and .ignore
filesWatch all JavaScript, CSS and HTML files in the current directory and all subdirectories for changes, running npm run build
when a change is detected:
$ watchexec -e js,css,html npm run build
Call/restart python server.py
when any Python file in the current directory (and all subdirectories) changes:
$ watchexec -r -e py -- python server.py
More usage examples: in the CLI README!
cargo binstall watchexec-cli
cargo install --locked watchexec-cli
All options in detail: in the CLI README,
in the online help (watchexec -h
, watchexec --help
, or watchexec --manual
),
and in the manual page.
Watchexec pairs well with:
make
Selected downstreams of watchexec and associated crates: