A simple tool for forwarding file system notifications from one host to another, possibly remapping the path in the process. Useful when running a reloading build system on one machine and editing files on another, or over shared folders to a VM.
Supports Linux/inotify and Mac OS X/fsevents on the host side, and Linux, Mac OS X, and BSD on the client side.
Either use one of the pre-built binary releases for your operating system:
- Mac OS X 10.10 or newer, 64 bit: notify-forwarder_osx_x64
- Linux 64 bit: notify-forwarder_linux_x64
- FreeBSD 64 bit: notify-forwarder_freebsd_x64
Or download the source and compile it yourself:
$ git clone [email protected]:mhallin/notify-forwarder.git
$ make
# Now you have the binary at _build/notify-forwarder
To map the current directory to "/home/user/project" on a remote machine, run the following on the host side:
$ notify-forwarder watch -c <remote-ip> . /home/user/project
# This maps the current directory "." to "/home/user/project". Add more pairs of paths
# to watch more folders with different mappings.
And on the client side:
$ notify-forwarder receive
The "host side" here being the file system that will send events, i.e. where you run the text editor. The "client side" is where the auto reloading build system runs.