yadm-config
Manage YADM (Yet Another Dotfiles Manager) configuration
TLDR
Set or update a yadm's Git configuration
Get a value from yadm's Git configuration
Unset a value in yadm's Git configuration
List all values in yadm's Git configuration
SYNOPSIS
yadm config [--local | --global | --system] <variable> [<value>]
yadm config [--local | --global | --system] --get <variable>
yadm config [--local | --global | --system] --set <variable> <value>
yadm config [--local | --global | --system] --unset <variable>
yadm config [--local | --global | --system] --list
yadm config [--local | --global | --system] --edit
PARAMETERS
--local
Act on the configuration specific to the current yadm repository.
--global
Act on the per-user global configuration, typically stored in ~/.config/yadm/config.
--system
Act on the system-wide configuration, typically found in /etc/yadm/config.
--get <variable>
Retrieve the value of a specific configuration variable.
--set <variable> <value>
Set the value of a specific configuration variable. If the variable already exists, its value is updated; otherwise, it is created.
--unset <variable>
Remove a specific configuration variable from the configuration file.
--list
List all configuration variables and their values from all applicable levels (system, global, local).
--edit
Open the relevant configuration file in an editor for manual editing. The editor is determined by the EDITOR environment variable or yadm's internal configuration.
<variable>
The name of the configuration variable to operate on (e.g., core.editor, yadm.encryptionMethod).
<value>
The value to set for the specified configuration variable.
DESCRIPTION
yadm-config, more commonly invoked as yadm config, is a subcommand of the yadm (Yet Another Dotfiles Manager) utility. It is used to get, set, or list configuration variables that control yadm's behavior. Similar to git config, it allows users to manage settings at different levels: local to the current yadm repository, global for the current user, or system-wide. These settings can control various aspects, such as the encryption method, the default editor, specific hooks, or remote repository details. It's a fundamental tool for customizing the yadm experience and ensuring it behaves as desired for different projects or environments.
CAVEATS
The command is an internal subcommand, meaning it's invoked as yadm config, not as a standalone yadm-config executable.
When reading configuration values, yadm searches for variables in the following order: local (repository), global (user), then system-wide. The first value found is used.
Modifying system-wide configuration requires appropriate permissions and affects all users on the system.
Be cautious when manually editing configuration files via --edit, as incorrect syntax can lead to issues.
CONFIGURATION FILE LOCATIONS
yadm stores configuration settings in specific files, depending on the scope:
Local: Stored within the yadm repository, typically at .yadm/config if yadm manages a directory, or at the root of a bare yadm repository. These settings apply only to that specific repository.
Global: For the current user, located at ~/.config/yadm/config or as specified by $XDG_CONFIG_HOME/yadm/config. These settings apply to all yadm repositories managed by the user unless overridden locally.
System: System-wide settings are usually found in /etc/yadm/config. These apply to all users and all yadm repositories on the system unless overridden by global or local settings.
VARIABLE NAMING CONVENTIONS
Configuration variables are typically structured hierarchically using dots ('.') to group related settings, similar to how git organizes its variables. Common categories include core for fundamental settings (e.g., core.editor), remote for remote repository configurations (e.g., remote.origin.url), and yadm for yadm-specific functionalities (e.g., yadm.encryptionMethod).
HISTORY
yadm was developed by Michael Smoler as a robust tool for managing dotfiles, designed to overcome limitations of traditional methods like symlinks or bare Git repositories. The yadm config subcommand was an integral part of its initial design, closely mirroring git config's functionality. This design choice provided a familiar and powerful mechanism for users to customize yadm's behavior, particularly concerning encryption settings, hooks, and repository-specific options, contributing significantly to yadm's flexibility and user-friendliness from its early stages.
SEE ALSO
yadm(1), git-config(1), yadm-bootstrap(1), yadm-encrypt(1)