fabric experimental
Shell, sync and files
fabric has a few services of its own. They all ride the same trusted, resumable transport as expose and dial, and each is off for a peer until you grant it.
Remote shell and exec
fabric shell machine-b
fabric shell gives you a real interactive terminal on the peer, like ssh -t, so job control and full-screen programs work. It rides a resumable tunnel: a network blip, a roaming laptop or a short outage reconnects you to the same remote shell instead of killing it. A longer outage, past a window of 15 minutes by default, ends the session.
For a shell that stays put however long you're away, attach to a pty session over fabric instead.
fabric exec machine-b -- <command> runs a single command with piped input and output, and no terminal.
Both need an opt-in for the whole daemon on the target machine, on top of the peer's grant.
Folder sync
A sync entry ties a logical name to a local folder on each machine. The daemon watches the folder and converges it with trusted peers.
[[sync]]
name = "notes" # the same name on every machine
folder = "/abs/path/to/notes" # can differ on each machine
peers = "*"
- Conflicts are settled by logical versions, never by file times, which aren't reliable across machines.
- Deletes propagate as tombstones that are kept, so a deleted file can't quietly come back.
- It syncs what git tracks: file content and the executable bit. Symlinks and permission-only changes don't sync.
Anything that appears in a synced folder is synced as a real file, so stage temporary files somewhere else.
Sending a file
fabric send-file delivers one file to a peer, in one direction, like scp. The receiver decides where it lands: everything arrives in a per-sender inbox on the receiving machine, and the sender can't write anywhere else.
Coming
Git remotes over fabric, to clone and push between machines with the same trust and grants, are in progress.