A blazing fast, secure, and feature-rich dotfile manager written in Rust
Features • Installation • Quick Start • Commands • Configuration • Contributing
- ⚡ Lightning Fast - Built with Rust for maximum performance
- 🔐 Security First - Comprehensive symlink validation and permission preservation
- 🎣 Git Hooks - Automated pre-commit validation with configurable rules
- 🔒 Encryption Support - Built-in file encryption/decryption capabilities
- 📦 Cross-Platform - Works on Linux, macOS, and Windows
- 🔄 Repository Management - Full Git integration with fetch, pull, sync
- ⚙️ Configuration System - YAML-based configuration with environment overrides
- 🎯 Alternate Files - Manage environment-specific dotfiles
- 🚀 Bootstrap Scripts - Automated setup and initialization
- 📊 Status & Monitoring - Real-time repository status and file tracking
- 🦀 Rust and Cargo (latest stable version)
- 🌐 Git (for repository operations)
cargo install rusted-yadm-
Clone the repository:
git clone https://git.sr.ht/~m1n/rusted-yadm cd rusted-yadm -
Build in release mode:
cargo build --release
-
Install locally:
cargo install --path .
# Initialize a new repository
rusted-yadm init
# Or clone an existing repository
rusted-yadm clone https://git.sr.ht/~m1n/dotfiles# Add your bash configuration
rusted-yadm add ~/.bashrc
# Add your Vim configuration
rusted-yadm add ~/.vimrc# Commit your changes
rusted-yadm commit "Add bash and vim configurations"
# Push to remote repository
rusted-yadm push# Install pre-commit hooks for automatic validation
rusted-yadm hook-install| Command | Description | Example |
|---|---|---|
init |
Initialize a new repository | rusted-yadm init |
clone |
Clone a repository | rusted-yadm clone https://git.sr.ht/~user/dotfiles |
status |
Show repository status | rusted-yadm status |
list |
List tracked files | rusted-yadm list |
fetch |
Fetch remote changes | rusted-yadm fetch |
pull |
Pull changes from remote | rusted-yadm pull |
sync |
Sync with remote (fetch + pull) | rusted-yadm sync |
| Command | Description | Example |
|---|---|---|
add |
Add file to repository | rusted-yadm add ~/.bashrc |
commit |
Commit changes | rusted-yadm commit "Update bashrc" |
push |
Push to remote | rusted-yadm push |
| Command | Description | Example |
|---|---|---|
encrypt |
Encrypt a file | rusted-yadm encrypt secrets.yaml |
decrypt |
Decrypt a file | rusted-yadm decrypt secrets.yaml.enc |
hook-install |
Install git hooks | rusted-yadm hook-install |
hook-uninstall |
Uninstall git hooks | rusted-yadm hook-uninstall |
hook-pre-commit |
Run pre-commit validation | rusted-yadm hook-pre-commit |
| Command | Description | Example |
|---|---|---|
config |
Manage configuration | rusted-yadm config core.encrypt true |
alt |
Manage alternate files | rusted-yadm alt create hostname |
bootstrap |
Run bootstrap script | rusted-yadm bootstrap setup.sh |
version |
Show version | rusted-yadm version |
Rusted-YADM uses YAML configuration files for advanced settings:
# ~/.config/rusted-yadm/config.yaml
core:
encrypt: true
permissions: preserve
hooks:
pre-commit:
validate_symlinks: true
validate_permissions: true
validate_encrypted: true
alt:
- class: "hostname"
pattern: "##HOSTNAME##"# Override repository location
export YADM_DIR="$HOME/.dotfiles"
# Override configuration file
export YADM_CONFIG="$HOME/.config/rusted-yadm/config.yaml"
# Set alternate file class
export YADM_CLASS="work"The built-in git hooks system provides automatic validation:
- Symlink Validation - Detects broken symlinks and resolves relative paths
- Permission Preservation - Maintains original file permissions
- Encrypted File Integrity - Validates encrypted file signatures
- Security Checks - Prevents committing potentially dangerous files
hooks:
pre-commit:
# Enable/disable specific validations
validate_symlinks: true
validate_permissions: true
validate_encrypted: true
# Custom validation rules
rules:
- name: "no-secrets"
pattern: "\\b(AWS_.*|API_KEY|SECRET)\\b"
message: "Potential secret detected in file"We welcome contributions! Please see our contributing guidelines for details.
# Clone the repository
git clone https://git.sr.ht/~m1n/rusted-yadm
cd rusted-yadm
# Install development dependencies
cargo install cargo-watch cargo-clippy
# Run tests
cargo test
# Check code style
cargo clippy -- -D warnings
# Format code
cargo fmtThis project is licensed under the European Union Public License (EUPL) - see the LICENSE file for details.
- Inspired by the original yadm project
- Built with amazing Rust libraries: clap, git2, serde
- Hosted on SourceHut - The hacker's forge
- Thanks to all contributors and the Rust community
Made with ❤️ by the Rusted-YADM community