claude-brain
Sync your Claude Code brain across machines — portable, automatic, intelligent.
🇨🇳 中文
claude-brain is a Claude Code plugin for brain sync — sync Claude Code memory, skills, agents, rules, and settings across all your machines with semantic merge. Cross-machine, portable, zero daily effort.
# Machine A (work laptop) — first time setup
> /brain-init [email protected]:you/my-brain.git
✓ Brain exported: 42 memory entries, 3 skills, 5 rules
✓ Pushed to remote
# Machine B (home desktop) — join existing brain
> /brain-join [email protected]:you/my-brain.git
✓ Pulled brain: 42 memory entries, 3 skills, 5 rules
✓ Merged with local state
✓ Auto-sync enabled
# Later... check sync status from any machine
> /brain-status
=== Claude Brain Status ===
Machine: home-desktop (b7f2...)
Remote: [email protected]:you/my-brain.git
Last push: 2 minutes ago
Last pull: 2 minutes ago
Status: Clean
Two commands. Zero daily effort. Works forever.
The Problem
You use Claude Code on multiple machines. Your laptop has learned your coding patterns. Your desktop has custom skills. Your cloud VM has different rules. None of them talk to each other.
Every time you switch machines, you lose context. You re-teach Claude the same things. Your carefully crafted CLAUDE.md stays behind.
The Solution
# Machine A (work laptop)
> /brain-init [email protected]:you/my-brain.git
✓ Brain exported: 42 memory entries, 3 skills, 5 rules
✓ Pushed to remote
# Machine B (home desktop)
> /brain-join [email protected]:you/my-brain.git
✓ Pulled brain: 42 memory entries, 3 skills, 5 rules
✓ Merged with local state
✓ Auto-sync enabled
# That's it. Every session start/end syncs automatically.
# Your brain follows you.
Two commands. Zero daily effort. Works forever.
Why claude-brain?
| Tool | What it does | What claude-brain adds |
|---|
| claude-mem | Enhances memory on one machine | Syncs your entire brain across all machines |
| chezmoi / dotfiles | Copies config files | Intelligently merges knowledge — resolves contradictions, deduplicates |
| Manual CLAUDE.md copy | Works but tedious | Auto-syncs silently on every session start/end |
No other tool does cross-machine semantic merge of Claude Code's brain state.
Key Features
- Auto-sync — hooks run on every session start/end, zero effort
- Semantic merge — LLM-powered deduplication of memory and CLAUDE.md (not just overwrite)
- N-way merge — laptop + desktop + cloud VM all converge intelligently
- Encryption — optional
age encryption for brain snapshots at rest
- Team sharing — share skills, agents, and rules with teammates
- Auto-evolve — promotes stable patterns from memory to durable config
- Security-first — secrets stripped, env vars excluded, private repo enforced
- Dirt cheap — ~$0.50-2.00/month typical usage via
claude -p
Quick Start
Install
# Add the marketplace and install
/plugin marketplace add toroleapinc/claude-brain
/plugin install claude-brain-sync
Initialize (first machine)
/brain-init [email protected]:you/my-brain.git
Join (other machines)
/brain-join [email protected]:you/my-brain.git
With encryption
/brain-init [email protected]:you/my-brain.git --encrypt
Done. Auto-sync handles everything from here.
Commands