How to Sync Claude Code Settings Across All Your Devices (2026)
Claude Code is the most popular AI coding assistant in 2026, used by 46% of developers. But it has a problem: your memory, settings, and CLAUDE.md files don't follow you to a new machine. Here's how to fix that.
The Problem
You've spent weeks (or months) teaching Claude Code how you work. Your CLAUDE.md files are dialed in. Your global settings are perfect. Your project-level memory knows your codebase inside out.
Then you get a new laptop. Or you want to use Claude on your work machine. Or your hard drive fails.
Everything is gone. Claude has no idea who you are.
This happens because Claude Code stores its memory in local paths that are derived from absolute file paths on your machine. A project at /Users/alice/projects/myapp on your Mac creates a completely different memory path than C:\Users\alice\projects\myapp on Windows.
What You Need to Sync
Claude Code stores configuration in several places:
- ~/.claude/ — Global settings, preferences, and memory
- CLAUDE.md — Project-level instructions (per repo)
- ~/.claude/projects/ — Project-specific memory keyed by path
- .claude/ — Local project config directory
Manually copying these between machines is error-prone, especially across operating systems where paths differ.
The Solution: memoir
memoir is a free, open-source CLI that automatically detects, backs up, and restores Claude Code settings across any device. It handles cross-platform path remapping automatically.
Step 1: Install memoir
npm install -g memoir-cliStep 2: Initialize (first time only)
memoir initThis sets up your storage provider. You can use a GitHub repo (free) or memoir cloud (Pro).
Step 3: Push your settings
memoir pushmemoir automatically finds your Claude Code settings, CLAUDE.md files across all projects, and global memory. It bundles everything and pushes to your configured storage.
Step 4: Restore on a new machine
memoir restoreOn your new machine, install memoir, run memoir init to connect to the same repo, then memoir restore. Claude Code immediately has your memory back.
Cross-Platform Sync (Mac ↔ Windows ↔ Linux)
memoir handles path remapping automatically. Your CLAUDE.md from /Users/alice/projects/ on Mac gets correctly placed at C:\Users\alice\projects\ on Windows (or /home/alice/projects/ on Linux).
You don't need to do anything special. memoir detects the OS and remaps paths during restore.
Syncing Project-Level CLAUDE.md Files
memoir doesn't just sync global settings. It scans your filesystem for CLAUDE.md files across all your projects and includes them in the backup. When you restore, each CLAUDE.md goes back to the right project directory.
# See what memoir found
memoir status
# Only sync Claude Code (skip other tools)
memoir push --only claudeCloud Sync (Pro)
If you don't want to manage a GitHub repo, memoir offers cloud sync:
memoir login
memoir cloud push
memoir cloud restoreCloud sync includes version history, so you can roll back to any previous state. The free tier includes 3 cloud backups.
Bonus: Sync More Than Just Claude
memoir supports 11 AI tools. When you push, it backs up settings for every tool it detects:
- ChatGPT (CHATGPT.md)
- Claude Code (~/.claude/, CLAUDE.md)
- Gemini CLI (GEMINI.md, ~/.gemini/)
- Cursor (.cursorrules, settings)
- GitHub Copilot (.github/copilot-instructions.md)
- Windsurf, Zed, Cline, Continue.dev, Codex, Aider
One command backs up everything. One command restores everything.
FAQ
Does memoir sync conversation history?
memoir syncs your memory and settings files, not full conversation transcripts. Your CLAUDE.md instructions, global preferences, and project memory are all included.
Is memoir safe? Does it sync secrets?
memoir never syncs .env files, API keys, or credentials. Run memoir doctor to scan for accidental secrets before pushing.
How is this different from just using a dotfiles repo?
A dotfiles repo requires you to manually track which files to sync and handle path differences between operating systems. memoir auto-detects everything, handles cross-platform path remapping, and supports 11 tools out of the box.
Stop rebuilding your AI memory from scratch.
Install memoir in 10 seconds. Push once. Restore anywhere.
npm install -g memoir-cli