A comprehensive solution to managing your dotfiles
Project description
dotsync
A powerful and versatile dotfiles manager that makes managing your configuration files across multiple machines effortless.
Features • Installation • Quick Start • Documentation • Contributing
✨ Features
- 🎯 Easy Organization - Categorize and organize your dotfiles with an intuitive filelist system
- 🔄 Multi-Machine Support - Share files between machines or keep separate versions in the same repo
- 🔒 Encryption Support - Encrypt sensitive dotfiles using GnuPG
- 🔗 Flexible Linking - Use symlinks or copy files (hard mode) based on your needs
- 📦 Zero Dependencies
- 🚀 Simple Commands - Intuitive CLI with commands like
add,update,restore,encrypt - 🧪 Well Tested - Comprehensive test suite ensuring reliability
- 📚 Great Documentation - Full documentation available at ReadTheDocs
🚀 Installation
Quick Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/HarveyGG/dotsync/main/install.sh | bash
Features:
- ✅ No Python installation required
- ✅ Zero dependencies
- ✅ Cross-platform (macOS, Linux)
- ⚡ First run ~30s, then instant
Homebrew (macOS/Linux)
brew tap HarveyGG/tap
brew install dotsync
pip (Alternative)
pip install dotsync-cli
📖 Quick Start
1. Initialize a dotfiles repository
# Automatically creates ~/.dotfiles if it doesn't exist
dotsync init
# Or specify a custom directory
dotsync init ~/my-dotfiles
2. Add a configuration file
# Add a file (automatically infers category from path)
dotsync add ~/.zshrc
# Add with specific category
dotsync add ~/.vimrc vim
# Add with encryption
dotsync add --encrypt ~/.ssh/id_rsa ssh
3. Sync files to repository
dotsync update
This will:
- Copy your files to the repository
- Create symlinks in your home directory pointing to the repository
4. Restore on a new machine
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
dotsync restore
📋 Common Commands
| Command | Description |
|---|---|
dotsync init [directory] |
Initialize a new dotfiles repository (default: ~/.dotfiles) |
dotsync add <file> [category] |
Add a new file to management |
dotsync add --encrypt <file> [category] |
Add a file with encryption |
dotsync update |
Sync files from home to repository |
dotsync restore |
Restore files from repository to home |
dotsync encrypt <file> |
Convert existing file to encrypted |
dotsync unmanage <file> |
Stop managing a file |
dotsync list |
List all managed files |
dotsync diff |
Show differences between home and repo |
dotsync commit |
Commit changes to git |
dotsync clean |
Remove files from home that are in repo |
dotsync passwd |
Change encryption password |
For detailed usage, see the documentation.
📁 Repository Structure
After initialization, your repository will look like:
~/.dotfiles/
├── .git/
├── filelist # List of managed files
├── dotfiles/
│ ├── plain/ # Unencrypted files
│ │ ├── common/
│ │ ├── zsh/
│ │ └── vim/
│ └── encrypt/ # Encrypted files
│ └── ssh/
└── .plugins/ # Plugin data (passwords, etc.)
🔐 Encryption Example
# Add a file with encryption
dotsync add --encrypt ~/.cursor/mcp.json cursor
# The file will be encrypted in the repository
# When you sync, it's automatically decrypted to your home directory
# Convert an existing plain file to encrypted
dotsync encrypt ~/.ssh/config
# Change encryption password
dotsync passwd
🎯 Use Cases
Share Configurations Across Machines
Keep your workstation and server dotfiles in the same repository, organized by categories:
filelist:
.zshrc:zsh,workstation
.vimrc:vim,common
.ssh/config:ssh|encrypt
Quick Machine Setup
# On a new machine
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
dotsync restore
# Or if the repository doesn't exist yet
dotsync init # Creates ~/.dotfiles automatically
Encrypt Sensitive Files
Keep API keys, tokens, and other sensitive data encrypted in your repository while still managing them with dotsync.
📚 Documentation
For complete documentation, including:
- Detailed command reference
- Advanced usage patterns
- Encryption guide
- Migration from v1.x
Visit: https://dotsync.readthedocs.io
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
git clone https://github.com/HarveyGG/dotsync.git
cd dotsync
uv sync
Running Tests
uv run pytest tests/
📝 License
This project is licensed under a Non-Commercial License. See the LICENSE file for details.
Summary:
- ✅ Free for personal, educational, and non-profit use
- ✅ View, modify, and distribute the source code
- ❌ Commercial use is not permitted without explicit permission
For commercial licensing inquiries, please contact: harvey.wanghy@gmail.com
🔗 Links
Made with ❤️ by the dotsync community
⭐ Star this repo if you find it useful!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dotsync_cli-1.0.4.tar.gz.
File metadata
- Download URL: dotsync_cli-1.0.4.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2628e4b4118e75984c28626e127e510361f31cd6c4ed5342c0e97a297a09070d
|
|
| MD5 |
551925c9702e1c9e547dbe7d02e09b79
|
|
| BLAKE2b-256 |
14b60348aab3491c56ce5e29e07e46a5ba129102fed7e145d3c1796d039527af
|
File details
Details for the file dotsync_cli-1.0.4-py3-none-any.whl.
File metadata
- Download URL: dotsync_cli-1.0.4-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7addae49cfb4842ab5a159b15de55c649c9d0ca94687fb0b2caf93c11f907314
|
|
| MD5 |
327590045ffb1eccb35c545ec882a99d
|
|
| BLAKE2b-256 |
a0d2cbdc3da2dfb4c013d3cc50c3b1aec223b4ea03b6e0ea7974f24798c86cac
|