Manage your dotfiles

A powerful, tag-based dotfile manager written in Rust. Effortlessly manage configurations, install tools, and sync your entire development environment across any machine or DevContainer.

A Complete Environment Manager

HermitGrab is more than a symlinker; it’s a complete environment manager.

Simple, Powerful Configuration

Define your entire environment as TOML file(s), in a directory structure that suits your needs.

hermit.toml
# This configuration file provides the fish shell
# It requires a unix-like OS and will not run if zsh is a tag
requires = ["fish", "+os_family=unix", "-zsh"]

# Choose exactly what to do if the file already exists
# Choose from soft- or hard-linking, or even copy
[[link]]
source = "config.fish"
type = "soft"
target = "~/.config/fish/config.fish"
fallback = "BackupOverwrite"

# Conditionally install aliases only when 'ripgrep' tag is active
[[link]]
source = "functions/egrep.fish"
target = "~/.config/fish/functions/egrep.fish"
requires = ["+ripgrep"]

# Patch VSCode settings in a DevContainer
[[patch]]
type = "JsonMerge"
source = "vscode_settings.json"
target = "~/.vscode-server/data/Machine/settings.json"
requires = ["user=vscode"]

# Install the fish shell
[[install]]
name = "fish"
# But only if not already installed
check = "command -v fish"
# Reference a snippet called ubi (universal binary installer)
install = """{{ snippet ubi }}
fish --install < {{ dir.this_dir }}/confirm.txt
"""
# Only on Linus
requires = ["+os=linux"]
# The ubi snippet uses variables to install from a URL, which is preprocessed to contain the arch_alias (arm64/amd64)
variables = { exe = "fish", url = "https://github.com/fish-shell/fish-shell/releases/download/4.0.2/fish-static-{{ tag.arch_alias }}-4.0.2.tar.xz" }

[[install]]
name = "fish"
check = "command -v fish"
# On MacOs we simply use brew
install = "brew install fish"
requires = ["+os=macos"]

# Profiles are a simply a named collection of tags
[profiles]
default = ["fish"]
personal = ["fish", "personal"]
work = ["fish", "work"]

# Detectors can automatically enable tags
[detectors]
has_git = { enable_if = "command -v git" }

# Customize your settings for different profiles
[[install]]
name = "Git Personal Email"
check = "[ $(git config --global --get user.email) = \"[email protected]\" ]"
install = """#!/bin/bash
git config --global user.name \"Definitly Myname\"
git config --global user.email \"[email protected]\"
git config --global user.signingkey \"ssh-ed25519 AAAAC3...\"
"""
requires = ["+personal", "+has_git"]

[[install]]
name = "Git Work Email"
check = "[ $(git config --global --get user.email) = \"[email protected]\" ]"
install = """#!/bin/bash
git config --global user.name \"Definitly Myname\"
git config --global user.email \"[email protected]\"
git config --global user.signingkey \"ssh-ed25519 AAAAC3...\"
"""
requires = ["+work", "+has_git"]

Powerful CLI

HermitGrab features a rich command-line interface, with an intuitive TUI planned for a future release.

Getting started on the CLI
Your favorite shell
# Login using Device-Login, list all repositories in your GitHub 
# with the HermitGrab Topic, or prompts to create one if it does not exist.
# Also respects the `GITHUB_TOKEN` environment variable.
hermitgrab init discover --create git-hub
# Alternatively, create a local directory and initialize a git repository.
hermitgrab init create
# Create a new hermit.toml in the `bash` directory 
# where all entries require the tag `bash`.
hermitgrab add config "bash" --requires "bash"
# Copy `.bashrc` to the `bash` directory and create a new link entry.
# When applied, an existing `.bashrc` is renamed to `.bashrc.bak`.
hermitgrab add link ~/.bashrc --config-dir "bash" --fallback "backupoverwrite"
# Add the bash tag to the default profile
hermitgrab add profile default --tag bash
# Check the status of the config vs the existing reality
hermitgrab status
# Apply the configuration 
hermitgrab apply

Get Started

HermitGrab is open source and ready to use. Get started in seconds with a single binary.

Install from hermitgrab.app

bash -c "$(curl -fsSL https://hermitgrab.app/install.sh)"

Download from GitHub

Download the latest release from GitHub.

Place the executable binary in a directory in your PATH, such as /usr/local/bin or ~/.local/bin. Make sure to grant it execute permissions with chmod +x <binary>.

Binaries

ArchitectureDownload Link
arm64 / aarch64hermitgrab-linux-aarch64
amd64 / x86_64hermitgrab-linux-x86_64

Decompress the file with tar -xvzf <mybinary>.tar.gz and copy it to your preferred execution location.

Tar.gz

ArchitectureDownload Link
arm64 / aarch64hermitgrab-linux-aarch64.tar.gz
amd64 / x86_64hermitgrab-linux-x86_64.tar.gz

With brew:

brew tap KarstenB/HermitGrab
brew install hermitgrab
⚠️
The released binaries are currently unsigned. MacOs Gatekeeper may not allow to run them.

Place the executable binary in a directory in your PATH, such as /usr/local/bin. Make sure to grant it execute permissions with chmod +x <binary>.

Binaries

ArchitectureDownload Link
arm64 / aarch64hermitgrab-macos-aarch64
amd64 / x86_64hermitgrab-macos-x86_64

Decompress the file with unzip <mybinary>.zip and copy it to your preferred execution location.

Zip

ArchitectureDownload Link
arm64 / aarch64hermitgrab-macos-aarch64.zip
amd64 / x86_64hermitgrab-macos-x86_64.zip
⚠️
The Windows build is experimental. Please report any bugs you encounter.
ArchitectureDownload Link
x86_64hermitgrab-windows-x86_64.zip

Or, build from source with Cargo

cargo install --git https://github.com/KarstenB/hermitgrab.git hermitgrab