LinuxCommandLibrary

yadm

Git-based dotfiles manager

TLDR

Initialize a new dotfiles repository

$ yadm init
copy
Clone an existing dotfiles repository
$ yadm clone [https://github.com/user/dotfiles.git]
copy
Add a file to be tracked
$ yadm add [~/.bashrc]
copy
Commit changes
$ yadm commit -m "[message]"
copy
Push to remote
$ yadm push
copy
Pull updates from remote
$ yadm pull
copy
List managed files
$ yadm list -a
copy
Encrypt sensitive files
$ yadm encrypt
copy
Decrypt files
$ yadm decrypt
copy

SYNOPSIS

yadm command [options]

DESCRIPTION

yadm (Yet Another Dotfiles Manager) manages dotfiles using Git while keeping them in their natural locations in $HOME. Any Git command works with yadm, making it easy to learn for Git users.
The repository is stored in ~/.local/share/yadm/repo.git with $HOME as the working tree. Files stay in place; yadm tracks them without requiring symlinks or copying.
Key features include alternate files (system-specific configurations based on hostname, OS, or user), templates using Jinja2 or envtpl for dynamic configuration, and encryption for sensitive data using GPG, OpenSSL, transcrypt, or git-crypt.
The bootstrap command runs ~/.config/yadm/bootstrap after cloning, enabling automated setup of new machines.

COMMANDS

init

Initialize a new dotfiles repository
clone url
Clone a remote dotfiles repository
add file...
Add files to the repository
commit
Record changes to the repository
push
Upload changes to remote repository
pull
Download changes from remote repository
list [-a]
List managed files (-a for all)
encrypt
Encrypt files matching patterns in ~/.config/yadm/encrypt
decrypt
Decrypt files from the encrypted archive
alt
Create symbolic links and process templates for alternate files
enter
Run a sub-shell with Git variables set
config
Manage yadm configuration (works like git config)
bootstrap
Run the bootstrap script if it exists

CAVEATS

yadm requires Git; encryption features require GPG or another supported tool. The working tree is $HOME by default, so be careful with destructive Git operations. Alternate files and templates may need manual yadm alt after changes.

HISTORY

yadm was created by Tim Byrne as a simple dotfiles manager that leverages Git directly without complex abstractions. First released around 2015, it gained popularity for its philosophy that managing dotfiles should be as simple as using Git, while adding features like encryption and system-specific alternates.

SEE ALSO

git(1), stow(1), chezmoi(1), dotbot(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community