A simple shell based configuration management tool
Olivier Mauras cc4c4bc709 Fix line return in file documentation 2 years ago
documentation/modules Fix line return in file documentation 2 years ago
libs Major refactor of code. Separate modules and states. Support self installation 2 years ago
modules modules/void_package: Add the same amount of verbosity than other modules 2 years ago
README.md Fix documentation path 2 years ago
shmgmt.sh There's no need to pass $SHELL and $INSTALLDIR to states anymore 2 years ago



shmgmt is a very simple configuration management tool in pure shell - Except for a Go binary that will handle git clones.
It tries to be fully POSIX shell compliant and has been tested with bash, dash, busybox ash.


When working with minimalist installs under 100MB on disk, it doesn't really make sense to install a configuration manager that can take even more size than your full system.
Typically this VoidLinux install with an added unbound service takes ~70MB on disk.

As an example here's the size of some tools on VoidLinux:

  • Ansible = 60MB
  • Puppet = 84MB
  • Salt = 73MB

Using one of this tools would amount to roughly double the disk space, while you already have a shell installed and usable at not cost.


  • Self contained - will install itself locally - set of shell scripts
  • Reasonably fast
  • Sync states from a Git repo
  • Defaults can be overriden from user defined config
  • Abstracted modules callable from states by their names, like: ${file}
  • States are easy shell scripts calling on modules: Check the example repo

Modules list

As of now the following modules exist:

  • directory
  • file
  • void_package
  • void_service

You can check per module documentation here


wget https://git.mauras.ch/shmgmt/shmgmt/raw/branch/master/shmgmt.sh -P /tmp
sh /tmp/shmgmt.sh -i
rm -f /tmp/shmgmt


By default shmgmt will point its $STATEREPO path to the example repo.
Override $STATEREPO in your own config file.

echo "STATEREPO=<my own state repo>" > ~/.shmgmt

You can also call shmgmt to look at an arbitrary located config file

shmgmt -c /arbitrary/path/to/shmgmt/config


-i: Install itself locally
-c <CONFIG>: Specify config file
-r <STATEREPO>: Git repo containing your state files
-d <STATEDIR>: Where to clone your states files locally