Git-native dotfiles management that doesn't suck.
Move your dotfiles to ~/.config/lnk, symlink them back, and use Git like normal. That's it.
Your files live in ~/.config/lnk (a Git repo). Lnk creates symlinks back to original locations. Edit files normally, use Git normally.
You could git init ~/.config/lnk and manually symlink everything. Lnk just automates the tedious parts:
- Moving files safely
- Creating relative symlinks
- Handling conflicts
- Tracking what's managed
- lnk init [-r remote] - Create repo
- lnk add <files> - Move files to repo, create symlinks
- lnk rm <files> - Move files back, remove symlinks
- lnk status - Git status + sync info
- lnk push [msg] - Stage all, commit, push
- lnk pull - Pull + restore missing symlinks
- Single binary (~8MB, no deps)
- Atomic operations (rollback on failure)
- Relative symlinks (portable)
- XDG compliant (~/.config/lnk)
- 20 integration tests
lnk | Minimal | Just works, no config, Git-native |
chezmoi | High | Templates, encryption, cross-platform |
yadm | Medium | Git power user, encryption |
dotbot | Low | YAML config, basic features |
stow | Low | Perl, symlink only |
Q: What if I already have dotfiles in Git?
A: git clone your-repo ~/.config/lnk && lnk add ~/.vimrc (adopts existing files)
Q: How do I handle machine-specific configs?
A: Git branches, or just don't manage machine-specific files with lnk
Q: Windows support?
A: Symlinks work on Windows 10+, but untested
Q: Production ready?
A: I use it daily. It won't break your files. API might change (pre-1.0).
What we use:
- Runtime deps: Only cobra (CLI framework)
- Test deps: testify for assertions
- Build pipeline: Standard Makefile with quality checks
Before submitting:
Adding features:
- Put integration tests in test/integration_test.go
- Use conventional commits: feat:, fix:, docs: