● memory-sync
Claude Code Plugin

memory-sync

Back up and restore Claude Code memory across machines.

Push and pull per-project memories to a private Git repo. HOME-relative storage means memories restore correctly on any machine, regardless of username. One command backs up every project at once.

machine A ~/.claude/projects/-Users-alice-base-foo/memory your private repo data/home-projects/base-foo/memory machine B ~/.claude/projects/-Users-bob-base-foo/memory push memory + global config pull status: drifted local differs from repo pull refuses to overwrite local-only files unless --force restored under B's own $HOME base-foobase-barglobal one folder per project machine A repo machine B ~/.claude private git ~/.claude push pull status: drifted pull refuses to overwrite local-only files unless --force one folder per project in the repo
The sync as a commit graph. Machine A pushes memory into your private repo, status shows drift, machine B pulls it into its own $HOME. Each project is its own folder.
Getting started

Install

# via gago-plugins marketplace
/plugin marketplace add gagoar/gago-plugins
/plugin install memory-sync@gago-plugins
/reload-plugins

# standalone
/plugin marketplace add gagoar/claude-memory-sync
/plugin install memory-sync@memory-sync
/reload-plugins
After installing the plugin, run /memory-sync:sync init to connect your backup repo.
Configuration

First-time setup

/memory-sync:sync init
  • AsksWhere to put your backup repo — creates a private GitHub repo if you don't have one
  • ConfiguresEverything in ~/.claude/memory-sync.config.json — no other setup needed
  • Auto-runsThe first time you invoke any /memory-sync:sync command without a config
You can also say "back up my memory" or "set up memory backup" — Claude routes to the same init flow.
Reference

Daily use

You typeWhat happens
/memory-sync:sync pushBack up new/changed memory + global config to your repo
/memory-sync:sync pullRestore from your repo
/memory-sync:sync statusSee what files have drifted
/memory-sync:sync listShow projects and global files that are backed up
/memory-sync:sync selectPick which projects to include (interactive checkboxes)
/memory-sync:sync historyShow recent backup commits — what was backed up when
/memory-sync:sync configure --backup-repo=NEWSwitch backup destination
/memory-sync:sync doctorRead-only diagnosis of sync problems
  • push no-opsWhen nothing has changed, push exits cleanly with no commit
  • pull safetyRefuses to overwrite local changes unless --force is passed
Portability

HOME-relative storage

Claude encodes the absolute path of each project as the local directory name. This plugin stores the suffix after your $HOME prefix so memories restore on any machine.

LocationPath
Machine A local~/.claude/projects/-Users-alice-base-foo/memory/...
Stored in repodata/home-projects/base-foo/memory/...
Machine B local~/.claude/projects/-Users-bob-base-foo/memory/...
  • Outside $HOMEProjects outside $HOME live under data/absolute-projects/ and restore only on machines with the same absolute path.
Data & security

Privacy

This plugin repo is public and contains no user data. Your backup repo is yours — use a private repo, memory often contains project names, hostnames, and identifiers. The plugin only reads/writes ~/.claude/projects/*/memory/, a short list of global files under ~/.claude/ (CLAUDE.md, RTK.md, skills/, keybindings.json) and your backup repo.