Sync your Claude Code .claude/ directory across all your devices
open sourceMITself-hostablefree
claude-sync is a small open source Node.js CLI that backs up and syncs Claude Code's ~/.claude directory (memory files, skills, settings, plugins and project folders) between machines. The recommended backends are a private Git repository or a self-hosted Gitea, where each sync commits local changes, three-way merges the other devices' and stops on a real conflict; cloud folders, Syncthing, rsync and custom commands also work, without merging. Claude Code's SessionStart and SessionEnd hooks can run it, so it pulls when a session starts and pushes when it ends. It never syncs credentials, keys or machine-specific files, holds incoming changes to settings.json and plugins/ for review, and snapshots ~/.claude before every sync so you can restore. It's one developer's project, with one tagged release (v1.1.0, October 2026).
Problems it solves
- back up my ~/.claude folder (settings, skills, memory) automatically when each Claude Code session ends
- keep Claude Code's memory files and skills the same on my laptop and my desktop
- keep a copy of my Claude Code session history in a private git repository
- set up a new machine with my whole Claude Code configuration in one command
- sync my Claude Code setup without copying my Claude login or API keys
- roll ~/.claude back to an earlier snapshot after something overwrote my settings
- stop another machine from silently changing my Claude Code hooks or MCP servers
- sync Claude Code's config over Syncthing or rsync instead of a cloud service
- see which of my machines last synced their Claude Code config
Features
- syncs ~/.claude through git or a self-hosted Gitea, with three-way merges
- experimental iCloud, Dropbox, OneDrive, Syncthing, rsync over SSH and custom-command backends
- pulls on session start and pushes on session end through Claude Code hooks
- never syncs credentials, settings.local.json, .env files, keys, shell snapshots or IDE tokens
- holds settings.json and plugins/ changes from other devices for review before applying them
- a local snapshot before every sync, with history and restore commands
- selective sync with include and exclude patterns per device
- device registry and a short status for shell prompts
- conflicts stop the sync instead of overwriting; resolve with --prefer local or remote
Limitations
- Doesn't encrypt what it syncs: encryption at rest isn't implemented yet, so use a private remote you control1
- Doesn't sync in real time: the file watcher isn't implemented, so it syncs on demand or from Claude Code's session hooks1
- Doesn't merge changes or sync deletions on the cloud, Syncthing and rsync backends: the last copy wins1
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what claude-sync does.
- chezmoi Manage your dotfiles across multiple diverse machines, securely.
- restic Fast, secure, efficient backup program
- rclone rsync for cloud storage
- Syncthing Open Source Continuous File Synchronization
- Claude Code Trace Claude Code session log viewer for JSONL files in ~/.claude/projects: browse conversations, tool calls, tokens, and live tail sessions on desktop, web, and TUI
- claude-code-log A Python CLI tool that converts Claude Code transcript JSONL files into readable HTML and Markdown
