Skip to content

kasimmj/claude-code-memory-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


claude-code-memory-sync

Your Claude Code memory. Everywhere you code. Sync skills, settings, hooks, and memory across all your machines via Git. Zero config.


curl -fsSL https://raw.githubusercontent.com/kasimmj/claude-code-memory-sync/main/install.sh | bash


🧠 The Problem

You spent weeks tuning your Claude Code setup. Custom skills. Curated hooks. A settings.json that just works. Your memory files saying "the user prefers X over Y."

Then you open your laptop. None of it's there. Or worse β€” you tweaked the work machine and now they're out of sync.

✨ The Solution

claude-code-memory-sync keeps everything in a private Git repo and syncs it automatically.

# On machine A
$ cc-sync init
βœ“ Created repo at ~/.claude-sync
βœ“ Linked to github.com/yourname/claude-sync (private)
βœ“ Synced 24 skills, 12 hooks, 8 settings, 47 memory files

# On machine B (later)
$ cc-sync init
βœ“ Pulled 24 skills, 12 hooks, 8 settings, 47 memory files
βœ“ Watching for changes...

That's it. Edit a skill on machine A, save, and it's on machine B in under 3 seconds.


⚑ One-line Install

curl -fsSL https://raw.githubusercontent.com/kasimmj/claude-code-memory-sync/main/install.sh | bash

Then:

cc-sync init        # First-time setup (asks for git remote)
cc-sync status      # See sync state
cc-sync pull        # Force pull
cc-sync push        # Force push
cc-sync watch       # Daemon mode (auto-sync on change)

πŸ—οΈ How it works

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   Machine A     β”‚         β”‚   Private Git    β”‚         β”‚   Machine B     β”‚
   β”‚ ~/.claude/      β”‚ ◄────► β”‚   (GitHub)       β”‚ ◄────► β”‚ ~/.claude/      β”‚
   β”‚   skills/       β”‚         β”‚  - skills/       β”‚         β”‚   skills/       β”‚
   β”‚   hooks/        β”‚         β”‚  - hooks/        β”‚         β”‚   hooks/        β”‚
   β”‚   settings.json β”‚         β”‚  - settings/     β”‚         β”‚   settings.json β”‚
   β”‚   memory/       β”‚         β”‚  - memory/       β”‚         β”‚   memory/       β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        ↑                              ↑                            ↑
   `cc-sync watch`                Background                  `cc-sync watch`
   pushes on change               diff engine                 pulls every 30s
  • πŸ” Private by default β€” your memory stays yours
  • 🎯 Selective sync β€” choose what to share (skills public, memory private)
  • 🧬 3-way merge β€” handles edits from multiple machines gracefully
  • ⏱️ Real-time β€” file watcher pushes within ~2 seconds
  • πŸ›‘οΈ Secret scrubbing β€” auto-strips API keys before pushing

πŸ› οΈ Configuration

~/.claude-sync/config.yaml:

remote: github.com/yourname/claude-sync
visibility: private

sync:
  skills: true              # Share skills across machines
  hooks: true               # Share hooks
  settings: true            # Share settings.json
  memory:
    user: true              # User memories
    project: false          # Project memories stay local (per-machine)
  keybindings: true

filters:
  exclude:
    - "**/secrets/**"
    - "**/.env"
    - "**/credentials*"

machines:
  laptop:
    auto_pull_interval: 30s
  desktop:
    auto_pull_interval: 1m
  work:
    sync: skills, hooks      # Don't sync personal memory at work

🎁 Bonus Features

Branching for experiments

cc-sync branch experiment/new-skill   # try out something risky
cc-sync merge                          # promote when happy
cc-sync abandon                        # throw it away

Time travel

cc-sync log                            # see history of every change
cc-sync restore <hash>                 # roll back to any point

Diff before committing

cc-sync diff
# Diff against last sync β€” useful before pushing

Multi-account profiles

cc-sync profile personal      # Switch to personal claude setup
cc-sync profile work          # Switch to work setup

🀝 Team Mode

Share skills/hooks with your team without sharing personal memory:

cc-sync team init --org acme-corp

Now your team has a shared acme-corp/claude-team-shared repo. Skills and hooks contributed there are auto-pulled by every team member.

Personal memory stays in your private repo.


πŸ“œ License

MIT.


Star ⭐ if you've ever lost your Claude setup.

About

🧠 Sync Claude Code memory across machines via Git. Your persistent context, everywhere you code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors