Sync your Claude config (~/.claude/) across machines using git. Background pull before every claude invocation — zero latency, no friction.
One command — everything configured automatically:
curl -fsSL https://raw.githubusercontent.com/charliinew/claude-kitsync/main/install.sh | bashThe installer will:
- Install the
claude-kitsyncbinary - Ask for your git remote URL (or skip if you don't have one yet)
- Initialise
~/.claudeas a git repo + install the shell wrapper
Then run the one activation command it prints (e.g. source ~/.zshrc) and you're done.
If you already know your remote URL:
KITSYNC_REMOTE=git@github.com:you/claude-config.git \
curl -fsSL https://raw.githubusercontent.com/charliinew/claude-kitsync/main/install.sh | bashNo prompts — fully automated setup.
Via Homebrew:
brew tap charliinew/claude-kitsync https://github.com/charliinew/claude-kitsync
brew install claude-kitsync| Command | Description |
|---|---|
claude-kitsync init [--remote <url>] |
Initialise ~/.claude as git repo + install shell wrapper |
claude-kitsync push [-m "message"] [--dry-run] |
Commit and push whitelisted changes; --dry-run previews without committing |
claude-kitsync pull [--force] |
Pull manually from remote (skips if dirty working tree) |
claude-kitsync status |
Show modified files and ahead/behind count |
claude-kitsync log [-n <count>] |
Show sync history (default: last 15 commits) |
claude-kitsync diff |
Show diff between local and remote before pushing |
claude-kitsync publish |
Package and publish agents/skills as a kit to GitHub |
claude-kitsync restore |
Restore a rc file from a timestamped backup |
claude-kitsync install <url> |
Merge a public kit into ~/.claude (selective, no overwrite of local config) |
claude-kitsync profile [list|add|switch|remove] |
Manage named remotes for multi-environment sync (work, perso…) |
claude-kitsync encrypt [enable|disable|rotate|status] |
Encrypt settings.json with AES-256 before push (opt-in) |
claude-kitsync settings |
Interactive menu to change pull/push mode, remote URL, wrapper |
claude-kitsync doctor |
Diagnose the health of your setup |
claude-kitsync upgrade |
Update claude-kitsync to the latest version |
claude-kitsync uninstall |
Fully remove claude-kitsync (binary, PATH, shell wrapper) |
Shell wrapper — claude-kitsync init injects a claude() function into your ~/.zshrc (or ~/.bashrc):
claude() {
# Background: pull latest config (max 2s, then timeout)
( timeout 2 git -C ~/.claude pull --rebase --autostash -q ) &
disown
# Foreground: run claude immediately, no wait
command claude "$@"
}Git-in-~/.claude — your config directory becomes a standard git repo. Only explicitly whitelisted files are committed:
settings.json,CLAUDE.mdagents/,skills/,hooks/,scripts/,rules/
Absolute path normalisation — settings.json often contains paths like /Users/alice/.claude/hooks/.... After every pull, claude-kitsync rewrites these to match the current machine's $HOME/.claude/.
No. The .gitignore uses a deny-by-default allowlist — only explicitly whitelisted files can be committed. .credentials.json is additionally double-blocked and claude-kitsync push will abort with an error if it somehow ends up staged.
The background pull is skipped with a warning (you won't see it since it's background). Your local changes are never overwritten. Run claude-kitsync push to commit them first.
Run claude-kitsync pull manually — it calls normalize_paths() which fixes all absolute paths to match the current $HOME. This also happens automatically in the background wrapper.
Yes — claude-kitsync init --remote git@github.com:you/private-claude-config.git. The remote is just a standard git remote. Use SSH keys or HTTPS tokens as you normally would.
claude-kitsync install https://github.com/someone/claude-kitThis clones the kit into a temp directory, then copies only agents/, skills/, hooks/, rules/, and CLAUDE.md. It never touches your settings.json, settings.local.json, or .credentials.json. You'll be prompted for each conflicting file: skip / overwrite / backup.
A copy of settings.json with absolute paths replaced by __CLAUDE_HOME__ tokens. It's committed to git so that cross-user portability is explicit. On pull, normalize_paths() resolves tokens back to the real path.
Yes: CLAUDE_HOME=/path/to/other-claude claude-kitsync status or export it permanently in your shell rc.
Run claude-kitsync init again — it's idempotent. It will add the wrapper block without duplicating it.
claude-kitsync uninstall
exec $SHELLThis removes the binary, PATH entry, and shell wrapper in one command.
- Allowlist gitignore — deny-by-default, only whitelisted files can be staged
- Double guard on
.credentials.json—.gitignore+ runtime abort inclaude-kitsync push - No code execution during
claude-kitsync install— only file copies, no scripts run - Partial download protection in
install.sh— body wrapped in a function, only called at the last line
- Bash 3.2+ or Zsh 5.0+
- git 2.x
- Standard POSIX utilities (
sed,awk,find,mktemp) - macOS or Linux
MIT