- JavaScript 82.2%
- C# 8.3%
- Swift 7.4%
- Shell 1.5%
- PowerShell 0.6%
Stored-pin url/title/image convergence, dup-gid push-gate, apply-failure tolerance + quarantine + forward-compat pass-through, theme install-register fix, diagnostics + read-only Review surfaces, seq-cap push guard. extract-4 / sync-4 / apply-host-9 / sanitize-3. Payload: signed v23. |
||
|---|---|---|
| installer | ||
| mod | ||
| test | ||
| .gitignore | ||
| INSTALL.md | ||
| KEY-MANAGEMENT.md | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
zen-sync
Sync the configured structure of a Zen Browser profile across your own machines -- workspaces, sidebar folders, pinned sites, essentials, containers, and Zen mod themes. Ephemeral browsing state (loose tabs, history, scroll positions) is intentionally not synced; it stays local to each machine.
No Mozilla account, no Firefox Sync, no third-party service required. Your machines exchange state through a git repository you control, and the synced snapshots can be client-side encrypted so the transport host never sees your data in the clear.
NOTE: This project was highly vibe-coded with Claude Opus 4.8; I'm a security guy, not a software developer. Drop me a line if you see anything wrong or improvements I should make.
How it works
zen-sync 4.0 has two parts:
- The mod (
mod/) -- a privileged-JS modification that runs inside Zen. It reads and writes your profile structure in-process via Zen's live session model (no offline file surgery, no quitting the browser to apply changes), encrypts each snapshot, and pushes/pulls it over git. - The deployer (
installer/) -- a small, audited installer that verifies a signed payload, refuses downgrades, takes a separate "disable the script sandbox" consent, and lays the verified mod into your Zen profile. A reference CLI plus native GUI deployers for Windows, macOS, and Linux.
Transport is any git host you control: GitHub, GitLab, a self-hosted Forgejo/Gitea, or a plain remote. Point it at a private repo for your own data.
The model in one paragraph
Each machine extracts its Zen structure into a normalized snapshot, three-way-merges it
against the shared git trunk (base = last-seen trunk, local = live profile, remote =
trunk tip), applies the merged result back into the live browser, then pushes. Stable
synced identities (gid/cid) survive across machines while per-host local id maps stay
local and unsynced. Snapshots are sealed with authenticated encryption (XChaCha20-Poly1305)
under a symmetric key you hold and distribute out-of-band -- the host stores only
ciphertext.
Repository layout
mod/ the in-Zen privileged-JS mod
src/ the mod itself: crypto, transport, extract, merge, apply, sync, ui/, state
loader/ the AutoConfig bootstrap (config.js + config-prefs.js)
vendor/ pinned, vendored deps (@noble/*, isomorphic-git) -- no bundler at runtime
installer/ the deployer (verify a signed payload, then lay it into Zen)
src/ the trust core + CLI: verify, install, sign, zsi, provenance, cli
windows/ .NET 8 WinForms native deployer (source)
macos/ Swift native deployer (source)
linux/ Node single-binary / script deployer (source)
test/ the mod's smoke suite (pure node, no deps): smoke.mjs + suites/ + fakes
README.md this file
INSTALL.md build + install + first-run setup
KEY-MANAGEMENT.md the two key systems (content encryption + payload signing)
SECURITY.md threat model, reporting
LICENSE MIT
Getting started
See INSTALL.md for the full build, install, and first-run-setup path, and KEY-MANAGEMENT.md for how the encryption keyring and the payload-signing keypair work.
Status
4.0 is a ground-up redesign. Earlier 1.x-3.x releases used a different model (a Python tool over a shared cloud folder) and are not part of this repository.