wx is a small and efficient file watcher that hot reloads the provided executable when files in a given directory change.
- Watches directories recursively for file changes
- Respects
.gitignorerules to avoid irrelevant files - Uses an alternate screen buffer for clean command output
- Automatically restarts commands when file changes are detected
- Zig Built on 0.14.0 not tested on earlier versions and will try to track future zig versions.
git clone https://github.com/robertazzopardi/wx.git
cd wx
zig build -Doptimize=ReleaseSafeThe executable will be available at zig-out/bin/wx
Use install --prefix to install the binary to a specific location.
zig build install -Doptimize=ReleaseSafe -p ~/.localwx <command> [args...]Watch and run your Zig application:
wx zig build runWatch and run tests:
wx zig test src/main.zigWatch and build:
wx zig buildThere are many out there, but none of the ones that I tried did exactly what I wanted. I found that hot reloading tui applications did not work quite right in other similar project which might have been a skill issue but here we are.
Contributions are welcome! Feel free to open issues or submit pull requests. See CONTRIBUTING.md.