yadm
Manage dotfiles across multiple computers
TLDR
Override the yadm directory. yadm stores its configurations relative to this directory
Override the yadm data directory: yadm stores its data relative to this directory
Override the location of the yadm repository
Override the location of the yadm configuration file
Override the location of the yadm encryption configuration
Override the location of the yadm encrypted files archive
Override the location of the yadm bootstrap program
SYNOPSIS
yadm [options] [command] [arguments]
PARAMETERS
init
Initializes a new yadm repository in the user's home directory.
add
Adds specified files or directories to the yadm repository for tracking, similar to git add.
commit [options]
Records changes to the repository, identical to git commit.
push [options]
Updates remote references along with associated objects, identical to git push.
pull [options]
Fetches from and integrates with another repository or a local branch, identical to git pull.
clone
Clones a yadm repository from a remote location, configuring it for your system.
bootstrap
Executes a custom bootstrap script (e.g., ~/.yadm/bootstrap) after cloning or for initial setup.
encrypt
Encrypts specified files using GPG before adding them to the repository.
decrypt
Decrypts previously encrypted files within the repository.
status
Shows the working tree status, identical to git status.
diff
Shows changes between commits, commit and working tree, etc., identical to git diff.
config
Manages yadm-specific configuration settings or proxies to git config.
-h, --help
Displays help information for yadm or a specific command.
-v, --version
Displays the yadm version.
DESCRIPTION
yadm (Yet Another Dotfile Manager) is a powerful command-line tool designed to manage your dotfiles (configuration files) by leveraging Git. Unlike managing dotfiles directly within your home directory, yadm maintains its Git repository in a separate, dedicated location (typically ~/.yadm). It then either symlinks or copies the tracked files into your home directory, keeping your setup clean while utilizing Git's full capabilities for version control, branching, and remote synchronization.
Users can easily track, commit, and push changes to their configuration files, share them across multiple machines, and handle machine-specific settings through templating and alternative branches. yadm also includes features like file encryption using GPG for sensitive data and the ability to execute bootstrap scripts for initial system setup or post-clone configurations.
CAVEATS
yadm requires Git to be installed on your system. For file encryption and decryption features, GPG (GNU Privacy Guard) must also be available. Users should be familiar with basic Git workflows, as yadm primarily acts as a wrapper around Git commands. Care should be taken when adding sensitive files, ensuring they are properly encrypted or excluded to avoid exposing personal data.
INITIAL SETUP AND USAGE
To begin managing your dotfiles with yadm, first initialize a new repository using yadm init. Then, add your desired configuration files, for example, yadm add ~/.bashrc ~/.gitconfig. Commit your changes with yadm commit -m "Initial dotfiles". To synchronize with a remote repository, you can add a remote and push (e.g., yadm remote add origin git@github.com:user/dotfiles.git followed by yadm push -u origin master), or clone an existing repository with yadm clone <repository_url>. After cloning, the yadm bootstrap command can be used to execute a setup script for system-specific configurations or initial package installations.
TEMPLATING AND ALTERNATIVES
yadm supports flexible templating, allowing for machine-specific configurations. Files ending with .yadm (e.g., ~/.gitconfig.yadm) are processed as templates, typically using Jinja2 syntax. This enables embedding conditional logic based on hostname, operating system, or other variables within your dotfiles. Furthermore, yadm provides mechanisms to manage different versions of files for specific systems or purposes by utilizing Git branches or defining alternative file locations, offering powerful adaptability for diverse environments.
HISTORY
yadm was developed by Mike Boone (TheCyberSaint) to offer a streamlined, Git-centric approach to managing dotfiles. Its creation was driven by the desire for a tool that leverages Git's full power without the common pitfalls of directly initializing a Git repository in the home directory, or the complexities of more opinionated dotfile managers. The project focuses on being a thin, intuitive wrapper around Git, making it immediately familiar to users already comfortable with Git, and emphasizing simplicity and direct control over dotfiles.