Skip to main content

A comprehensive solution to managing your dotfiles

Project description

dotsync

dotsync Python Platform License

A powerful and versatile dotfiles manager that makes managing your configuration files across multiple machines effortless.

FeaturesInstallationQuick StartDocumentationContributing


✨ 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotsync_cli-1.0.9.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotsync_cli-1.0.9-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file dotsync_cli-1.0.9.tar.gz.

File metadata

  • Download URL: dotsync_cli-1.0.9.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for dotsync_cli-1.0.9.tar.gz
Algorithm Hash digest
SHA256 224aa4980ac4938b7c857f51f0750e8bb67cd120dbf9316cd2649c041b23408c
MD5 6a751a03f35b78c74065bf2d6e87661b
BLAKE2b-256 8d7e59050b1ab97dbc32d6463d917ff10f8b74bbc687af64499e83fc8777d55f

See more details on using hashes here.

File details

Details for the file dotsync_cli-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: dotsync_cli-1.0.9-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.13.9

File hashes

Hashes for dotsync_cli-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8d6e01d624bf51827e89a289df7e8771e1abcf984c9c256b327eb07dc3e33100
MD5 6499b12a838f76dd8e4596a72646bac2
BLAKE2b-256 03c1df09bfb0546516785ba74c44b8fc1cac28e89a5f145420b4c46e6a18f786

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page