A powerful and flexible tool for managing and synchronizing your dotfiles across multiple systems. DotSync allows you to create symbolic links or copy configuration files to their appropriate locations, making it easy to maintain consistent setups across different machines.
- Features
- Installation
- Quick Start
- Configuration
- Commands
- Advanced Usage
- Example: Version-Controlled Dotfiles Across Multiple Computers
- Project Structure
- Development
- Contributing
- License
- Support
- Changelog
- Multiple Sync Actions: Support for both symbolic links and file/directory copying
- Flexible Configuration: YAML-based configuration with JSON schema validation
- Dry Run Mode: Preview changes before applying them
- Interactive Prompts: Safe operation with confirmation prompts for destructive actions
- Rich CLI: Beautiful terminal interface with progress indicators and colored output
- Cross-Platform: Works on macOS, Linux, and Windows
uv tool install git+https://github.com/cfstcyr/dotsyncgit clone https://github.com/cfstcyr/dotsync.git
cd dotsync
uv install
uv tool install .- Initialize a new sync configuration in your dotfiles directory:
cd ~/my-dotfiles
dotsync init .This creates a .sync.yaml file with a basic example configuration.
- Edit the configuration to match your needs:
# .sync.yaml
my-shell:
action: symlink
src: ./zshrc
dest: ~/.zshrc
my-config:
action: copy
src: ./config
dest: ~/.config/my-app- Sync your dotfiles:
dotsync sync ~/my-dotfiles- Preview changes first with dry run:
dotsync sync ~/my-dotfiles --dry-runDotSync uses YAML configuration files to define sync operations. Each configuration file contains a mapping of sync items, where each item specifies:
action: Either"symlink"or"copy"src: Source path (relative to the config file or absolute)dest: Destination path (can use~for home directory)
# ~/.sync.yaml
zsh-config:
action: symlink
src: ./zshrc
dest: ~/.zshrc
vim-config:
action: copy
src: ./vim
dest: ~/.vim
git-config:
action: symlink
src: ./gitconfig
dest: ~/.gitconfig
tmux-config:
action: symlink
src: ./tmux.conf
dest: ~/.tmux.confDotSync automatically discovers configuration files using these patterns:
.dotsync*dotsync*.sync*
You can specify custom patterns in the app settings.
# Sync dotfiles
dotsync sync <path>
# Preview sync operations
dotsync sync <path> --dry-run
# Remove synced files/links
dotsync unsync <path>
# Initialize new configuration
dotsync init <path># View current settings
dotsync settings info
# Set a setting
dotsync settings set sync_config_patterns='["*.yaml", "*.yml"]'
# Reset to defaults
dotsync settings reset# Show available utility commands
dotsync utils --help# Increase verbosity for debugging
dotsync sync ~/my-dotfiles -vvv# Use custom settings file
dotsync --app-settings ~/custom-settings.yaml sync ~/my-dotfiles# Temporarily override settings
dotsync --with-setting sync_config_patterns='["config.yaml"]' sync ~/my-dotfilesA typical dotfiles repository with DotSync might look like:
my-dotfiles/
├── .sync.yaml # Main sync configuration
├── zshrc # Zsh configuration
├── vim/
│ └── vimrc # Vim configuration
├── gitconfig # Git configuration
└── config/
└── some-app/ # Application-specific configs
- Python 3.13+
- uv package manager
git clone https://github.com/cfstcyr/dotsync.git
cd dotsync
uv installmake testmake lint # Check code quality
make format # Format code
make x # Fix linting and formatting issuesmake export_schemas- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass and code is linted
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions