Backup and restore your dotfiles straight from their original locations.
Snapfig copies your configuration files to a local vault (~/.snapfig/vault/) versioned with git. Unlike symlink-based tools, files stay in their original locations. Snapfig mirrors them on demand.
Why not symlinks? Real copies mean real redundancy. If originals break, you have actual backups.
snapfigNavigate with arrows, Space to select, F7 to backup, F8 to sync.
The TUI is optional. All operations work from the command line:
snapfig copy # Copy to vault
snapfig push # Push to remote
snapfig pull # Pull from remote
snapfig restore # Restore from vaultOr fire-and-forget setup for scripting:
snapfig setup \
--paths=".config/nvim:g,.zshrc:x,.bashrc:x" \
--remote="git@github.com:user/dotfiles.git"snapfig daemon startConfigurable intervals for copy, push, pull. See daemon docs.
The daemon is optional. Prefer cron? Use it:
0 * * * * snapfig copy
0 3 * * * snapfig pushConfig directories that are git repos (nvim, doom emacs, etc.):
[x]mode: Removes.gitin vault (clean copy)[g]mode: Renames.gitto.git_disabled(preserves history)
Originals are never modified.
go install github.com/adrianpk/snapfig@latestOr build from source:
git clone https://github.com/adrianpk/snapfig
cd snapfig
go build -o snapfig .Smart copySelective restoreBackground runnerFire-and-forget setup commandAlternative vault locationAutomated testsToken-based authentication for git cloud services
MIT
