clingon is a command-line option parsing library for Common Lisp. Its features include:
Support for subcommands
Support for command aliases
Support for short and long options
Related options may be grouped into categories
Short options may be collapsed into a single argument, as in
-xyzLong options support the notations
--long-opt argand--long-opt=argAutomatic generation of help/usage information for commands and subcommands
Out-of-the-box support for
--versionand--helpSupport for various kinds of options including string, integer, boolean, switch, enum, list, counter, filepath, etc.
Subcommands can look up global options defined in parent commands
Support for required options
Options can be initialized via environment variables
Single interface for creating options using
CLINGON:MAKE-OPTIONGenerate documentation for your command-line application
Support for
pre-hookandpost-hookactions for commands, which allow invoking functions before and after the respective handler of the command is executedSupport for Bash and Zsh completions
Extensibility, so if you don't find something you need you can extend it by developing a new option kind, or even a new mechanism for initializing options, e.g., by looking up an external key/value store