3 homepage: https://github.com/watchexec/watchexec
5 watchexec is a simple, standalone tool that watches a path and runs a command whenever it detects modifications.
8 ### Updating `watchexec`
10 `webi watchexec@stable`
12 Use the `@beta` tag for pre-releases.
16 Watch all JavaScript, CSS and HTML files in the current directory and all
17 subdirectories for changes, running `make` when a change is detected:
19 $ watchexec --exts js,css,html make
21 Call `make test` when any file changes in this directory/subdirectory, except
22 for everything below `target`:
24 $ watchexec -i target make test
26 Call `ls -la` when any file changes in this directory/subdirectory:
30 Call/restart `python server.py` when any Python file in the current directory
31 (and all subdirectories) changes:
33 $ watchexec -e py -r python server.py
35 Call/restart `my_server` when any file in the current directory (and all
36 subdirectories) changes, sending `SIGKILL` to stop the child process:
38 $ watchexec -r -s SIGKILL my_server
40 Send a SIGHUP to the child process upon changes (Note: with using
41 `-n | --no-shell` here, we're executing `my_server` directly, instead of
42 wrapping it in a shell:
44 $ watchexec -n -s SIGHUP my_server
46 Run `make` when any file changes, using the `.gitignore` file in the current
51 Run `make` when any file in `lib` or `src` changes:
53 $ watchexec -w lib -w src make
55 Run `bundle install` when the `Gemfile` changes:
57 $ watchexec -w Gemfile bundle install