Skip to content

limistah/heimdal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

158 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Heimdal

CI Release Crates.io License Rust Version Documentation

A universal dotfile and system configuration manager built in Rust

Heimdal automatically manages your dotfiles, installs packages, and keeps your development environment in sync across multiple machines. Built with Rust for performance and reliability.

πŸ“– Full Documentation | πŸ’¬ Discussions


⚑ Quick Start

Installation

Homebrew (macOS)

brew install limistah/tap/heimdal

APT (Debian/Ubuntu)

# One-line setup
curl -fsSL https://raw.githubusercontent.com/limistah/heimdal/main/scripts/install-deb.sh | bash

# Or manual
curl -fsSL https://limistah.github.io/heimdal/gpg | sudo gpg --dearmor -o /usr/share/keyrings/heimdal-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/heimdal-archive-keyring.gpg] https://limistah.github.io/heimdal/deb stable main" | sudo tee /etc/apt/sources.list.d/heimdal.list
sudo apt update && sudo apt install heimdal

Cargo (All Platforms)

cargo install heimdal

Universal installer

curl -fsSL https://raw.githubusercontent.com/limistah/heimdal/main/install.sh | bash

More installation options: Installation Guide β†’

Setup (2 minutes)

New to dotfiles?

heimdal wizard

The interactive wizard guides you through:

  • Smart scanning with real-time progress
  • Interactive file and package selection
  • Smart profile names (auto-generated from hostname/OS)
  • Git sync setup with remote configuration

Migrating from Stow, dotbot, chezmoi, yadm, or homesick?

heimdal wizard  # Choose "Import existing dotfiles"
heimdal import --path ~/.dotfiles --preview  # Preview before importing

Cloning to a new machine?

git clone <your-dotfiles-repo> ~/.dotfiles
cd ~/.dotfiles
heimdal apply

Learn more β†’


✨ Key Features

  • πŸ“¦ Universal Package Management - One config for Homebrew, APT, DNF, Pacman, and Mac App Store
  • πŸ”— Intelligent Symlinking - GNU Stow-compatible with automatic conflict resolution
  • 🎯 Smart Package Discovery - Native OS package manager search (brew, apt, dnf, pacman, apk)
  • πŸ” Secret Management - Secure storage using OS keychains (macOS Keychain, Linux Secret Service)
  • 🎨 Template System - Machine-specific configs with variable substitution
  • 🌿 Git-Based Sync - Keep configs in sync across machines with automatic conflict detection
  • 🎭 Profile System - Different configs for work, personal, and server machines
  • πŸ€– Interactive Wizard - Guided setup with smart defaults
  • πŸš€ Import Support - Migrate from Stow, dotbot, chezmoi, yadm, homesick
  • πŸ”„ Rollback Support - Easily revert to previous configurations
  • πŸͺ Hooks System - Run custom scripts before/after installation
  • πŸ” Dry-Run Mode - Preview changes before applying them

Explore all features β†’


πŸ“¦ Package System

Packages are declared directly in heimdal.yaml using a packages: section. Use common: for packages with the same name across all OS package managers, or per-manager keys (homebrew:, apt:, dnf:, pacman:, apk:) when names differ or a package is OS-specific. A top-level packages: section applies to all profiles; each profile can also define its own packages:.

heimdal:
  version: "1"
  repo: "[email protected]:you/dotfiles.git"

packages:
  common: [git, curl, vim, tmux]  # same name everywhere, every profile
  homebrew: [mas]                  # mac only, every profile

profiles:
  default:
    packages:
      common: [ripgrep, fzf]
      homebrew: [iterm2]
      apt: [build-essential]

  work:
    extends: default
    packages:
      homebrew: [slack, zoom]

Search & Install

# Search via the native OS package manager
heimdal packages search neovim

# Add a package to heimdal.yaml
heimdal packages add neovim

Supported Package Managers

  • macOS: Homebrew (formulae + casks), Mac App Store (via mas)
  • Debian/Ubuntu: APT
  • Fedora/RHEL/CentOS: DNF/YUM
  • Arch/Manjaro: Pacman
  • Alpine: apk

Smart Features

  • βœ… Dependency detection and suggestions
  • βœ… Installation status checking

πŸ—οΈ Architecture

limistah/heimdal (This repo)

The main CLI tool - installation, configuration, and management commands.

Contribute here for:

  • πŸ› Bug fixes and issue reports
  • ✨ New CLI features and commands
  • πŸ”§ Core functionality improvements
  • πŸ“š Documentation updates

Development Guide β†’

How It Works

User β†’ Heimdal CLI β†’ Package Manager (brew/apt/dnf/pacman/apk)
                    β”œβ”€β†’ Dotfile Management (GNU Stow compatible)
                    β”œβ”€β†’ Secret Management (OS Keychain)
                    └─→ Git Sync (with state management)

πŸ“š Documentation

For Users

For Contributors

Technical Docs


🎯 Example Configuration

Here's a minimal heimdal.yaml to get started:

heimdal:
  version: "1"
  repo: "[email protected]:you/dotfiles.git"

packages:
  common: [git, curl, vim, tmux]  # same name everywhere, every profile
  homebrew: [mas]                  # mac only, every profile

profiles:
  default:
    packages:
      common: [ripgrep, fzf]
      homebrew: [iterm2]
      apt: [build-essential]

  work:
    extends: default
    packages:
      homebrew: [slack, zoom]

More examples:


πŸš€ Usage Examples

Basic Workflow

# Initialize a new dotfiles repository
heimdal wizard

# Apply your configuration
heimdal apply

# Sync changes to/from Git
heimdal sync

# Check status
heimdal status

# Switch profiles
heimdal profile switch personal

# Validate configuration
heimdal validate

Package Management

# Search for packages via the native OS package manager
heimdal packages search ripgrep

# Add a package to heimdal.yaml
heimdal packages add ripgrep

# List installed packages
heimdal packages list --installed

Advanced Features

# Dry-run before applying
heimdal apply --dry-run

# Import from existing dotfiles
heimdal import --path ~/old-dotfiles

# Rollback to previous state
heimdal rollback

# View sync history
heimdal history

# Manage secrets
heimdal secret set API_KEY "secret-value"
heimdal secret get API_KEY

See full CLI reference β†’


πŸ’¬ Community & Support


🀝 Contributing

We welcome contributions! Here's how to get involved:

CLI Development

  1. Fork this repository
  2. Clone your fork: git clone <your-fork-url>
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes
  5. Run tests: cargo test
  6. Run clippy: cargo clippy --all-targets
  7. Commit your changes: git commit -m 'Add amazing feature'
  8. Push to your fork: git push origin feature/amazing-feature
  9. Open a Pull Request

See full CLI development guide β†’


πŸ”§ Directory Structure

Heimdal uses the following directories:

  • ~/.heimdal/ - Heimdal state and data
    • state.json - Current state (active profile, last sync, etc.)
    • backups/ - Backup of overwritten files
  • ~/.dotfiles/ - Default dotfiles directory (customizable via config)
  • /usr/local/bin/heimdal - Heimdal binary (or ~/.cargo/bin/heimdal)

πŸ“„ License

MIT License - see LICENSE for details


πŸ™ Acknowledgments


πŸ”— Links


Built by @limistah

About

Universal dotfile and system configuration manager

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors