Skip to content

msisdev/dotato

Repository files navigation

🥔 dotato

dotato is a lightweight dotfile manager.

What is dotfile manager?

import

Import dotfiles

export

Export dotfiles

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

  1. Create issue and wait for support
  2. Use another tools like chezmoi, etc
  3. 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.

About

A dotfile manager using gitignore syntax.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages