Auto-rerun With entr
Feed entr a file list and it reruns your command on every change.
Run ls *.py | entr -c python3 app.py to restart the app when a Python file changes.
01Command
Command
$ ls *.py | entr -c python3 app.py02What it does
entr is a tiny Unix utility that waits for file changes on standard input and runs the given command. The -c flag clears the screen between runs, -d exits when a new file is added, and -r restarts a long-running process.
03Risk
!Warning: It only watches files you list, so new files are not picked up unless you use a shell glob that is re-evaluated or -d.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Homebrew formula: entrEvidence: Packages entr, which runs a command when the piped files change.
Last verified: 2026-09-22 · Category: Developer