The cmdlib package

An alternative to cmdargs, based on getopt. Comes with a powerful
attribute system. Supports complex interfaces with many options
and commands, with option & command grouping, while at the same
time keeping simple things simple.