Skip to content
Latchkey

entr: Usage, Options & Common CI Errors

entr runs an arbitrary command whenever files listed on stdin change.

entr is the minimalist file-watcher: pipe a list of files into it and it re-runs your command on change. Like all watchers it must not be left running in a pipeline, and it has a specific stdin contract.

What it does

entr reads a list of filenames from stdin (typically from find or ls) and executes a command each time any of those files change. It is tiny, dependency-free, and a common BSD/Linux dev-loop primitive.

Common usage

Terminal
ls *.c | entr make
find src -name '*.go' | entr -r go run .
echo file.md | entr -c pandoc file.md -o out.html
find . -name '*.py' | entr -d pytest           # -d: exit if a dir changes
ls *.js | entr -p eslint /_                      # /_ = the changed file

Options

FlagWhat it does
-rReload: restart a persistent process on change
-cClear the screen before each run
-dTrack directories; exit if a new file appears
-pPostpone: do not run until the first change
-sEvaluate the command via the shell
/_Placeholder for the file that changed

Common errors in CI

"entr: No regular files to watch" means stdin was empty - the find/ls produced nothing (wrong glob or path). entr requires actual files on stdin; piping a directory name will not work. Like watchexec, entr blocks and waits for changes, so it hangs a CI step until timeout. It belongs in local dev, not pipelines. On Linux it can hit the inotify watch limit with large trees ("inotify_add_watch ... No space left on device"); raise fs.inotify.max_user_watches.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →