Show HN: Lnk – Git-native dotfiles manager

https://news.ycombinator.com/rss Hits: 5
Summary

Lnk 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. lnk init lnk add ~ /.vimrc ~ /.bashrc lnk push " setup " Install # Quick install (recommended) curl -sSL https://raw.githubusercontent.com/yarlson/lnk/main/install.sh | bash # Homebrew (macOS/Linux) brew tap yarlson/lnk brew install lnk # Manual download wget https://github.com/yarlson/lnk/releases/latest/download/lnk- $( uname -s | tr ' [:upper:] ' ' [:lower:] ' ) -amd64 chmod +x lnk- * && sudo mv lnk- * /usr/local/bin/lnk # From source git clone https://github.com/yarlson/lnk.git && cd lnk && go build . && sudo mv lnk /usr/local/bin/ Usage Setup # Fresh start lnk init # With existing repo lnk init -r git@github.com:user/dotfiles.git Daily workflow # Add files/directories lnk add ~ /.vimrc ~ /.config/nvim ~ /.gitconfig # Check status lnk status # Sync changes lnk push " updated vim config " lnk pull How it works Before: ~/.vimrc (file) After: ~/.vimrc -> ~/.config/lnk/.vimrc (symlink) Your files live in ~/.config/lnk (a Git repo). Lnk creates symlinks back to original locations. Edit files normally, use Git normally. Why not just Git? 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 Examples First time setup lnk init -r git@github.com:you/dotfiles.git lnk add ~ /.bashrc ~ /.vimrc ~ /.gitconfig lnk push " initial setup " On a new machine lnk init -r git@github.com:you/dotfiles.git lnk pull # auto-creates symlinks Daily edits vim ~ /.vimrc # edit normally lnk status # check what changed lnk push " new plugins " # commit & push Commands lnk init [-r remote] - Create repo - Create repo lnk add <files> - Move files to repo, create symlinks - Move files to repo, create symlinks lnk rm <files> - Move files back, remove symlinks - Move files back, remove symlinks lnk status - Git status...

First seen: 2025-05-24 12:40

Last seen: 2025-05-24 16:41