Dotfig is a very simple opinionated CLI tool built in Rust to back up and restore your dotfiles or other configuration files.
Clone the repository:
git clone https://github.com/bobbymannino/dotfig.gitBuild and install Dotfig from the repository:
cargo install --path .Dotfig uses dotfig.json in the current directory by default. If it does not
exist, Dotfig creates it when you run a command.
List every configuration file Dotfig knows about:
dotfig --list --allAdd files to your configuration using their Group:Title names, then review the
configured paths:
dotfig --add "Zed:Settings"
dotfig --add "Git:Config"
dotfig --listBack up the configured files:
dotfig --backupRestore the live files from the backup:
dotfig --restoreWarning
Restoring replaces each configured live file with its backed-up copy.
Remove a file from the configuration with:
dotfig --remove "Git:Config"By default, backups are stored in a backups directory next to the config file.
Set savePath to use another location:
{
"paths": ["Zed:Settings", "Git:Config"],
"savePath": "~/Documents/dotfig"
}Use --config (or -c) to work with a different config file:
dotfig --config ~/dotfiles/dotfig.json --backupRun dotfig --help to see all available options.