Skip to content

dhamidi/shtuc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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/now

For details, see man 1 shtuc.

Installation

# Install in /usr/local
$ make test
$ sudo make install

The default installation location is /usr/local. If you want to install shtuc somewhere else, set PREFIX.

# Install somewhere else
$ PREFIX=/tmp make install

Customization

By 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.

Ideas

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

Author

Dario Hamidi <dario.hamidi@gmail.com>, 2013, Github

License

All code is licensed under the GNU GPL. Documentation is licensed under the GNU FDL.

About

simple configuration management (successor to stuc)

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages