Run the interactive configuration wizard:
claude-configThis creates .claude-sync-config.local with your settings.
Settings are loaded in this priority order (highest to lowest):
-
Environment Variables (
CLAUDE_SYNC_*)- Highest priority
- Temporary overrides
- Set in your shell:
export CLAUDE_SYNC_VERBOSE="true"
-
Local Config (
.claude-sync-config.local)- Machine-specific settings
- Gitignored - not synced between machines
- Created by
claude-config
-
Shared Config (
.claude-sync-config)- Default settings
- Version controlled - synced to all machines
- Can be customized for team/project defaults
-
Built-in Defaults
- Fallback values if nothing else is configured
CLAUDE_SYNC_REMOTE- Git remote URL- Example:
git@bitbucket.org:user/repo.git - Example:
https://github.com/user/repo.git - Must be configured before first sync
- Example:
CLAUDE_SYNC_BRANCH- Git branch (default:main)CLAUDE_SYNC_ENCRYPTION- Enable encryption (default:false)CLAUDE_BACKUP_RETENTION_DAYS- Auto-cleanup old backups (default:30)CLAUDE_DATA_DIR- Claude data directory (default:$HOME/.claude)CLAUDE_SYNC_VERBOSE- Verbose output (default:false)
Create .claude-sync-config.local:
CLAUDE_SYNC_REMOTE="git@bitbucket.org:myuser/claude-sync.git"That's it! Everything else uses defaults.
CLAUDE_SYNC_REMOTE="git@bitbucket.org:myuser/claude-sync.git"
CLAUDE_SYNC_ENCRYPTION="true"CLAUDE_SYNC_REMOTE="git@github.com:myuser/claude-sync.git"
CLAUDE_SYNC_BRANCH="dev"
CLAUDE_DATA_DIR="/opt/claude-data"
CLAUDE_BACKUP_RETENTION_DAYS="60"Temporary override for testing:
export CLAUDE_SYNC_VERBOSE="true"
claude-sync-pushPermanent in ~/.bashrc:
export CLAUDE_SYNC_REMOTE="git@bitbucket.org:myuser/claude-sync.git"
export PATH="$HOME/claude-code-sync:$PATH"Check what settings are active:
claude-sync-statusThis shows:
- Current configuration values
- Git repository status
- Conversation counts
- Available commands
claude-config# Local (machine-specific, gitignored)
cat .claude-sync-config.local
# Shared (defaults, version controlled)
cat .claude-sync-config
# Template with all options documented
cat .claude-sync-config.exampleDelete local config to start fresh:
rm .claude-sync-config.local
claude-configclaude-config # Set remote URL
claude-sync-pushgit clone <repo-url> ~/claude-code-sync
cd ~/claude-code-sync
claude-config # Use same remote URL
claude-sync-pull
claude-sync-pushThe .local config is machine-specific and gitignored, so each machine has its own settings file that doesn't conflict.
Run claude-config or manually create .claude-sync-config.local:
echo 'CLAUDE_SYNC_REMOTE="git@bitbucket.org:user/repo.git"' > .claude-sync-config.localCheck with:
claude-sync-statusEnvironment variables have highest priority. Make sure they're exported:
export CLAUDE_SYNC_VERBOSE="true" # Not just CLAUDE_SYNC_VERBOSE="true"Use different remotes for different projects by setting environment variables:
# Project A
export CLAUDE_SYNC_REMOTE="git@bitbucket.org:team-a/claude-sync.git"
claude-sync-push
# Project B
export CLAUDE_SYNC_REMOTE="git@bitbucket.org:team-b/claude-sync.git"
claude-sync-pushCommit custom defaults to .claude-sync-config:
# .claude-sync-config (committed to git)
CLAUDE_SYNC_BRANCH="team-conversations"
CLAUDE_BACKUP_RETENTION_DAYS="90"
# Each team member's .claude-sync-config.local
CLAUDE_SYNC_REMOTE="git@bitbucket.org:team/shared-convos.git"Test with verbose output without changing config:
CLAUDE_SYNC_VERBOSE="true" claude-sync-push