Skip to main content
Introducing claude-sync: Sync Claude Code Across All Your Machines

Introducing claude-sync: Sync Claude Code Across All Your Machines

Feb 8, 2026

Ive been using Claude Code daily for months now. Its become essential to how I work. But theres been one annoying problem - I have three laptops and my Claude sessions dont sync between them.

Started a conversation on my work MacBook. Continued it at home. Next day Im on my personal laptop and... nothing. Had to start fresh. All that context, gone.

So I built claude-sync. My first open source developer tool.

The Problem

Claude Code stores everything locally in ~/.claude/. Thats great for privacy, terrible for anyone with multiple devices.

Every device is an island. Your carefully crafted prompts, custom agents, project context - all stuck on one machine.

What claude-sync Does

Two commands. Thats it.

# On your main machine
claude-sync push

# On any other machine
claude-sync pull

Everything syncs:

  • Session files and conversation history
  • Auto-memories (what Claude remembers about you)
  • Custom agents, skills, and plugins
  • Settings and global instructions (CLAUDE.md)
  • Command history

End-to-End Encryption

Your Claude data is personal. I wasnt about to upload unencrypted files to the cloud.

Everything gets encrypted locally using age before it ever leaves your machine. The encryption key lives only on your devices. Not in the cloud. Not anywhere else.

Even if someone got access to your storage bucket, theyd see meaningless encrypted data.

The Easy Part: Passphrase Mode

Heres the thing - copying encryption keys between machines is annoying. So I added passphrase mode.

Same passphrase on any device = same encryption key. No file copying needed.

# First device
claude-sync init
# Choose "Passphrase" when prompted
# Enter a memorable passphrase

# Second device
claude-sync init --passphrase
# Enter the SAME passphrase
# Done. Keys match automatically.

The passphrase gets run through Argon2id (memory-hard, GPU-resistant) to derive the encryption key. Its deterministic - same input, same output, every time.

If youre paranoid (respect), you can still use random key generation and manually copy the key file. But for most people, passphrase mode is the way to go.

Why Cloudflare R2?

Three reasons:

  1. Free tier is generous - 10GB storage included
  2. S3-compatible - Well-documented, reliable API
  3. No egress fees - Pull as much as you want, zero cost

My Claude sessions use maybe 25MB total. This is effectively free forever.

Getting Started

Install

go install github.com/tawanorg/claude-sync/cmd/claude-sync@latest

First Time Setup

Run init and follow the prompts:

claude-sync init

It walks you through:

  1. Creating an R2 bucket (with direct links to Cloudflare dashboard)
  2. Getting API credentials
  3. Setting up encryption (passphrase or random key)
  4. Testing the connection

Push Your Sessions

claude-sync push

Youll see each file being encrypted and uploaded with a progress indicator.

Second Device Setup

This is the beautiful part:

# Install
go install github.com/tawanorg/claude-sync/cmd/claude-sync@latest

# Init with same passphrase
claude-sync init --passphrase

# Pull everything
claude-sync pull

Thats it. Both machines now share the same Claude setup.

Daily Workflow

Check whats changed locally:

claude-sync status

See the full diff between local and remote:

claude-sync diff

Push your changes:

claude-sync push

Pull the latest:

claude-sync pull

I usually push at end of day, pull when I switch machines. Simple.

Handling Conflicts

What happens if you forget to sync and make changes on two machines? claude-sync doesnt just overwrite stuff.

When both local and remote files changed, it keeps your local version and saves the remote as a .conflict file. No data loss.

Then you can resolve them:

# See all conflicts
claude-sync conflicts --list

# Interactive resolution
claude-sync conflicts

The interactive mode lets you:

  • [l] Keep local version
  • [r] Keep remote version
  • [d] Show the diff between them
  • [s] Skip and decide later

Or batch resolve everything:

# Keep all local versions
claude-sync conflicts --keep local

# Keep all remote versions
claude-sync conflicts --keep remote

What Gets Synced

Everything in ~/.claude/ that matters:

| Content | Path | |---------|------| | Project sessions | projects/ | | Auto-memories | projects/*/memory.json | | Custom agents | agents/ | | Skills | skills/ | | Plugins | plugins/ | | Rules | rules/ | | Settings | settings.json | | Global instructions | CLAUDE.md | | Command history | history.jsonl |

Shell Integration (Optional)

Want automatic sync? Add this to your ~/.zshrc or ~/.bashrc:

# Auto-pull on shell start
if command -v claude-sync &> /dev/null; then
  claude-sync pull --quiet &
fi

# Auto-push on shell exit
trap 'claude-sync push --quiet' EXIT

Now every time you open a terminal, you get the latest. Every time you close it, your changes sync up.

Security Notes

A few things worth knowing:

  • Encryption key stored at ~/.claude-sync/age-key.txt with 0600 permissions
  • R2 credentials in ~/.claude-sync/config.yaml also restricted
  • Nothing unencrypted ever leaves your machine
  • Passphrase mode uses Argon2id with 64MB memory, 3 iterations

Important: If you use random key generation (not passphrase), back up your age key file. Lose it and your synced data is unrecoverable.

Why I Built This

This is my first open source developer tool. Ive been building products for years, but this is the first time Im releasing something specifically for developers.

Built it because I needed it. Sharing it because maybe you do too.

The whole thing is about 1,400 lines of Go. Single binary. No runtime dependencies. Just works.

Check it out: github.com/tawanorg/claude-sync

Issues and PRs welcome. Let me know what you think.

Further Reading

  • age encryption - The encryption tool claude-sync uses
  • Cloudflare R2 - S3-compatible storage with generous free tier
  • Argon2 - The password hashing function behind passphrase mode

© 2026 Tawan. All rights reserved.