I support a few open source libraries, all in Ruby.
User-Choices is a unified interface to configuration files (YAML or XML), command-line options and arguments, and the environment. It builds on the familiar OptionParser for handling command-line options.
Fluid provides dynamically scoped ("fluid") variables modeled after those of Common Lisp. It also gives you a convenient way to reversibly change the values of globals.