edgesync
A NATS-native sync engine for Fossil SCM repositories. Mesh topology. Optional iroh tunneling. Bidirectional messaging built in.
| Project | edgesync — NATS-native Fossil sync engine |
| Language | Go (modules github.com/danmestas/EdgeSync/{leaf,bridge}) |
| Built on | libfossil · NATS embedded · iroh (optional) |
| Binaries | 3 (edgesync · leaf · bridge) |
| Status | v0.0.0-dev · alpha · pre-release · wire protocol stable, CLI may shift |
Install install
$ go install github.com/danmestas/EdgeSync/cmd/edgesync@latest $ edgesync doctor
One static binary, no CGo. The doctor subcommand checks your environment (Go version, SQLite driver, NATS reachability) and prints a clean report.
What it is overview
EdgeSync is a sync engine for Fossil SCM repositories that swaps Fossil's HTTP-based /xfer protocol for NATS messaging. The leaf agent reads and writes .fossil SQLite files via the libfossil library, and exchanges blobs with peer agents over an embedded NATS mesh.
There is no central server in the default topology — each agent runs its own NATS server in-process, and gossip happens leaf-to-leaf. An optional bridge process translates between NATS and HTTP /xfer for talking to unmodified upstream Fossil servers.
- Mesh-first sync. Every leaf is both client and server. Add a peer with one CLI flag.
- libfossil under the hood.
.fossilfiles stay readable by the upstreamfossilbinary — nothing proprietary in the storage format. - Optional iroh tunneling. Two leaves behind separate NATs find each other over QUIC. No port forwarding, no relay infrastructure to operate.
- Notify channel. A separate, project-scoped pub-sub for human-in-the-loop messaging. Pair a phone with a QR code, get push alerts on commits, deploys, or agent questions.
Why you might want it why
Three shapes of problem where EdgeSync is the right tool.
You're running many small Fossil repos across edge devices. Robotics fleets, retail kiosks, CDN nodes, on-prem appliances — anywhere the topology is "many small sites, intermittent connectivity, no central server." EdgeSync's mesh-first design means a new device pairs with one peer and converges with the rest of the fleet from there.
You need bidirectional messaging alongside repo sync. Most version-control stacks bolt chat or notifications on as a separate service. EdgeSync ships notify as a first-class channel using the same NATS mesh: an agent commits and the human's phone gets a push, the human replies and the agent acts on it.
You want zero infrastructure. Embedded NATS server + iroh transport = no broker to operate, no central server to scale, no CDN to point clients at. Two laptops on a coffee-shop wifi can sync to each other directly.
How it fits together architecture
The leaf agent embeds libfossil (Fossil repo I/O), a full NATS server (peer/hub/leaf role configurable), and the notify pub-sub. Mesh column lists the three transport options — pick any combination per agent. Persistence is always a regular .fossil SQLite file readable by the upstream fossil binary.
Compared to neighbors comparison
| EdgeSync | upstream fossil server | git + chat stack | |
|---|---|---|---|
| Topology | mesh (peer/hub/leaf) | client/server | client/server |
| NAT traversal | iroh QUIC (built-in) | none | depends on host |
| Bidir messaging | notify (built-in) | forum/wiki (in-repo) | separate service |
| Storage format | .fossil (compatible) | .fossil | .git |
| Static binary | yes | yes | varies |
| Runtime deps | none | none | varies |
| API stability | alpha | stable | stable |
EdgeSync is not a Fossil replacement — it reuses the .fossil format and the /xfer wire protocol via libfossil. The comparison above is about operating shape, not feature parity with the upstream Fossil server (which still wins on web UI, wiki, forum, tickets).
What it is not limits
Not a Fossil replacement. EdgeSync moves .fossil blobs around. The format and protocol come from the upstream Fossil project; EdgeSync just changes the envelope. Run the upstream fossil binary alongside if you need the web UI, wiki, forum, or ticket system.
Alpha. The wire protocol (Fossil /xfer cards) is stable, but EdgeSync's CLI flags, agent config schema, and notify message shape may change before v1.
Not a database sync engine. EdgeSync replicates .fossil repositories, not arbitrary SQLite databases. If you want general SQLite replication, look at Litestream or LiteFS.
No web UI yet. The leaf agent serves /xfer for sync but does not render HTML. Use upstream fossil bound to a local repo if you need a UI.
Get going start
$ go install github.com/danmestas/EdgeSync/cmd/edgesync@latest $ edgesync new my-project.fossil # create a repo $ edgesync sync start --repo my-project.fossil --serve-http :9000 $ edgesync notify init --project my-project # enable messaging
Walkthrough: /docs/quickstart · Concepts: /docs/concepts · Architecture: /docs/architecture · Deployment: /docs/deployment · Notify: /docs/notify · Source: github.com/danmestas/EdgeSync.