entr
TLDR
Run command when file changes
SYNOPSIS
entr [options] command [args...]
DESCRIPTION
entr runs commands when files change. It watches files listed on stdin and executes the specified command whenever any change is detected.
The tool is ideal for development workflows: rerunning tests, rebuilding projects, or restarting servers on source changes. The -r flag handles processes that need restart rather than re-execution.
entr uses efficient kernel file notification mechanisms (kqueue, inotify) rather than polling.
PARAMETERS
COMMAND
Command to run when files change.-c
Clear screen before running.-r
Restart persistent process.-p
Postpone first execution.-s
Execute with shell.-d
Track directories for new files.-z
Exit on process completion./_
Placeholder for changed file.
CAVEATS
File list is fixed at startup (use -d for new files). stdin must list files. Some editors may not trigger events properly. Maximum file count limited by system.
HISTORY
entr was created by Eric Radman as a simple, Unix-philosophy tool for file watching. It focuses on doing one thing well: running commands when files change.
SEE ALSO
inotifywait(1), watchexec(1), fswatch(1)


