A utility for running arbitrary commands when files change using kqueue or inotify without polling.
entr is a command-line utility that monitors files for changes and automatically runs arbitrary commands when modifications are detected. It uses system-level APIs like kqueue or inotify to avoid polling, making it efficient for development tasks like auto-reloading servers, rebuilding projects, or running tests. The tool is designed to provide rapid feedback directly in the terminal without manual intervention.
Developers and system administrators working in Unix-like environments (BSD, Linux, Mac OS) who need automated file change responses for tasks like testing, building, or server reloading. It's particularly useful for command-line-centric workflows where immediate feedback is valuable.
entr offers a lightweight, native alternative to polling-based file watchers by leveraging OS-specific monitoring APIs for better performance and lower resource usage. Its simplicity, cross-platform support (with workarounds for Docker/WSL), and ability to run any shell command make it a versatile tool for automation without complex configuration.
Run arbitrary commands when files change
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses kqueue on BSD/Mac OS and inotify on Linux to avoid polling, reducing CPU usage and providing instant feedback, as emphasized in the README's focus on system-level APIs.
Can run any shell command or script, making it versatile for tasks like building projects or running tests, demonstrated in examples such as 'make | head -n 20'.
The -r flag allows automatic restarting of processes like Node.js servers, ideal for development workflows, shown in the example 'ls *.js | entr -r node app.js'.
With the -d flag, entr can monitor entire directories and respond to new or deleted files, useful for dynamic project structures without manual updates.
Incomplete inotify support in Docker and WSL requires setting the ENTR_INOTIFY_WORKAROUND environment variable, adding complexity and potential unreliability in cross-platform setups.
Does not follow symlinks by default; users must explicitly set ENTR_FOLLOW_SYMLINK, which can be inconvenient for projects relying on symbolic links for organization.
Lacks advanced features like command retries, persistent logging, or structured output, making it less suitable for production automation or complex debugging scenarios.