YADM(1)

πŸ’– YADM(1) β€” General Commands Manual πŸ’–

✨ NAME ✨

yadm β€” Yet Another Dotfiles Manager. yes bestie, that's the whole name, and it's iconic πŸ’…

🌸 SYNOPSIS 🌸

yadm command [options]

yadm git-command-or-alias [options]

yadm init [-f] [-w dir]

yadm clone url [-f] [-w dir] [-b branch] [--bootstrap] [--no-bootstrap]

yadm config name [value]

yadm config [-e]

yadm list [-a]

yadm bootstrap

yadm encrypt

yadm decrypt [-l]

yadm alt

yadm perms

yadm enter [command]

yadm git-crypt [options]

yadm transcrypt [options]

yadm upgrade [-f]

yadm introspect category

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so yadm is a tool for managing a collection of files across multiple computers, using a shared Git repository. No cap, that's the whole vibe: your dotfiles, one repo, many machines. It also has a feature to select alternate versions of files for particular systems (main character energy for your configs ✨). And lastly, yadm can manage a subset of secure files β€” those get encrypted before they're included in the repository. Obsessed, honestly. πŸ”₯

πŸ’œ COMMANDS πŸ’œ

okay bestie, here's the command lineup. buckle up πŸŽ€

git-command or git-alias

Any command that yadm doesn't internally handle gets passed straight through to git(1). Git commands or aliases are invoked with the yadm managed repository. The working directory for Git commands will be the configured work-tree (usually $HOME). Dotfiles are managed by using standard git commands β€” add, commit, push, pull, etc. Slay.

The config command is not passed directly through. Instead use the gitconfig command (see below). Not me warning you, just facts πŸ’…

alt

Create symbolic links and process templates for any managed files matching the naming rules described in the ALTERNATES and TEMPLATES sections. It is usually unnecessary to run this command, as yadm automatically processes alternates by default. This automatic behavior can be disabled by setting the configuration yadm.auto-alt to "false". So yeah, lowkey automatic unless you turn it off.

bootstrap

Execute $HOME/.config/yadm/bootstrap if it exists. That's it. That's the whole command. πŸŽ€

clone url

Clone a remote repository for tracking dotfiles. After the contents of the remote repository have been fetched, a "check out" of the remote HEAD branch is attempted. If there are conflicting files already present in the work-tree, the local version will be left unmodified and you'll have to review and resolve the difference. Important bestie: yadm doesn't just steamroll your local files. You gotta review, okay? 😭

The repository is stored in $HOME/.local/share/yadm/repo.git. By default, $HOME will be used as the work-tree, but this can be overridden with the -w option. yadm can be forced to overwrite an existing repository by providing the -f option. If you want to use a branch other than the remote HEAD branch you can specify it using the -b option. By default yadm will ask the user if the bootstrap program should be run (if it exists). The options --bootstrap or --no-bootstrap will either force the bootstrap to be run, or prevent it from being run, without prompting the user. Iconic. πŸ‘‘

config

This command manages configurations for yadm. It works exactly the way git-config(1) does. See the CONFIGURATION section for more details. Periodt.

decrypt

Decrypt all files stored in $HOME/.local/share/yadm/archive. Files decrypted will be relative to the configured work-tree (usually $HOME). Using the -l option will list the files stored without extracting them. So -l is the "just show me, don't touch" vibe πŸ‘€

encrypt

Encrypt all files matching the patterns found in $HOME/.config/yadm/encrypt. See the ENCRYPTION section for more details. Secure those secrets, bestie πŸ”

enter

Run a sub-shell with all Git variables set. Exit the sub-shell the same way you leave your normal shell (usually with the "exit" command). This sub-shell can be used to easily interact with your yadm repository using "git" commands. This could be useful if you are using a tool which uses Git directly, such as tig, vim-fugitive, git-cola, etc. It's giving "let me live in the git environment for a sec" ✨

Optionally, you can provide a command after "enter", and instead of invoking your shell, that command will be run with all of the Git variables exposed to the command's environment.

Emacs Tramp and Magit can manage files by using this configuration:

                  (add-to-list 'tramp-methods
                       '("yadm"
                         (tramp-login-program "yadm")
                         (tramp-login-args (("enter")))
                         (tramp-login-env (("SHELL") ("/bin/sh")))
                         (tramp-remote-shell "/bin/sh")
                         (tramp-remote-shell-args ("-c"))))

With this config, use (magit-status "/yadm::"). iykyk 🧚

git-crypt options

If git-crypt is installed, this command allows you to pass options directly to git-crypt, with the environment configured to use the yadm repository.

git-crypt enables transparent encryption and decryption of files in a git repository. You can read https://github.com/AGWA/git-crypt for details. Cute. πŸ’–

gitconfig

Pass options to the git config command. Since yadm already uses the config command to manage its own configurations, this command is provided as a way to change configurations of the repository managed by yadm. One useful case might be to configure the repository so untracked files are shown in status commands. yadm initially configures its repository so that untracked files are not shown. If you wish use the default Git behavior (to show untracked files and directories), you can remove this configuration.

yadm gitconfig --unset status.showUntrackedFiles

That's the one, bestie. 🫢

help

Print a summary of yadm commands. Simple. Iconic. 🌈

init

Initialize a new, empty repository for tracking dotfiles. The repository is stored in $HOME/.local/share/yadm/repo.git. By default, $HOME will be used as the work-tree, but this can be overridden with the -w option. yadm can be forced to overwrite an existing repository by providing the -f option. Starting fresh, slay πŸ’…

list

Print a list of files managed by yadm. The -a option will cause all managed files to be listed. Otherwise, the list will only include files from the current directory or below. So no -a = local-ish list, -a = the whole collection. Got it. ✨

introspect category

Report internal yadm data. Supported categories are commands, configs, repo, and switches. The purpose of introspection is to support command line completion. It's giving behind-the-scenes lore for your shell πŸ¦‹

perms

Update permissions as described in the PERMISSIONS section. It is usually unnecessary to run this command, as yadm automatically processes permissions by default. This automatic behavior can be disabled by setting the configuration yadm.auto-perms to "false". Permission vibe check, handled. πŸ”₯

transcrypt options

If transcrypt is installed, this command allows you to pass options directly to transcrypt, with the environment configured to use the yadm repository.

transcrypt enables transparent encryption and decryption of files in a git repository. You can read https://github.com/elasticdog/transcrypt for details. Another encryption bestie, we love to see it. πŸ’œ

upgrade

Version 3 of yadm uses a different directory for storing data. When you start to use version 3 for the first time, you may see warnings about moving your data to this new directory. The easiest way to accomplish this is by running "yadm upgrade". This command will start by moving your yadm repo to the new path. Next it will move any archive data. If the archive is tracked within your yadm repo, this command will "stage" the renaming of that file in the repo's index.

Upgrading will attempt to de-initialize and re-initialize your submodules. If your submodules cannot be de-initialized, the upgrade will fail. The most common reason submodules will fail to de-initialize is because they have local modifications. If you are willing to lose the local modifications to those submodules, you can use the -f option with the "upgrade" command to force the de-initialization. Bestie, that -f is for real losing local modifications β€” be sure, okay? 😭

After running "yadm upgrade", you should run "yadm status" to review changes which have been staged, and commit them to your repository.

You can read https://yadm.io/docs/upgrade_from_2 for more information. Upgrade era ✨

version

Print the version of yadm. That's it. Periodt. πŸ’…

✨ OPTIONS ✨

okay so yadm supports a set of universal options that alter the paths it uses. The default paths are documented in the FILES section. Any path specified by these options must be fully qualified. If you always want to override one or more of these paths, it may be useful to create an alias for the yadm command. For example, the following alias could be used to override the repository directory.

alias yadm='yadm --yadm-repo /alternate/path/to/repo'

The following is the full list of universal options. Each option should be followed by a path. No cap, every one needs a path. πŸŽ€

  • -Y, --yadm-dir β€” Override the yadm directory. yadm stores its configurations relative to this directory.
  • --yadm-data β€” Override the yadm data directory. yadm stores its data relative to this directory.
  • --yadm-repo β€” Override the location of the yadm repository.
  • --yadm-config β€” Override the location of the yadm configuration file.
  • --yadm-encrypt β€” Override the location of the yadm encryption configuration.
  • --yadm-archive β€” Override the location of the yadm encrypted files archive.
  • --yadm-bootstrap β€” Override the location of the yadm bootstrap program.

βš™οΈ CONFIGURATION βš™οΈ

okay so yadm has a whole config file situation and it lives at $HOME/.config/yadm/config πŸ’– and bestie, it uses the exact same format as git-config(1) β€” so if you already know git config you're literally already home.

and you can also poke at the contents of that file through the yadm config command, which β€” no cap β€” works exactly like git-config. so for example, if you wanna turn off alternates, you'd run:

yadm config yadm.auto-alt false

here's the full list of supported configurations, in all its glory πŸ‘‘

  • yadm.alt-copy β€” set this to "true" and alternate files become copies instead of symbolic links. lowkey useful, because some systems just don't properly support symlinks 🫠
  • yadm.auto-alt β€” turns off the automatic linking described in the ALTERNATES section. if you disable it you can still run yadm alt manually to make the alternate links yourself. enabled by default ✨
  • yadm.auto-exclude β€” kills the automatic exclusion of created alternate links, template files, and patterns defined in $HOME/.config/yadm/encrypt. enabled by default πŸ’…
  • yadm.auto-perms β€” disables the automatic permission changes described in the PERMISSIONS section. if disabled you can still run yadm perms manually to update permissions. enabled by default πŸŽ€
  • yadm.auto-private-dirs β€” disables the automatic creating of private directories described in the PERMISSIONS section.
  • yadm.cipher β€” picks which encryption system the encrypt/decrypt commands use. valid options are "gpg" and "openssl", and the default is "gpg". detailed info lives in the ENCRYPTION section 🌸
  • yadm.git-program β€” names an alternate program to use instead of "git". by default, the first "git" found in $PATH is used.
  • yadm.gpg-perms β€” disables the permission changes to $HOME/.gnupg/*. enabled by default πŸ”₯
  • yadm.gpg-program β€” names an alternate program to use instead of "gpg". by default, the first "gpg" found in $PATH is used.
  • yadm.gpg-recipient β€” asymmetrically encrypt files with a gpg public/private key pair πŸ—οΈ give it a "key ID" to specify which public key to encrypt with, and the key must exist in your public keyrings. multiple recipients can be specified (separated by space). if it's left blank or not provided, symmetric encryption is used instead. if set to "ASK", gpg will interactively ask for recipients. see the ENCRYPTION section for more details. disabled by default, so go turn it on if you want it πŸ’œ
  • yadm.openssl-ciphername β€” picks which cipher openssl should use. "aes-256-cbc" is the default bestie ✨
  • yadm.openssl-old β€” newer versions of openssl support the pbkdf2 key derivation function, and that's what's used by default. if you set this config to "true", openssl operations will use options compatible with older versions of openssl. > heads up: if you change this option, you'll need to recreate your encrypted archive. no skipping that part 😭
  • yadm.openssl-program β€” names an alternate program to use instead of "openssl". by default, the first "openssl" found in $PATH is used.
  • yadm.ssh-perms β€” disables the permission changes to $HOME/.ssh/*. enabled by default πŸ¦‹

🏠 the "local" configs 🏠

so there's this whole other set of "local" configurations and here's the thing β€” they are not stored in $HOME/.config/yadm/config. nope. they're stored in the local repository πŸ“

  • local.class β€” sets a class for the purpose of symlinking alternate files. by default, no class will be matched. the local host can be assigned multiple classes using the command:
yadm config --add local.class <additional-class>
  • local.arch β€” overrides the architecture for the purpose of symlinking alternate files.
  • local.hostname β€” overrides the hostname for the purpose of symlinking alternate files.
  • local.os β€” overrides the OS for the purpose of symlinking alternate files.
  • local.user β€” overrides the user for the purpose of symlinking alternate files.
  • local.distro β€” overrides the distro for the purpose of symlinking alternate files.
  • local.distro-family β€” overrides the distro family for the purpose of symlinking alternate files. 🌈

✨ ALTERNATES ✨

Bestie, when you're juggling a bunch of files across different systems, it's lowkey useful to have an automated way of picking an alternate version of a file for a different operating system, host, user, etc. πŸ’…

yadm will automatically create a symbolic link to the appropriate version of a file when a valid suffix is appended to the filename. That suffix contains the conditions that must be met for that file to be used.

The suffix begins with "##", followed by any number of conditions separated by commas.

##<condition>[,<condition>,...]

Each condition is an attribute/value pair, separated by a period. Some conditions do not require a "value", and in that case, the period and value can be omitted. Most attributes can be abbreviated as a single letter. Prefixing an attribute with "~" negates the condition, meaning the condition is considered only if the attribute/value pair evaluates to false.

[~]<attribute>[.<value>]
NOTE: Value is compared case-insensitive. πŸ‘€

These are the supported attributes, in the order of the weighted precedence:

  • template, t β€” Valid when the value matches a supported template processor. See the TEMPLATES section for more details. 🧚
  • user, u β€” Valid if the value matches the current user. Current user is calculated by running id -u -n.
  • hostname, h β€” Valid if the value matches the short hostname. Hostname is calculated by running uname -n, and trimming off any domain.
  • class, c β€” Valid if the value matches the local.class configuration. Class must be manually set using yadm config local.class <class>. See the CONFIGURATION section for more details about setting local.class.
  • distro_family, f β€” Valid if the value matches the distro family. Distro family is calculated by inspecting the ID_LIKE line from /etc/os-release (or ID if no ID_LIKE line is found).
  • distro, d β€” Valid if the value matches the distro. Distro is calculated by running lsb_release -si or by inspecting the ID from /etc/os-release.
  • os, o β€” Valid if the value matches the OS. OS is calculated by running uname -s.
  • arch, a β€” Valid if the value matches the architecture. Architecture is calculated by running uname -m.
  • default β€” Valid when no other alternate is valid.
  • extension, e β€” A special "condition" that doesn't affect the selection process. Its purpose is instead to allow the alternate file to end with a certain extension to e.g. make editors highlight the content properly.
NOTE: The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". 🐧✨

You may use any number of conditions, in any order. An alternate will only be used if ALL conditions are valid. For all files managed by yadm's repository or listed in $HOME/.config/yadm/encrypt, if they match this naming convention, symbolic links will be created for the most appropriate version.

The "most appropriate" version is determined by calculating a score for each version of a file. A template is always scored higher than any symlink condition. The number of conditions is the next largest factor in scoring; files with more conditions will always be favored. Negative conditions (prefixed with "~") are scored only relative to the number of non-negated conditions. Any invalid condition will disqualify that file completely.

If you don't care to have all versions of alternates stored in the same directory as the generated symlink, you can place them in the $HOME/.config/yadm/alt directory. The generated symlink or processed template will be created using the same relative path.

Alternate linking may best be demonstrated by example. Assume the following files are managed by yadm's repository:

  • $HOME/path/example.txt##default
  • $HOME/path/example.txt##class.Work
  • $HOME/path/example.txt##class.Work,~os.Darwin
  • $HOME/path/example.txt##os.Darwin
  • $HOME/path/example.txt##os.Darwin,hostname.host1
  • $HOME/path/example.txt##os.Darwin,hostname.host2
  • $HOME/path/example.txt##os.Linux
  • $HOME/path/example.txt##os.Linux,hostname.host1
  • $HOME/path/example.txt##os.Linux,hostname.host2

If running on a Macbook named "host2", yadm will create a symbolic link which looks like this:

$HOME/path/example.txt -> $HOME/path/example.txt##os.Darwin,hostname.host2

However, on another Mackbook named "host3", yadm will create a symbolic link which looks like this:

$HOME/path/example.txt -> $HOME/path/example.txt##os.Darwin

Since the hostname doesn't match any of the managed files, the more generic version is chosen. Iconic behavior, honestly. πŸ’…

If running on a Linux server named "host4", the link will be:

$HOME/path/example.txt -> $HOME/path/example.txt##os.Linux

If running on a Solaris server, the link will use the default version:

$HOME/path/example.txt -> $HOME/path/example.txt##default

If running on a Macbook with class set to "Work", the link will be:

$HOME/path/example.txt -> $HOME/path/example.txt##class.Work

Since class has higher precedence than os, this version is chosen. Slay. πŸ‘‘

If running on a system with class set to "Work", but instead within Windows Subsystem for Linux, where the os is reported as WSL, the link will be:

$HOME/path/example.txt -> $HOME/path/example.txt##class.Work,~os.Darwin

If no "##default" version exists and no files have valid conditions, then no link will be created.

Links are also created for directories named this way, as long as they have at least one yadm managed file within them.

yadm will automatically create these links by default. This can be disabled using the yadm.auto-alt configuration. Even if disabled, links can be manually created by running yadm alt.

Created links are automatically added to the repository's info/exclude file. This can be disabled using the yadm.auto-exclude configuration.

Class is a special value which is stored locally on each host (inside the local repository). To use alternate symlinks using class, you must set the value of class using the configuration local.class. This is set like any other yadm configuration with the yadm config command. The following sets the class to be "Work".

yadm config local.class Work

Similarly, the values of architecture, os, hostname, user, distro, and distro_family can be manually overridden using the configuration options local.arch, local.os, local.hostname, local.user, local.distro, and local.distro-family.

🧚 TEMPLATES 🧚

If a template condition is defined in an alternate file's "##" suffix, and the necessary dependencies for the template are available, then the file will be processed to create or overwrite files. ✨

Supported template processors:

  • default β€” This is yadm's built-in template processor. This processor is very basic, with a Jinja-like syntax. The advantage of this processor is that it only depends upon awk, which is available on most *nix systems. To use this processor, specify the value of "default" or just leave the value off (e.g. "##template").
NOTE: This template processor performs case-insensitive comparisions in if statements.
  • ESH β€” ESH is a template processor written in POSIX compliant shell. It allows executing shell commands within templates. This can be used to reference your own configurations within templates, for example:
<% yadm config mysection.myconfig %>

To use the ESH template processor, specify the value of "esh".

  • j2cli β€” To use the j2cli Jinja template processor, specify the value of "j2" or "j2cli".
  • envtpl β€” To use the envtpl Jinja template processor, specify the value of "j2" or "envtpl".
NOTE: Specifying "j2" as the processor will attempt to use j2cli or envtpl, whichever is available.

If the template processor specified is available, templates will be processed to create or overwrite files.

During processing, the following variables are available in the template:

  • yadm.arch β€” Jinja or ESH: YADM_ARCH β€” uname -m
  • yadm.class β€” Jinja or ESH: YADM_CLASS β€” Last locally defined class
  • yadm.classes β€” Jinja or ESH: YADM_CLASSES β€” All classes
  • yadm.distro β€” Jinja or ESH: YADM_DISTRO β€” lsb_release -si
  • yadm.distro_family β€” Jinja or ESH: YADM_DISTRO_FAMILY β€” ID_LIKE from /etc/os-release
  • yadm.filename β€” Jinja or ESH: (not listed) β€” Filename for the current file
  • yadm.hostname β€” Jinja or ESH: YADM_HOSTNAME β€” uname -n (without domain)
  • yadm.os β€” Jinja or ESH: YADM_OS β€” uname -s
  • yadm.source β€” Jinja or ESH: YADM_SOURCE β€” Template filename
  • yadm.user β€” Jinja or ESH: YADM_USER β€” id -u -n
  • env.VAR β€” Jinja or ESH: (not listed) β€” Environment variable VAR
NOTE: The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". 🐧
NOTE: If lsb_release is not available, DISTRO will be the ID specified in /etc/os-release.

Examples:

whatever##template with the following content:

{% if yadm.user == "harvey" %}
config={{yadm.class}}-{{yadm.os}}
{% else %}
config=dev-whatever
{% include "whatever.extra" %}
{% endif %}

would output a file named whatever with the following content if the user is "harvey":

config=work-Linux

and the following otherwise (if whatever.extra contains admin=false):

config=dev-whatever
admin=false

An equivalent Jinja template named whatever##template.j2 would look like:

{% if YADM_USER == 'harvey' -%}
config={{YADM_CLASS}}-{{YADM_OS}}
{% else -%}
config=dev-whatever
{% include 'whatever.extra' %}
{% endif -%}

An equivalent ESH templated named whatever##template.esh would look like:

<% if [ "$YADM_USER" = "harvey" ]; then -%>
config=<%= $YADM_CLASS %>-<%= $YADM_OS %>
<% else -%>
config=dev-whatever
<%+ whatever.extra %>
<% fi -%>

Created files are automatically added to the repository's info/exclude file. This can be disabled using the yadm.auto-exclude configuration.

πŸ” ENCRYPTION πŸ”

okay so bestie, sometimes you wanna manage confidential files β€” like SSH or GPG keys β€” across multiple systems, and that's valid. But putting plain text data into a Git repo? not it, especially because that repo often lives on a public system. yadm makes it easy to encrypt and decrypt a set of files so the encrypted version can be maintained in the Git repository. This feature will only work if a supported tool is available. Both gpg(1) and openssl(1) are supported. gpg is used by default, but openssl can be configured with the yadm.cipher configuration.

To use this feature, a list of patterns (one per line) must be created and saved as $HOME/.config/yadm/encrypt. That list of patterns should be relative to the configured work-tree (usually $HOME). For example:

.ssh/*.key
.gnupg/*.gpg

Standard filename expansions (*, ?, [) are supported. Two consecutive asterisks ** can be used to match all subdirectories. Other shell expansions like brace and tilde are not supported. Spaces in paths are supported, and should not be quoted. If a directory is specified, its contents will be included. Paths beginning with a ! will be excluded.

The yadm encrypt command will find all files matching the patterns, and prompt for a password. Once a password has been confirmed, the matching files will be encrypted and saved as $HOME/.local/share/yadm/archive. The "encrypt" and "archive" files should be added to the yadm repository so they are available across multiple systems.

To decrypt these files later, or on another system, run yadm decrypt and provide the correct password. After files are decrypted, permissions are automatically updated as described in the PERMISSIONS section.

Symmetric encryption is used by default, but asymmetric encryption may be enabled using the yadm.gpg-recipient configuration.

NOTE: It is recommended that you use a private repository when keeping confidential files, even though they are encrypted. πŸ’…

Patterns found in $HOME/.config/yadm/encrypt are automatically added to the repository's info/exclude file every time yadm encrypt is run. This is to prevent accidentally committing sensitive data to the repository. This can be disabled using the yadm.auto-exclude configuration.

Using transcrypt or git-crypt

A completely separate option for encrypting data is to install and use transcrypt or git-crypt. Once installed, you can use these tools by running yadm transcrypt or yadm git-crypt. These tools enables transparent encryption and decryption of files in a git repository. See the following web sites for more information:


πŸ›‘οΈ PERMISSIONS πŸ›‘οΈ

When files are checked out of a Git repository, their initial permissions are dependent upon the user's umask. Because of this, yadm will automatically update the permissions of some file paths. The "group" and "others" permissions will be removed from the following files:

  • $HOME/.local/share/yadm/archive
  • All files matching patterns in $HOME/.config/yadm/encrypt
  • The SSH directory and files, .ssh/*
  • The GPG directory and files, .gnupg/*

yadm will automatically update permissions by default. This can be disabled using the yadm.auto-perms configuration. Even if disabled, permissions can be manually updated by running yadm perms. The .ssh directory processing can be disabled using the yadm.ssh-perms configuration. The .gnupg directory processing can be disabled using the yadm.gpg-perms configuration.

When cloning a repo which includes data in a .ssh or .gnupg directory, if those directories do not exist at the time of cloning, yadm will create the directories with mask 0700 prior to merging the fetched data into the work-tree.

When running a Git command and .ssh or .gnupg directories do not exist, yadm will create those directories with mask 0700 prior to running the Git command. This can be disabled using the yadm.auto-private-dirs configuration.


πŸͺ HOOKS πŸͺ

For every command yadm supports, a program can be provided to run before or after that command. These are referred to as "hooks". yadm looks for hooks in the directory $HOME/.config/yadm/hooks. Each hook is named using a prefix of pre_ or post_, followed by the command which should trigger the hook. For example, to create a hook which is run after every yadm pull command, create a hook named post_pull. Hooks must have the executable file permission set.

If a pre_ hook is defined, and the hook terminates with a non-zero exit status, yadm will refuse to run the yadm command. For example, if a pre_commit hook is defined, but that command ends with a non-zero exit status, the yadm commit will never be run. This allows one to "short-circuit" any operation using a pre_ hook.

Hooks have the following environment variables available to them at runtime:

  • YADM_HOOK_COMMAND β€” The command which triggered the hook
  • YADM_HOOK_DATA β€” The path to the yadm data directory
  • YADM_HOOK_DIR β€” The path to the yadm directory
  • YADM_HOOK_EXIT β€” The exit status of the yadm command
  • YADM_HOOK_FULL_COMMAND β€” The yadm command with all command line arguments (parameters are space delimited, and any space, tab or backslash will be escaped with a backslash)
  • YADM_HOOK_REPO β€” The path to the yadm repository
  • YADM_HOOK_WORK β€” The path to the work-tree

πŸ“ FILES πŸ“

All of yadm's configurations are relative to the "yadm directory". yadm uses the "XDG Base Directory Specification" to determine this directory. If the environment variable $XDG_CONFIG_HOME is defined as a fully qualified path, this directory will be $XDG_CONFIG_HOME/yadm. Otherwise it will be $HOME/.config/yadm.

Similarly, yadm's data files are relative to the "yadm data directory". yadm uses the "XDG Base Directory Specification" to determine this directory. If the environment variable $XDG_DATA_HOME is defined as a fully qualified path, this directory will be $XDG_DATA_HOME/yadm. Otherwise it will be $HOME/.local/share/yadm.

The following are the default paths yadm uses for its own data. Most of these paths can be altered using universal options. See the OPTIONS section for details.

  • $HOME/.config/yadm β€” The yadm directory. By default, all configs yadm stores is relative to this directory.
  • $HOME/.local/share/yadm β€” The yadm data directory. By default, all data yadm stores is relative to this directory.
  • $YADM_DIR/config β€” Configuration file for yadm.
  • $YADM_DIR/alt β€” This is a directory to keep "alternate files" without having them side-by-side with the resulting symlink or processed template. Alternate files placed in this directory will be created relative to $HOME instead.
  • $YADM_DATA/repo.git β€” Git repository used by yadm.
  • $YADM_DIR/encrypt β€” List of globs used for encrypt/decrypt
  • $YADM_DATA/archive β€” All files encrypted with yadm encrypt are stored in this file.

🌟 EXAMPLES 🌟

  • yadm init β€” Create an empty repo for managing files
  • yadm add .bash_profile ; yadm commit β€” Add .bash_profile to the Git index and create a new commit
  • yadm remote add origin <url> β€” Add a remote origin to an existing repository
  • yadm push -u origin master β€” Initial push of master to origin
  • echo .ssh/*.key >> $HOME/.config/yadm/encrypt β€” Add a new pattern to the list of encrypted files
  • yadm encrypt ; yadm add ~/.local/share/yadm/archive ; yadm commit β€” Commit a new set of encrypted files

πŸ› REPORTING BUGS πŸ›

Report issues or create pull requests at GitHub:

https://github.com/yadm-dev/yadm/issues


πŸ‘‘ AUTHORS πŸ‘‘

  • Tim Byrne <sultan@locehilios.com>
  • Erik Flodin <erik@flodin.me>

🌈 SEE ALSO 🌈

git(1), gpg(1) openssl(1) transcrypt(1) git-crypt(1)

https://yadm.io/


and that's the whole page bestie β€” source/version 3.5.0, dated March 3, 2025, mwah πŸ’–πŸ’…πŸ«Ά

πŸ“¦ where this page comes from