dotato

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2025 License: MIT Imports: 1 Imported by: 0

README ΒΆ

πŸ₯” 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 Go

dotato is written in pure go. If you have go, it is easy:

go install github.com/msisdev/dotato@latest

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: 1.0.0

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 save many directories in 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.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL