I don’t think it’s as magical as whatever nb is up to, but for wandering from machine to machine and not getting too out of control with it, git-auto-sync seems to do an okay job of periodically syncing up with a remote behind your back. When you target a directory with it, it creates a launchd agent, so the syncing daemon persists over reboots, etc.
I got it from Homebrew, and discovered one issue with it, which is that the agent it sets up wants to log to /usr/local/var/log
, which is locked down in at least recent versions of macOS (and ignores /opt/homebrew/var/log
, which is already correctly permissioned, so now I’m wondering if I have the wherewithal to submit a patch somewhere). So you can either make that directory and set the right permissions, or twiddle the launch agent.
So if one wanted to use something like cielagonote with Gollum and didn’t care for nb as an intermediary, this might be a way to go.
In addition to the daemon, you can also manually fire off a sync, so I can see making a little script for Alfred or RayCast that does a sync before stepping away from a machine.
In the process of debugging the log issue I discovered LaunchControl, which does a lot to make launchd a little more legible with a mildly busy but helpful GUI.
Through this I learned that launchd
is pretty irritable with jobs it considers “inefficient” for reasons I am not completely clear on, so I saw watching the Homebrew emacs-plus
service failing/starting/failing/starting over and over. From the point of view of someone who is just launching emacsclient -c --no-wait
from RayCast, there is nothing untoward going on: It launches in an eyeblink. I did a little reading about what the throttling/inefficiency issue might be, but we’re rapidly getting into the ineffable wisdom/hatred of experts that informs the macOS ecosystem and I think I’m gonna just close that window and pretend it’s fine.
Us: “It’s a UNIX system! I know this!”
Apple: “Whatever, kid.”