A simple dotfile manager for personal use.
(use at your own risk)
- Symlink Management: Link and unlink files
- Encryption: Secure sensitive files with age encryption
- Shell Commands: Run shell commands from your configuration file
- Modular Setup: Include other configuration files
- Undo: Reverse actions when needed
$ dotr -h
usage: dotr [flags] [shell command]
<command>
run Run the default dotfile or the file indicated by -f flag
shell-command A convenient way to run shell commands in the directory where dotfile exists
flags:
-f, --file Specify config file (default: 'dotfile')
-r, --reverse Reverse actions (link → unlink, encrypt → decrypt)
-v, --verbose Show detailed output
--version Display version
-h, --help Show help
dotr looks for configuration in this order:
- File specified by
--file
flag - File specified by
DOTR_FILE
environment variable dotfile
in current directory
You can also run shell command directly, which executes in the same directory as your dotfile. Combined with the DOTR_FILE environment variable, this makes it convenient to run tasks from any directory (e.g., dotr git diff to check git changes in your dotfiles repository).
- Lines starting with
#
are comments - One action per line
- Format:
ACTION arg1:arg2:arg3...
- Actions are case insensitive
- Arguments are separated by
:
link src_file:dst_file
Creates a symbolic link. Reverse: unlink.
encrypt src_file:dst_file
Encrypts a file using age (passphrase only). Reverse: decrypt.
decrypt src_file:dst_file
Decrypts a file using age (passphrase only). Reverse: encrypt.
sh command arg1 arg2 ...
Runs a shell command.
include some_other_file
Includes another configuration file.
For examples, see waynezhang/configurations.