Skip to content

SamTerces/claude-sync

Repository files navigation

claude-sync

Your Claude brain — everywhere you code.

You spent weeks teaching Claude your codebase. Your architecture decisions. Your team's unwritten rules. Your debugging patterns. Then you opened a new machine and Claude knew nothing.

claude-sync fixes this. One command syncs your entire Claude brain — memory, skills, agents, and rules — across every machine you own and every teammate you work with. It uses Git, so you already have the infrastructure.

claude-sync push          # share your brain
claude-sync pull          # absorb your team's context
claude-sync merge alice   # inherit a teammate's learnings

Install

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

Requires: git, curl, Claude Code Recommended: jq (for settings merging — brew install jq)


What gets synced

Layer Path
Memory ~/.claude/memory/
Skills ~/.claude/skills/
Agents ~/.claude/agents/
Rules ~/.claude/CLAUDE.md
Settings ~/.claude/settings.json (safe keys only)

API keys, tokens, .env files, and logs never leave your machine. See skills/claude-sync/references/security.md for the full scrub contract.


How it works

Every developer gets a personal branch in a shared Git repo (brain/<username>). Team content lives on main. You push your learnings to your branch and pull shared context from main. Merging is always opt-in and interactive — nothing overwrites silently.

you (work laptop)     origin/brain/you      origin/main
       │                     │                    │
  push ──────────────────▶   │                    │
       │              merge ──────────────────▶   │
       │                     │             merge ──┤◀── alice
  pull ◀────────────────────────────────────────  │

Commands

Command What it does
claude-sync init <url> First-time setup with a Git remote
claude-sync push Push local brain to origin/brain/<you>
claude-sync pull Pull origin/main into local brain
claude-sync diff Show what differs from remote
claude-sync merge <name> Absorb a teammate's learnings
claude-sync status Brain inventory + sync state
claude-sync watch Auto-push after memory/skill writes
claude-sync unwatch Disable auto-push

Or inside Claude Code: /sync push, /sync pull, /sync diff, etc.


Merge strategy

  • Memory files: unique content blocks from the remote are appended. Nothing removed.
  • Skills: diff shown, you choose local / remote / skip.
  • CLAUDE.md: diff shown, append is opt-in.
  • settings.json: deep merge, your values win on conflict.

Full details: skills/claude-sync/references/merge-strategy.md


Conflict resolution

Local always wins by default. Conflicts are shown before any file is touched. --force is never used — --force-with-lease only.

Full details: skills/claude-sync/references/conflict-resolution.md


Examples

See EXAMPLES.md for quick reference, or skills/claude-sync/EXAMPLES.md for full walkthroughs covering: solo multi-machine, team onboarding, contractor setup, auto-sync, and conflict handling.


Roadmap

  • Selective sync (memory-only, skills-only)
  • Encrypted sync with age
  • S3 / R2 backend (no Git required)
  • claude-sync invite <email> — send a teammate a one-command onboarding link
  • GitHub Actions — scheduled auto-merge of team learnings

Contributing

PRs welcome. One concern per PR. See CLAUDE.md for guidelines on modifying skill triggers, sync behaviour, and the security scrubbing contract.


License

MIT

About

Sync your Claude brain - memory, skills, agents, and rules across machines and teammates via Git. One command to share context. One command to inherit it.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages