Announcing jj-musubi: live sync for Jujutsu

34 points by Picnoir 14 hours ago on lobsters | 22 comments

stringy | 9 hours ago

This may be the thing that pushes me to switch to jj. I am already convinced the model is better, the command-line is more orthogonal, etc. but I just haven't made the time to actually switch.

If it can obviate the dance of pushing and pulling temporary refs to keep work in sync when moving machines, that would free up a whole corner of my brain that has to actively think about this while working.

I hope you’ll find it useful! I just added (but have not yet released) live snapshot support. The idea here is that when something writes to your working copy (e.g. your editor or an agent), its work is snapshotted and shared within seconds without you needing to run any extra commands.

It is possible to even have the working copies of other machines updated when that happens, if they have the same change checked out, but I’ve found that to be more aggravating than beneficial because it turns conflicting edits from “I’ll deal with it when I’m ready” into “I must deal with this now”.

sebastien | 6 hours ago

Nitpick: why is the musubi-hub not a dotfile or in .local/share or .local/var, I find it really poor experience when tools consider putting their stuff in plain sight of $HOME. Hopefully this can be configured, but outside of that this feels like a step change.

You can indeed tell the hub to store data wherever you'd like:

musubi hub --dir /path/to/hub

I just committed a change that adds a config option for this, because I'd overlooked it, and your comment brought that to my attention.

I'll see about using $XDG_HOME too. Thanks!

altano | 6 hours ago

The more I read the blog post the more incredible this sounds. How do I upvote twice? I’m going to start using it right away.

“I miss commit cloud sync when I used to work at Meta. I wonder if this works well and isn’t just hacked together? Oh Bryan worked on those features? Oh here’s the section on correctness and Lean verification. Okay fine.”

“I wonder if this would be good for syncing commits back from ephemeral vms? Oh here’s the section on that.”

Are you reading my mind?

yshui | 9 hours ago

Does it also sync the whole op log?

sunshowers | 7 hours ago

(I've been an early tester for jj-musubi and just contributed illumos support to it. I've been happily using it for the last few days across Linux and illumos, including to develop the illumos support for it.)

Yes, it does. It's based around the op log, in fact. It has the same semantics as a second jj workspace, just on a different machine.

yshui | 6 hours ago

I was hoping that's how it's implemented! This sounds really cool.

evmar | 8 hours ago

Is there some discussion about why the sync happens at the level of op log and not commit log? Not saying one is better, more curious about the relative tradeoffs and I'm sure the author has thought about this more than I have!

pushcx | 2 hours ago

I've tried it. Resolving divergent commits is the same task as resolving merge conflicts. You get them prolifically if you're working on a branch in two repos.

The purpose is to allow all operations to be synced/shared live. Snapshots (live edits to your working copy), rebases, undo, and so on, so that you get the full equivalent of a jj workspace on another machine. Just syncing commits alone would lose > 90% of that functionality.

yshui | 6 hours ago

I would guess it's just easier to do it this way (and it's arguable that syncing op log is what a user would want anyway). because otherwise you are open yourself to things like conflict resolution, etc.

maxdeviant | 7 hours ago

This looks very cool! I'll have to give it a try.

mshroyer | an hour ago

Fantastic, I've also longed for an equivalent to Commit Cloud while working on my own personal jj-based project across multiple machines. Can't wait to try this out.

offby1 | 6 hours ago

Some of the docs seem to imply that the hub machine runs ssh in some fashion, is that accurate?

You use ssh to talk to it.

offby1 | 5 hours ago

My concern is that my employer quite strictly does not allow me to run ssh servers on my developer laptop. Does that preclude my using my laptop as a hub for various github codespaces I'd like to use to join it?

My mental model has been that you'd want to use something other than a laptop to run the hub (since your laptop is presumably asleep or disconnected a lot of the time), and connect to it from your laptop. Could that work for you?

offby1 | 5 hours ago

Sadly no; GitHub (the paycheck provider) really emphasizes laptop + codespace, with codespaces being very ephemeral and single-purpose. The laptop is the closest I have to a durable hub concept.

Oh, and since you're a GitHub employee, you might find this useful: https://www.serpentine.com/posts/2026/announcing-jj-stack/

offby1 | 5 hours ago

OMG

If there's some other ... concept, doodad, I don't quite know the term ... that might work for you instead, let me know. The wire protocol isn't tied to ssh at all, it just uses ssh for transport. All you need is a machine that hosts the hub process, a filesystem it can write to, and a way to talk to it.