Introduction
π₯ dotato is simple.
- Write config file.
- Run dotato.
βοΈ Config files are clear.
- Define directories in
dotato.yaml
- Filter unnecessary files with
.dotatoignore
π Choose your mode.
- file mode: copy dotfiles into your backup directory (like snapshot)
- link mode: move dotfiles into your backup directory and leave symlink instead. (like stow)
OS Support
| OS |
Support |
| Linux |
β
|
| MacOS |
β
|
| Windows |
File mode: β οΈ
- It works with local drive. e.g.
C:\
- It doesn't work with network path. e.g.
\\wsl.localhost\
Link mode: β
- Any command that deletes symlink will fail.
|
Installation
With binaries
Download binary file in the dotato release page here.
With Go
If you have go, it is easy:
go install github.com/msisdev/dotato@latest
Some systems may require C library.
And make sure you have ~/go/bin in PATH env var.
Tutorial
Let's copy ~/.bashrc file into your backup directory.
Prepare your backup directory like this.
π
βββ πbash
β βββ π.dotatoignore
βββ βοΈdotato.yaml
Write dotato.yaml.
# dotato.yaml
version: v1
mode: file
groups:
bash: # same name of your group directory
nux: "~" # write directory of your dotfile
Write bash/.dotatoignore. It applies to both import/export.
#bash/.dotatoignore
* # ignore all
!.bashrc # but include .bashrc
Copy files into backup directory:
dotato import group bash nux
π
βββ πbash
β βββ β¨.bashrc # dotato created this
β βββ π.dotatoignore
βββ βοΈdotato.yaml
Copy dotato files back to their original place:
dotato export group bash nux
π
βββ πbash
β βββ π.bashrc # dotato will copy this to ~/.bashrc
β βββ π.dotatoignore
βββ βοΈdotato.yaml
Tips
CLI
- Use flag
-h to read hints.
dotato.yaml
- There is another entity 'plan' β select multiple groups.
- Create groups as many as you like.
- Create duplicate groups to maintain different versions.
- You can have many directory paths for one group β manage different machines.
.dotatoignore
- It works same with gitignore.
- You can define global rule - one ignore rule applied to all groups.
- Nest many dotatoignore files under group directory.
- Remember it is applied on both import/export command.
Advanced
Currently dotato doesn't provide advanced features.
- Templating
- Install script
- Password encryption
You can...
- Create issue and wait for support
- Use another tools like chezmoi, etc
- Use dotato API β engine β if you love dotato and ready to go down the rabbit hole.
If you decided to use dotato API, golang standard libraries will help.
- Use template to change file content.
- Use os.Exec to run external commands
- Use crypto to encrypt/decrypt file content.