entr
$ entr Community Med Riskentr is a lightweight POSIX utility that reads newline-delimited file paths from stdin and executes a target command whenever those files are modified. Flags like -z (exit after command finishes) and -p (postpone initial run) make one-shot wait-and-run workflows clean for scripts, though output depends on the wrapped command and has no --json mode.
brew install entr Kernel kqueue/inotify file watching via entr runs locally with near-zero latency and requires no MCP server.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports scriptable stdin file lists and -pz one-shot completion, but blocks indefinitely by default and emits no --json events.
- Reads file paths cleanly from stdin
- One-shot
-pzexits cleanly; default mode loops forever
Uses OS-native kqueue/inotify without network access, though it executes whatever command arguments are supplied on change.
- No credentials or network; safety depends on the wrapped command
Widely packaged on macOS (brew install entr), Linux, and BSDs, but lacks native Windows support.
- POSIX-only (macOS, Linux, BSD); no native Windows build
Minimal overhead and composes cleanly with fd or git ls-files for focused rebuild/test loops.
- Composable Unix-pipe design
Stable, mature C codebase maintained steadily by its original author.
- Long-running upstream repository by Eric Radman
Concise entr(1) man page and project page clearly document -p, -z, -r, and -d flags.
- Clear man page and examples on eradman.com
Security, Auth & Guardrails
None required; operates purely on local filesystem descriptors.
100% free, offline, and open-source (ISC).
# entr Agent Rules - Always pass `-pz` (postpone + exit after command) or wrap with a timeout so `entr` does not block forever. - Avoid `-c` (clear screen) in non-TTY logs and only wrap side-effect-safe commands.
Agent-Ready Command Recipes
Safe Read-Only Queries
fd -e py | entr -pz pytest -q
Waits for a single modification (-p) among Python files, runs pytest -q, and exits (-z) without looping indefinitely.
find src -name '*.ts' | entr -d echo 'File list or contents changed'
Monitors tracked files and exits if new files are added (-d) so callers can refresh the watched file list.
Strengths for Agents
- + Tiny C binary that pairs seamlessly with
fdorgit ls-filesover stdin. - +
-pzflags allow deterministic wait-for-next-change automation without infinite blocking.
Caveats & Pitfalls
- ! Blocks indefinitely unless
-zor an external timeout is used. - ! No
--jsonoutput and no native Windows support.