Copies a file tree from a source directory to a destination directory. It is intended for restoring dotfiles and other configuration files from a Git repository.
Arguments must be absolute or relative paths. dotz does not expand shell syntax such as a quoted ~; use $HOME or let the shell expand an unquoted ~.
dotz [--config /path/to/dotz.yaml] "$SOURCE" "$DEST"For example, if a dotfiles repository stores the home-directory tree under home/:
dotz "$HOME/w/aryzing/dotfiles/home" "$HOME"Existing destination files are moved to a timestamped backup such as config.toml.bak.1750000000. Source files are copied, not hard-linked, so later edits to either file do not modify the other.
dotz looks for dotz.yaml beside the source directory. For a source at /path/to/dotfiles/home, the default config path is /path/to/dotfiles/dotz.yaml.
variables:
ssh-pubkey: ssh-ed25519 AAAA... example-commentConfigured values replace matching placeholders while files are copied:
signingkey = {{ ssh-pubkey }}
Whitespace inside a placeholder is optional. Placeholders without a matching variable are preserved, allowing application-specific templates such as {{branchName}} to pass through unchanged.
Use --config (or -c) when the config is elsewhere:
dotz --config "$HOME/.config/dotz/work.yaml" \
"$HOME/w/aryzing/dotfiles/home" \
"$HOME"An explicitly selected config must exist. If the default sibling dotz.yaml does not exist, files are copied without substitutions.