I kept switching between my Linux desktop and Windows laptop, and every time I had to manually reconfigure Claude Code — plugins, MCP servers, project memories, skills, keybindings… it was getting old. So I built claude-code-backup — a set of shell scripts (bash + PowerShell) that back up your entire Claude Code configuration to a private Git repo you control, and restore it on any other machine with one command. What it backs up settings.json — global settings, plugin enabled/disabled state installed_plugins.json — which plugins you have installed known_marketplaces.json — marketplace sources (so plugins auto-download on restore) projects/ — per-project memory, permissions, and settings ~/.mcp.json — global MCP server configuration keybindings.json — custom keybindings commands/ — custom slash commands skills/ — custom skills todos/ — session todos How it works Architecture: two repos, zero connection between them. claude-code-backup/ ← public repo (scripts only) ├── setup.sh / setup.ps1 ├── backup.sh / backup.ps1 ├── restore.sh / restore.ps1 └── backup/ ← YOUR private repo (config data) The backup/ folder is gitignored from the public repo. It’s its own Git repo pointing to a private repo you create. Setup (one time per machine): bash bash setup.sh git@github.com:YOUR_USER/claude-code-backup-data.git Backup (after changing config): bash bash backup.sh Restore (on a new machine): bash bash setup.sh git@github.com:YOUR_USER/claude-code-backup-data.git bash restore.sh That’s it. Plugins re-download automatically on first launch. Features Cross-platform : bash (Linux/macOS) + PowerShell (Windows) Smart setup : detects if remote already has data and merges with local config (local wins on conflicts, remote-only files preserved) Non-destructive backup : uses rsync/merge for directories — doesn’t delete remote-only project memories from other machines SSH & HTTPS : auto-detects if you switch URL formats for the same repo No dependencies : just bash/PowerShell and Git Why not just dotfiles? Claude Code config includes binary-ish JSON, per-project memory files with UUIDs, and plugin state that changes frequently. A generic dotfiles manager doesn’t handle the merge semantics well (e.g., you want project memories from both machines, not just one overwriting the other). Repo: github.com/Ranteck/claude-code-backup Hope it’s useful to someone else jumping between machines. Feedback welcome! submitted by /u/Ranteck
Originally posted by u/Ranteck on r/ClaudeCode
