brew install unison
sudo pip install macfsevents
curl https://raw.githubusercontent.com/jumpstarter-io/unox/master/unox.py |sudo tee /usr/local/bin/unison-fsmonitor >/dev/null
sudo chmod +x /usr/local/bin/unison-fsmonitor
BOXENITE_SERVER=boxenite.lefant.net
BOXENITE_SERVER_USER=lefant
# copy your local ~/.ssh/id_rsa.pub to ~/.authorized_keys on the server
# using ssh-copy-id for convenience:
brew install ssh-copy-id
ssh-copy-id $BOXENITE_SERVER_USER@$BOXENITE_SERVER
cat <<EOF >~/.unison/boxenite.prf
root = $HOME/boxenite
root = ssh://$BOXENITE_SERVER_USER@$BOXENITE_SERVER//home/$BOXENITE_SERVER_USER/boxenite
logfile = $HOME/.unison/unison.log
auto = true
batch = true
prefer = newer
repeat = watch
copyonconflict = true
sshargs = -q -o VisualHostKey=no -C
retry = 1
#debug = all
EOF
you should now be able to run the following command which will spin up unison and keep it running, watching for file changes locally or remotely and syncing them to the other end
unison boxenite
what version of unison is needed to run instant sync ?