CommandCross-platform
Phantom Watch
Watch Files and Re-run Command on Change
Automatically re-runs a command whenever specified files change. Useful for running tests, rebuilding assets, or restarting servers during development.
find . -name "*.js" | entr -c npm testUsage Notes
- •
-cclears the screen before each run - •
-rrestarts long-running processes (servers, watchers) - •
-suses shell to interpret the command - •Pipe any file list to entr; combine with
find,git ls-files, orfd - •Install with
brew install entr(Mac) orapt install entr(Linux)
Warnings
None
Related Scroll Ideas
- • Watch and rebuild TypeScript on change
- • Restart Node server on file modification
- • Run linter automatically on save