From Dotfile Managers
Dotfile managers focus on one job: keeping dotfiles in sync between a repo and your home directory. Dotkit does that too, but it is also responsible for installing tools and packages and running any other setup steps. If you already use a dotfile manager, you can keep it, wrap it, or replace its symlinking with dotkit link.
Keeping your current tool
Section titled “Keeping your current tool”If your dotfile manager works well, don’t replace it. Call it from your dotkit file:
stow -t ~ dotfilesor
chezmoi applyThis is not a special integration. dotkit link is an ordinary command in a dotkit file, exactly like stow is, and swapping one line for the other changes nothing else. Dotkit handles order and bootstrap; your existing tool handles symlinking.
Subfolders are never descended into automatically, so a dotfiles/ folder sitting in your kit is inert until something names it. To have your kit hold the files but not link them, simply don’t reference the folder.
Replacing symlinking with dotkit link
Section titled “Replacing symlinking with dotkit link”Point dotkit link at the folder:
~/dotfiles/ .zshrc .gitconfig .config/nvim/init.luadotkit link ~/dotfilesEvery file is symlinked to the corresponding path under ~, mirroring the structure. Existing files are backed up with a timestamp before being replaced.
The destination defaults to ~. Pass a second argument for anywhere else.
Migrating into a kit
Section titled “Migrating into a kit”- Copy your dotfiles into
dotfiles/inside your kit - Add
dotkit link dotfilesto your dotkit file - Preview with
dotkit link --dry-run dotfiles - Apply with
dotkit link dotfiles, or run the whole kit
Existing files are backed up automatically, and a second run reports everything ok and changes nothing.
Comparison
Section titled “Comparison”| Dotfile managers | dotkit | |
|---|---|---|
| Symlinks dotfiles | Yes | Yes, via dotkit link |
| Templating, encryption | Often | No |
| Installs packages and tools | No | Yes |
| Bootstraps a bare machine | Sometimes | Yes |
| Works inside a project repo | Rarely | Yes, any directory with a .dotkit |
The overlap is one command. Everything else is a different job, which is why keeping both is a reasonable answer rather than a compromise.