watchexec

CLI

Executes commands in response to file modifications.

0 views

Installation

Homebrewbrew install watchexec
Cargocargo install watchexec-cli

Links

License

Apache-2.0

AI Agent Notes

Re-run commands automatically when files change

When to use

Auto-restarting dev servers or rebuilding on file save

Examples
  • watchexec -r -- cargo run
  • watchexec -e ts -- pnpm build

Proven Recipes

Restart server on file change🟢 97% success
watchexec -r -- node server.js
Run build on TypeScript change🟢 96% success
watchexec -e ts -- pnpm build
Watch specific directory only🟢 97% success
watchexec -w src/ -- pnpm test