An easy-to-use secure Dotfiles, Tasks and Scripts manager for UNIX systems (Linux, Macos, etc.)
Currently, it's in development; however, it can be used for stowing Dotfiles and running tasks.
User's example
Documentation example
Currently, operandum can only be installed using npm. To install it, run the following command:
npm install -g operandumPay attention that the package has to be installed using the -g flag to be
able to globally use the operandum commands.
Say, you have a directory with your dotfiles, tasks, and scripts at ~/.dotfiles ($HOME/.dotfiles). To initialize operandum, run the following command:
cd ~/.dotfiles
operandum initAfter running operandum init, you are going to be asked a few questions to set up the configuration file.
If you answered wrongly or want to change the configuration, you can run operandum reinit.
The configuration file is a single file - operandum.ini.
It is located in the root of the directory where you initialized operandum.
(For example, ~/.dotfiles/operandum.ini, where ~/.dotfiles is the root directory.)
The initial congifuration file is going to look like this:
; operandum - INI config file
dotfiles=dotfiles
tasks=tasksIf you changed the default values for Dotfiles and Tasks folders during your initialization,
you're going to see the following in your config:
dotfiles=(name of the folder you chose without parenthesis) and the same for the tasks.
To see properties for the configuration file, check the Configuration page.
Your Dotfiles folder's name is dotfiles by default. If you changed it,
you can see its name in operandum.ini configuration file.
Locations for stowing (or symlinking) your Dotfiles are defined in the locations.ini file.
The locations.ini file has a format of:
filename=/path/to/destination
exapmle=$HOME/.configNow, for the sake of the example, move your Dotfiles inside of the Dotfiles folder.
Say, you have the following structure:
--------------------------
~/.dotfiles (root folder)
--------------------------
| bin/
| | .local/...
| | testfile/...
| | test.txt
| | locations.ini
| | ^-- { ; locations.ini contents
| | ^-- { ; Wildcard '*' can be used
| | ^-- { *=$HOME
| git/
| | .gitconfig
| nvim/
| | .config/
| | | nvim/...
| | locations.ini
| | ^-- { ; locations.ini contents
| | ^-- { .config=$HOME
| .gitignore
| .gitmodules
| English.keylayout
| locations.ignore
| package.json
| package-lock.json
--------------------------
And your locations.ignore file looks like this:
English.keylayout
package.json
package-lock.json
So, what gets stowed where?
-
The files
English.keylayout,package.json, andpackage-lock.jsonare going to be ignored, because they are inlocations.ignore -
The files in the
binfolder are going to be stowed in the$HOMEdirectory.-
The
bin/.localfolder already (probably) exists in the$HOMEdirectory, which means its contents are going to be symlinked inside the$HOME/.localdirectory.
(For example,bin/.local/hello.txt->$HOME/.local/hello.txt) -
The
bin/testfilefolder doesn't exist in the$HOMEdirectory, so the whole folder oftestfilegoing to be symlinked to the$HOMEdirectory.bin/testfile->$HOME/testfile -
The
bin/test.txtfile is going to be symlinked to the$HOMEdirectory.bin/test.txt->$HOME/test.txt
-
-
The
gitdirectory doesn't have alocations.inifile, so it's files (NOT folders) are going to be symlinked to the$HOMEdirectory.git/.gitconfig->$HOME/.gitconfig -
The
nvim/.configfolder is going to be symlinked to the$HOME/.configdirectory.- But because the
$HOME/.configdirectory already exists, the contents of thenvim/.configfolder are going to be symlinked inside the$HOME/.configdirectory.nvim/.config/nvim->$HOME/.config/nvim
- But because the
-
There is no
locations.iniin the~/.dotfilesdirectory, so the remaining.gitignoreand.gitmodulesfiles are going to be symlinked to the$HOMEdirectory.-
.gitignore->$HOME/.gitignore -
.gitmodules->$HOME/.gitmodules
-
To stow your Dotfiles, run the following command:
operandum stow -fIMPORTANT: -f (force) is a recommended flag! Otherwise, the stowing process will stop if
the stowing-end-path is a symlink (i.e. a symlink exists)!
Tasks are a very powerful feature of operandum, featuring variables, built-in functions, and more.
Your Tasks folder's name is tasks by default. If you changed it,
you can see its name in operandum.ini configuration file.
The tasks are defined in separate YAML files (e.g., task1.yml, task2.yml, etc.) in the Tasks folder.
Because the Tasks and their compositon is a bit more complex,
there is a separate Task Documentation.
Here is also the documentation for Task Configuration and Built-in Functions
- they both can be found in the Task Documentation.
| Command | Usage | Description |
|---|---|---|
decrypt |
operandum decrypt <filename> |
AES-256-CBC decryption of a file |
deinit |
operandum deinit |
Removes operandum and its config file in the current directory |
encrypt |
operandum encrypt <filename> |
AES-256-CBC encryption of a file |
execute |
operandum execute <task-name> |
Execute a task from the Tasks |
help |
operandum help |
Shows a help message for operandum commands |
init |
operandum init |
Initializes operandum and its config file in the current directory |
reinit |
operandum reinit |
Reinitializes operandum in the current directory |
stow |
operandum stow -f |
Stows (symlinks) Dotfiles to their respective stow directories More simply, this commands puts your Dotfiles in their places |
update |
operandum update |
(Git) pull Dotfiles from the remote repository |
Errors and suggestions can be reported in the Issues section of the repository.
If you want to contribute to the project, you can fork the repository and create a pull request.
Contributions to documentation are also welcome.
This project is licensed under the MIT License - see the LICENSE file for details.