Watchexec File Watcher
github.com
2
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Watchexec is a free and open-source command-line tool that watches files and directories for changes and executes a command in response. Created by Matt Green (greenfork) and maintained since 2017, Watchexec is written in Rust and designed for development workflows that require automatic rebuilding or reloading when files change. Key features: file watching: monitors files for create, write, remove, rename, chmod events using platform-native APIs (inotify on Linux, kqueue on BSD/macOS, ReadDirectoryChangesW on Windows, FSEvents on macOS), providing near-instant notification without polling. Path filtering: specify watch paths (-w), file extensions (-e), and ignore patterns (-i). For example, watchexec -w src -e rs watches only Rust files in src. Command execution: the command to run follows as arguments (watchexec cargo build). Shell commands with pipes, redirection, and environment variables are supported. Debouncing: configurable delay (default 100ms) prevents multiple runs from rapid changes. Restart mode (-r): kills and restarts the command if still running, ideal for long-running processes like servers. Clear screen (-c): clears terminal before each run. Signal handling: sends configurable signals (default SIGTERM) for graceful shutdown. Cross-platform. Rust. Apache-2.0.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike