A cli tool for syncing a predefined list of dotfiles via a configuration to a github repository
Add the following to your ~/.zshrc
file
export PATH=${PATH}:`go env GOPATH`/bin
Install the binary with golang
go install github.com/cmdctl/dotfiles@latest
Or you can download the executables from the releases page
GitHub recently deprecated RSA SHA-1 ssh keys for programmatic usage. You would need to generate an ECDSA ssh key and add it to you GitHub account to enable sync to remote functionality.
ssh-keygen -t ecdsa
Create the following .dotfiles.yml
at your HOME
directory
touch ~/.dotfiles.yml
Add a list of dotfiles to sync with a reposiotory
version: "1.0"
include:
- .vimrc
- .zshrc
- .dotfiles.yml
Then run in your terminal
dotfiles
This will create a new repository in ~/.dotfiles directory and copy the specified files.
If you add a remote to the repository created by the dotfiles
executable it will automatically push the changes on
each run.
You can also add the binary to your
~/.zshrc
profile so that a sync is done on every new terminal session. Here is an example of my ~/.zshrc config where the binary is run on startup.
Contributions are always welcome!