Skip to content
entr
Hidden Gem

Curated by Surfaced Editorial·Developer·2 min read
Share:

entr is a simple, open-source command-line tool developed by Russell Stewart that runs arbitrary commands when files change. Its core feature is monitoring specified files or directories for modifications and then automatically executing a command, providing a seamless feedback loop for development workflows. It was designed for developers, system administrators, and anyone who needs to recompile code, rerun tests, or refresh a local server upon file saving. Users typically pipe a list of files to entr, which then watches them and executes a given command, like `ls *.js | entr node server.js`. It is a standalone utility that works across Unix-like systems, including Linux and macOS.

Why It’s Useful

entr provides a minimalist, Unix-philosophy approach to file watching and command execution, often being more flexible and resource-efficient than larger build systems or IDE-specific watchers. For the frontend developer building a static site, entr can automatically recompile CSS or JavaScript and refresh their browser when source files are saved, streamlining the development cycle. A backend engineer writing tests can use entr to automatically rerun unit tests whenever a source code file or test file is modified, providing immediate feedback on changes. entr is completely free and open-source. A powerful but often overlooked feature is its ability to handle signals, allowing graceful restarts of long-running processes like servers without manual intervention. Its simplicity and focus on doing one thing well mean it's often overshadowed by more comprehensive build tools or frameworks that include similar functionality, leading to less standalone awareness. It has a stable codebase, a dedicated maintainer, and is a beloved tool within its niche.

Enjoyed this? Get five picks like this every morning.

Free daily newsletter — zero spam, unsubscribe anytime.