| description | Backup your Claude Code brain (~/.claude) to GitHub — one command, automatic sync |
| allowed-tools | Bash, Read |
| name | claude-backup |
| version | 0.1.0 |
| metadata | {"openclaw":{"requires":{"bins":["claude-backup"]},"install":[{"kind":"node","package":"@lucasygu/claude-backup","bins":["claude-backup"]}],"os":["macos","linux"],"homepage":"https://github.com/lucasygu/claude-backup"}} |
| tags | ["backup","sync","config","github","devtools"] |
Claude Backup — ~/.claude to GitHub
Use the claude-backup CLI to back up and sync your Claude Code configuration, skills, memory, and settings to a private GitHub repo.
Quick Reference
Run these via Bash:
claude-backup
claude-backup init
claude-backup init --repo my-custom-name
claude-backup sync
claude-backup status
claude-backup status --json
claude-backup daemon install
claude-backup daemon install --interval 15
claude-backup daemon uninstall
claude-backup daemon status
claude-backup hook install
claude-backup hook uninstall
claude-backup hook status
What gets backed up
CLAUDE.md — global instructions
skills/ — custom skills
agents/ — agent definitions
settings.json — permissions, model config
keybindings.json — key mappings
plugins/installed_plugins.json — plugin registry
projects/*/memory/ — per-project persistent memory
hooks/ — hook scripts
What's excluded
- Session transcripts (JSONL — ephemeral, large)
- Credentials and secrets (
.credentials.json, *.local.json)
- Debug logs, cache, telemetry
- Plugin marketplace cache
How it works
Three-layer backup:
- Passive: Claude Code hooks auto-sync after tool use (5-min debounce)
- Scheduled: launchd (macOS) or cron (Linux) every 30 min
- Manual:
claude-backup sync
Git-native — works directly in ~/.claude (no file copying). Commit messages are category-aware:
vault-sync 2026-03-10 14:30 (3 memories, 1 skill, 2 config)
Cross-machine sync
Auto-remaps project memory directories when usernames differ between machines.
Requirements
git (required)
gh CLI (optional — for automatic private repo creation)
- Install:
npm install -g @lucasygu/claude-backup