Rusted - Yet Another Dotfiles Manager
Find a file
m1n 069cde4870 docs: complete README redesign with comprehensive feature documentation
- Add professional badges and visual elements with emojis
- Restructure with clear sections: Features, Installation, Quick Start, Commands
- Document all new commands including git hooks, encryption, and configuration
- Add comprehensive configuration examples with YAML
- Include git hooks documentation with validation rules
- Add development setup instructions and contributing guidelines
- Update all repository URLs to use SourceHut (~m1n/rusted-yadm)
- Create quick start guide with step-by-step workflow
- Add command reference tables with examples
- Include environment variables and configuration options
2025-09-25 21:03:23 +01:00
.github/workflows fix: remove windows from binstall 2024-08-10 19:38:38 +02:00
.vscode chore: 📝 Update README formatting and add ignored words to VSCode settings for spell check 2024-08-10 19:02:09 +02:00
src fix: resolve symlink validation and test isolation issues 2025-09-25 20:54:48 +01:00
tests fix: resolve symlink validation and test isolation issues 2025-09-25 20:54:48 +01:00
.gitignore feat: 🎉 first commit 2024-08-10 15:37:34 +02:00
AGENTS.md fix: preserve file permissions when copying dotfiles to home directory 2025-09-25 19:16:45 +02:00
Cargo.lock feat: implement git hooks integration for pre-commit validation 2025-09-25 21:37:28 +02:00
Cargo.toml feat: implement git hooks integration for pre-commit validation 2025-09-25 21:37:28 +02:00
LICENSE Change LICENSE 2024-10-04 04:15:00 +02:00
README.md docs: complete README redesign with comprehensive feature documentation 2025-09-25 21:03:23 +01:00

🦀 Rusted-YADM (Yet Another Dotfile Manager)

License: EUPL Rust Crates.io Built with

A blazing fast, secure, and feature-rich dotfile manager written in Rust

FeaturesInstallationQuick StartCommandsConfigurationContributing

Features

🚀 Core Functionality

  • 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

🛠️ Advanced Features

  • 🔄 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

📦 Installation

Prerequisites

  • 🦀 Rust and Cargo (latest stable version)
  • 🌐 Git (for repository operations)

Quick Install

cargo install rusted-yadm

Build from Source

  1. Clone the repository:

    git clone https://git.sr.ht/~m1n/rusted-yadm
    cd rusted-yadm
    
  2. Build in release mode:

    cargo build --release
    
  3. Install locally:

    cargo install --path .
    

🚀 Quick Start

1. Initialize Your Dotfile Repository

# Initialize a new repository
rusted-yadm init

# Or clone an existing repository
rusted-yadm clone https://git.sr.ht/~m1n/dotfiles

2. Add Your First Dotfile

# Add your bash configuration
rusted-yadm add ~/.bashrc

# Add your Vim configuration
rusted-yadm add ~/.vimrc

3. Commit and Push Changes

# 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

🎯 Commands

📁 Repository Operations

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

📝 File Management

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

🔐 Security & Encryption

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

⚙️ Configuration

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

🔧 Configuration

Rusted-YADM uses YAML configuration files for advanced settings:

Example Configuration

# ~/.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##"

Environment Variables

# 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"

🎣 Git Hooks

The built-in git hooks system provides automatic validation:

🔍 Validations Performed

  • 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

⚙️ Hook Configuration

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"

🤝 Contributing

We welcome contributions! Please see our contributing guidelines for details.

Development Setup

# 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 fmt

📄 License

This project is licensed under the European Union Public License (EUPL) - see the LICENSE file for details.

🙏 Acknowledgments

  • 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

🔝 Back to top