shtuc makes managing software configuration easy by not requiring you
to think. Like git config, it just does The Right Thing™.
$ shtuc database/host localhost
$ shtuc database/host
localhost
$ shtuc now run date
$ shtuc now
Thu Dec 12 02:31:02 CET 2013
$ find .shtuc.d -type f
.shtuc.d/database/host
.shtuc.d/nowFor details, see man 1 shtuc.
# Install in /usr/local
$ make test
$ sudo make installThe default installation location is /usr/local. If you want to
install shtuc somewhere else, set PREFIX.
# Install somewhere else
$ PREFIX=/tmp make installBy default, shtuc looks for configuration settings in a directory
called .shtuc.d. It first checks for this directory in the current
directory, then in the parent git repository (if currently in one) and
then in a few other locations. This list is actually generated by
shtuc-path, so by providing your own version of shtuc-path you can
completely change the directories that are searched.
When writing settings, only the first line of output of shtuc-path is
taken into account. This way changes are as narrowly scoped as
possible.
If a file named .shtuc/unkown exists in one of the directories listed
by shtuc-path, the value of this file is used for any unknown
variables. Making this file executable allows for dynamic generation of
values, similar to ruby’s method_missing.
Since everything is just a file, new features can easily be added by just using standard tools:
- make configuration accessible over the network by running a httpd in
.shtuc.d - track configuration changes using git
- encrypt sensitive data using gpg
Dario Hamidi <dario.hamidi@gmail.com>, 2013, Github
All code is licensed under the GNU GPL. Documentation is licensed under the GNU FDL.