clync
Encrypted sync for Claude Code across machines.

What it does
Claude Code stores conversations, memories, settings, commands, and skills locally in ~/.claude/. clync encrypts all of it with age and syncs it to a storage backend of your choice. When the same session is edited on two machines, clync merges them using the conversation's UUID tree structure instead of overwriting.
Great for backup, and for people using more than one machine.
Features
| Feature | Description |
|---|---|
| Multi-backend | Git (default), local folder (NAS/Dropbox/USB), or S3-compatible cloud storage |
| Encryption | age-based encryption with key management options |
| Smart merge | UUID tree merge for diverged conversations |
| Full sync | Sessions, memories, settings, commands, skills, CLAUDE.md |
| Parallel | rayon-based parallel encrypt/decrypt |
| MCP server | 8 tools for Claude Code integration |
| Multi-machine | join command for second machine setup (git) |
| Key management | Local key file, passphrase, 1Password, Bitwarden, pass, or none |
| Git LFS | Auto-tracks session files over 99 MB with git-lfs |
Install
With S3 support:
Or from source:
Quick start
First machine
The interactive setup walks you through:
- Sync repo path
- Encryption method (key file, passphrase, 1Password, Bitwarden, pass, or none)
- What to sync (everything by default)
- Git remote (can create a private GitHub repo via
ghcli) - First push
Or non-interactive for scripting:
# Git backend with 1Password
# Local folder (NAS, Dropbox, USB drive)
# No encryption (use a private repo)
Second machine
# SSH
# or HTTPS
This clones the repo, reads clync.toml to detect the encryption method, asks for the key, and pulls all sessions.
Sync
Commands
| Command | Description |
|---|---|
init |
Interactive setup (or flag-driven) |
join <url> |
Set up on a new machine from existing repo |
push |
Encrypt and push changes |
pull |
Pull and smart-merge |
sync |
Pull then push |
status |
Show diff between local and remote |
list [query] |
Search sessions by project, UUID, or content |
log |
Show sync history (machine, operation, counts) |
config |
show, edit, path, set key value |
mcp |
Run as stdio MCP server |
Merge
When both machines edit the same session, clync merges using the conversation structure:
- Each message has a UUID and parent UUID forming a tree
- Messages unique to one side are included
- Same UUID with different content: newer timestamp wins
- Non-UUID entries (metadata) are deduplicated
No data is lost. Both machines' messages are preserved.
Encryption
Six modes, pick during clync init:
| Mode | Key source | Dependencies |
|---|---|---|
| Key file | ~/.config/clync/key.txt |
None |
| Passphrase | Environment variable | None |
| 1Password | op read "op://..." |
op CLI |
| Bitwarden | bw get |
bw CLI |
| pass | pass show |
pass |
| None | No encryption | Use private repo |
The age secret key is never stored in the sync repo. With password managers, the key syncs automatically across machines.
Storage backends
Git (default)
Syncs through a git repo with optional remote. Supports LFS for large sessions.
[]
= "git"
= "~/.clync/data"
= true
= 103809024 # 99MB, 0 to disable
Folder
Syncs to any local or network-mounted path. No git needed.
[]
= "folder"
= "/mnt/nas/clync-data"
S3 (requires --features s3)
Syncs to any S3-compatible service: AWS, Cloudflare R2, MinIO, DigitalOcean Spaces, Backblaze B2.
[]
= "s3"
= "my-clync-bucket"
= "eu-west-1"
= "clync/"
= "https://my-minio.example.com" # omit for AWS
Credentials from environment (AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY) or config (access_key/secret_key).
Note: S3 has no native locking. If multiple machines sync concurrently, writes can conflict. Use git or folder backends for multi-machine setups, or coordinate S3 access externally.
Configuration
Config lives at ~/.config/clync/config.toml:
[]
= "~/.claude"
[]
= "git"
= "~/.clync/data"
= true
[]
= "onepassword"
= "op://Personal/clync/age-secret-key"
[]
= true
= true
= true
= true
= true
= true
The sync repo also contains a plaintext clync.toml with the encryption method and targets, so clync join knows what to expect.
MCP server
Add to your Claude Code MCP config:
Tools: list_sessions, session_detail, sync_status, sync_push, sync_pull, sync_log, config_show, help
Sync repo structure
clync.toml # plaintext metadata (encryption method, targets)
README.md # auto-generated
manifest.json.age # encrypted session index (or .json if unencrypted)
sync.log.jsonl # plaintext sync history
sessions/
<uuid>.jsonl.age # encrypted session files
extras/
settings.json.age # encrypted settings
CLAUDE.md.age # encrypted global instructions
commands/ # encrypted custom commands
skills/ # encrypted custom skills
memories/
<project>/ # encrypted project memories (normalized paths)
Contributing
See CONTRIBUTING.md for development setup, changeset workflow, and project structure.
License
MIT