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
  • 📦 Minimal Dependencies - Only requires uv (auto-installed)
  • 🚀 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.14.tar.gz (27.6 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.14-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dotsync_cli-1.0.14.tar.gz
Algorithm Hash digest
SHA256 bd2108726cc06ebd1233aaad16757df9fb80cb8c9cf0bf6f9d7838092d27fd87
MD5 dc1e243089116257aacc747aab8eb1fc
BLAKE2b-256 8a9d514706b90a06d68c68f908a416cff42aa8622351f2de6e28e962ac6dc961

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotsync_cli-1.0.14-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dotsync_cli-1.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 306531b960fd6180111a734e0890eebe6ae3bbc9835dc7850f172ca2985a4a02
MD5 6136ced6e2620cb054fe5dc6baee66a8
BLAKE2b-256 3fb04a661e4e62db5cee68fec178cf62d9e25af4e14a14febf599c74c9ed7f07

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