yadm-alt
Manage dotfiles across multiple machines
TLDR
Create symbolic links between alternate files manually
SYNOPSIS
yadm [options] command [arguments]
Common commands:
yadm init
yadm add <file>...
yadm commit [options]
yadm status
yadm pull
yadm push
yadm config <key> [<value>]
yadm bootstrap
yadm encrypt <file>...
yadm decrypt <file>...
PARAMETERS
--help, -h
Show help message and exit.
--version
Show version information and exit.
--batch, -b
Disable interactive prompts, useful for scripting.
--debug, -d
Enable debug output for detailed operation tracing.
--git, -g
Pass subsequent arguments directly to the underlying git command.
--repo <path>
Specify the path to the yadm repository (default: ~/.yadm).
--config <key>=<value>
Set a configuration variable for the duration of the command execution.
--gpg-decrypt
Force GPG decryption of files before processing them.
--gpg-encrypt
Force GPG encryption of files after processing them.
--no-gpg
Disable GPG processing for the current command.
--ignore-gpg-error
Continue execution even if GPG operations encounter errors.
init
Initializes a new yadm repository in the user's home directory.
add <file>...
Adds specified files or directories to the yadm repository.
commit
Records changes to the repository with a commit message.
status
Shows the working tree status, including untracked, modified, and staged files.
pull
Fetches changes from a remote repository and integrates them into the current branch.
push
Pushes local changes to a remote repository.
config <key> [<value>]
Gets or sets configuration options for yadm or the underlying git repository.
bootstrap
Runs initial setup scripts defined in the yadm repository.
encrypt <file>...
Encrypts specified files in the repository using GPG.
decrypt <file>...
Decrypts specified files in the repository using GPG.
remove <file>...
Removes files from the yadm repository and the working directory.
checkout [<branch>]
Switches branches or restores working tree files.
clone <repository>
Clones a yadm repository from a remote URL.
DESCRIPTION
YADM, or Yet Another Dotfiles Manager, is a powerful command-line tool designed to help users manage their configuration files (dotfiles) across multiple systems using Git. It simplifies the process of synchronizing, backing up, and deploying personalized settings by treating your dotfiles as a Git repository. Note: While the query refers to "yadm-alt", this analysis focuses on the widely recognized and standard "yadm" command, as "yadm-alt" is not a distinct standard utility and is likely a local alias or misnomer for "yadm".
Unlike simply symlinking files, YADM provides advanced features such as GPG encryption for sensitive data, templating capabilities, and the ability to define alternative files for different operating systems or environments. It integrates seamlessly with existing Git workflows, allowing users to leverage familiar commands for version control. By abstracting the complexities of dotfile management, YADM enables a consistent user experience across machines, making it an indispensable tool for developers and system administrators.
CAVEATS
While powerful, yadm requires a good understanding of Git concepts to be used effectively. Misuse can lead to data loss or configuration conflicts. GPG encryption setup can be complex and requires careful key management. It is designed for managing dotfiles, not as a general-purpose system configuration management tool.
ALTERNATIVE FILES
YADM supports 'alternative files' which allow different versions of a dotfile based on hostname, OS, or other criteria. For instance, you can have a ~/.bashrc.macos and ~/.bashrc.linux, and yadm will automatically symlink the correct one based on your system configuration. This is managed using the yadm alt command.
HOOKS
YADM provides a powerful hook mechanism similar to Git hooks. Users can place executable scripts in the ~/.yadm/hooks directory (e.g., bootstrap, pre-pull, post-commit). These hooks execute at specific points in yadm's lifecycle, enabling custom actions like installing software, setting up symlinks for non-dotfiles, or post-update cleanups.
GPG ENCRYPTION
For sensitive information like API keys or personal tokens within dotfiles, yadm offers integrated GPG encryption. Files can be encrypted directly within the repository, ensuring they remain secure even if the repository is publicly accessible. Yadm handles the encryption and decryption process seamlessly, provided GPG is properly configured.
HISTORY
YADM was created by ThePrimeagen (aka TJ DeVries) as a lightweight, Git-centric solution for managing dotfiles, aiming to be simpler and more flexible than other existing tools. It gained popularity for its direct integration with Git, allowing users to leverage all Git features while managing their personal configurations. Its development is community-driven, continuously evolving to meet the needs of users seeking an efficient and robust dotfile management system.