Run arbitrary commands when files change
entr is a utility for running arbitrary commands when files change, designed to facilitate rapid feedback during development. Unlike polling-based solutions, entr uses efficient system-level file monitoring mechanisms like kqueue(2) on BSD/macOS and inotify(7) on Linux to detect changes without consuming unnecessary resources.
The tool excels at automating repetitive development tasks such as rebuilding projects, restarting servers, or running tests whenever source files are modified. It supports various modes including clearing the screen before execution, restarting long-running processes, and terminating when child processes exit. entr can monitor files passed via stdin, making it easy to integrate with commands like find and ls.
entr is particularly valuable for developers who want to streamline their workflow with automatic rebuilds, live reloading, and continuous testing. Its lightweight design and cross-platform support make it suitable for everything from simple script execution to complex build automation in professional development environments.
# via Source
./configure && make test && make install