Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfig

Dotfig is a very simple opinionated CLI tool built in Rust to back up and restore your dotfiles or other configuration files.

Usage

Clone the repository:

git clone https://github.com/bobbymannino/dotfig.git

Build 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 --all

Add files to your configuration using their Group:Title names, then review the configured paths:

dotfig --add "Zed:Settings"
dotfig --add "Git:Config"
dotfig --list

Back up the configured files:

dotfig --backup

Restore the live files from the backup:

dotfig --restore

Warning

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 --backup

Run dotfig --help to see all available options.

About

A simple CLI tool for creating and restoring backups for your dot files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages