Yet Another Dotfiles Manager
Go to file
Erik Flodin 42c74efbac
Add support for multiple local classes
A local class is set with:
$ yadm config local.class cls1

More classes can be added with:
$ yadm config --add local.class cls2
$ yadm config --add local.class cls3

Any of cls1, cls2 and cls3 can be used in an alternate condition.

For templates, the existing variable yadm.class/YADM_CLASS is set to
the last class (i.e. cls3) to remain compatible with how it works
today and with what the following command gives:
$ yadm config local.class

For the default template processor there is no explicit yadm.classes
variable. Instead a yadm.class condition will check against all

For the other processors, a new template variable YADM_CLASSES will be
set to all classes separated by newline. For jinja2 templates a class
can be checked with: {%- if "cls" in YADM_CLASSES.split("\n") %}

For esh templates the logic is a bit more complex, but it is possible
to do.

Fixes #185.
2021-12-27 21:14:09 +01:00
.github Run "make test" in github workflow 2020-12-30 12:54:13 +01:00
completion Fix compatibility bug with Git completions (#318) 2021-02-07 16:30:27 -06:00
contrib fix: Find symlinks in bootstrap-in-dir 2021-05-06 20:11:36 -07:00
test Add support for multiple local classes 2021-12-27 21:14:09 +01:00
.gitattributes Force `eol=lf` 2017-01-09 16:52:01 -06:00
.gitignore Use a common target to pick yadm to test in test/scripthost 2020-12-30 12:01:40 +01:00
CHANGES Update version number and update documentation 2021-08-23 08:25:10 -05:00
CONTRIBUTORS Update version number and update documentation 2021-04-03 12:00:02 -05:00
LICENSE Update GPLv3 LICENSE information 2019-03-14 18:25:02 -05:00
Makefile Fix Makefile portability 2021-11-25 22:30:43 +01:00 Fix arch-badge 2021-09-10 10:49:27 +02:00
bootstrap Standardize on &> when not appending output 2019-12-04 22:39:00 -06:00
pylintrc Add support for multiple local classes 2021-12-27 21:14:09 +01:00
pytest.ini Mark deprecated tests 2019-10-02 15:16:09 -05:00
yadm Add support for multiple local classes 2021-12-27 21:14:09 +01:00
yadm.1 Make order of attributes match precedence 2021-12-23 15:51:18 -06:00 fix “Mackbook” typo in manpage 2021-10-22 16:03:23 +02:00
yadm.spec Update version number and update documentation 2021-08-23 08:25:10 -05:00

yadm - Yet Another Dotfiles Manager

Latest Version Homebrew Version OBS Version Arch Version License
Master Update Develop Update Website Update
Master Status Develop Status GH Pages Status Dev Pages Status

yadm is a tool for managing dotfiles.

  • Based on Git, with full range of Git's features
  • Supports system-specific alternative files or templated files
  • Encryption of private data using GnuPG, OpenSSL, transcrypt, or git-crypt
  • Customizable initialization (bootstrapping)
  • Customizable hooks for before and after any operation

Complete features, usage, examples and installation instructions can be found on the website.

A very quick tour

# Initialize a new repository
yadm init

# Clone an existing repository
yadm clone <url>

# Add files/changes
yadm add <important file>
yadm commit

# Encrypt your ssh key
echo '.ssh/id_rsa' > ~/.config/yadm/encrypt
yadm encrypt

# Later, decrypt your ssh key
yadm decrypt

# Create different files for Linux vs MacOS
yadm add path/file.cfg##os.Linux
yadm add path/file.cfg##os.Darwin

If you enjoy using yadm, consider adding a star to the repository on GitHub. The star count helps others discover yadm.