Do you have multiple machines and felt the fatigue of syncing your config across all of them? The config no longer in one ~/.config folder, now they could be your ~/.claude/CLAUDE.md and its skills, or across multiple files and folders. This tool solves your problem.
- You cannot change the config destination, it always reads the config from
~/.config
NEVER track files containing:
- API keys, tokens, or secrets
- Passwords or credentials
- Private SSH keys
- Sensitive personal data
- Anything you wouldn't want to be public or shared by others
If your config files contain secrets, DO NOT use a public GitHub repository.
Use a private repository OR consider using secret management tools (like envchain, 1password, vault, etc.) for sensitive data.
If your configs contain sensitive data and you want extra protection, consider encrypting your repository with git-crypt.
Once enabled, files are encrypted on push and decrypted on pull automatically. Your config-sync commands work exactly the same - no changes needed.
First time setup:
# Install git-crypt
brew install git-crypt # macOS
sudo apt install git-crypt # Ubuntu/Debian
# Go to your sync folder and enable encryption
cd ~/.config-sync
git-crypt init
# Mark synced files for encryption
echo "synced-files/** filter=git-crypt diff=git-crypt" >> .gitattributes
# Save the key somewhere safe (you'll need it on other machines)
git-crypt export-key ~/config-sync-keyOn each of your other machines:
# After cloning, unlock the repository with your key
cd ~/.config-sync
git-crypt unlock ~/config-sync-keyWhat this protects: Your files are encrypted in GitHub and in git history. They're still decrypted on your machine, so keep your
config-sync-keyfile safe and don't share it.
This software is provided "as is", without warranty of any kind. The authors and contributors are not liable for any damages, data loss, security breaches, or issues arising from the use of this software. You are solely responsible for:
- What files you choose to sync
- Where you store your repository (public vs private)
- Protecting sensitive information
- Backing up your data
go install github.com/mohammed-io/config-sync@v0.0.13Or build from source:
git clone https://github.com/mohammed-io/config-sync.git
cd config-sync
go build -o config-sync .config-sync set-origin-repo git@github.com:your-username/your-config-repo.gitThis initializes a git repository in ~/.config-sync and sets the remote origin.
# Track a single file
config-sync track ~/.claude/CLAUDE.md
# Track multiple files
config-sync track ~/.vimrc ~/.tmux.conf ~/.gitconfigconfig-sync pushThis copies tracked files to ~/.config-sync/synced-files/, commits, and pushes to git.
config-sync pullThen manually copy files from ~/.config-sync/synced-files/ to their destinations (or create a restore command).
config-sync untrack ~/.vimrc# Set up a private repo (IMPORTANT: use private for sensitive configs)
config-sync set-origin-repo git@github.com:your-username/my-config.git
# Track your Claude Code instructions
config-sync track ~/.claude/CLAUDE.md
# Push to sync
config-sync pushOn another machine:
# Clone or pull
config-sync pull
# Files are now in ~/.config-sync/synced-files/
# Copy them to the right location manuallyThis project uses mise for tool management.
# Install mise (if not already installed)
curl https://mise.run | sh
# Install Go and other tools via mise
mise install# Build the binary
go build -o config-sync .
# Or use mise to run tasks
mise run buildconfig-sync/
├── main.go # CLI commands and main entry point
├── json_config.go # Config management (JsonConfig)
├── git_runner.go # Git operations (GitRunner interface)
├── shorthand_path.go # Path utilities (tilde expansion)
├── README.md
└── LICENSE
- Tracked files are stored in
~/.config-sync/synced-files/ - Each file is placed in a subfolder named after the MD5 hash of its path
config.jsontracks which files are being synced- Git operations run in
~/.config-sync/
MIT License - see LICENSE file for details.