--- name: Claude Code sync setup description: Cross-machine Claude Code sync via Gitea repo, LaunchAgents, and memory symlinks between MacBook Pro and claude-code.local type: reference --- Claude Code config is synced between two Macs via a private Gitea repo. **Repo**: https://git.chrissader.com/claudecode/claude-sync.git **Location**: `~/.claude/` on both machines (the repo IS the .claude directory) **Machines**: - Chriss-MacBook-Pro (csader) — primary Mac - claude-code.local (chrissader) — secondary Mac **What syncs** (every 15 min via LaunchAgent `com.csader.claude-sync`): - `agents/` — custom agent definitions (homelab-ops) - `commands/` — custom slash commands - `agent-memory/` — agent-specific memory - `projects/*/memory/` — per-project memory files - `sync.sh` — the sync script itself **What stays local** (gitignored): - `settings.json` / `settings.local.json` (contain API keys) - Session history, tool results, workflows, cache, debug, plugins **Path mismatch**: Project memory dirs encode absolute paths. Symlinks on claude-code.local map `-Users-chrissader-*` → `-Users-csader-*/memory` so both machines share memory. **SSH access**: `ssh -i ~/.ssh/claude-sync chrissader@claude-code.local` **MCP on claude-code.local**: obsidian-local (vault at /Users/chrissader/Documents/Sader) + home-assistant **Manual sync**: Run `~/.claude/sync.sh` on either machine, or wait for the 15-min LaunchAgent cycle.