redding/cli.rb — pull request #1 by kellyredding (2013-02-10 21:02:52+00:00)
Title: Basic working prototype

@jcredding This is me trying to have something common to use when writing CLIs.

All this does is parse the `ARGV` for you and provide a list are args and an option hash. The idea is that you copy this into your CLI project (<60 loc) and use it. You build your CLI around the data it parses for you.

It does no handling for you, no validation, no help messages, no nothing except parse data. For the common `-h` and `-v` help/version flags, it will throw and your CLI show catch and handle this case.

The focus is:

* minimal, compact code (<60 loc)
* just parse data nicely for me
* clean option definition API

Anyway, look over this and give any feedback. I'm going to put it into some previous CLIs I've written and do some further eval on it.