The link directive creates symbolic or hard links at specified locations pointing to files in your dotfiles repository.
Shortcut Syntax: A dictionary mapping link names (where the link will be created) to targets (files in your dotfiles directory). If the target is omitted, Dotbot uses the link name's basename (stripping a leading . if present).
Extended Syntax: Maps link names to configuration dictionaries for fine-grained control.
Key Configuration Parameters:
path: The target file in the dotfiles directory.type: Either symlink (default) or hardlink.create: If true, creates parent directories as needed.relink: If true, removes the old symlink before creating a new one.force: Forcefully removes an existing file/folder/link before creating the new link.backup: Creates a backup with suffix .dotbot-backup.{timestamp} if the file exists.relative: Uses a relative path for the symlink instead of an absolute path.canonicalize: Resolves target symlinks to their real paths (default: true).if: A shell command that must succeed for the link to be created.ignore-missing: If true, does not fail if the target is missing.glob: If true, treats path as a glob pattern to link all matched files.exclude: An array of glob patterns to exclude from a glob match.prefix: Prepends a string to the basename of each file when glob is true.
- link:
~/.config/terminator:
create: true
path: config/terminator
~/.vim: vim
~/.vimrc:
relink: true
path: vimrc
~/.zshrc:
force: true
path: zshrc
~/.hammerspoon:
if: '[ `uname` = Darwin ]'
path: hammerspoon
~/.config/:
glob: true
path: dotconf/config/**
~/:
glob: true
path: dotconf/*
prefix: '.'