John Feminella wrote:
Does that sort of thing exist? I've noticed there are some apparently
more powerful alternatives like Thor, which is more of a full-stack
scripting framework, and I'm wondering what else might be useful to
take a look at.
Any and all suggestions would be much appreciated. Thanks!
I've done a quick comparison of Commander and GLI (git like interface)
(see prev post - "awesome cli").
1. Commander more downloads 3748, gli 1629 (source gemcutter).
2. gli offers scaffolding (generation of dir structure, and a program to
start off with containing tasks specified on command line.)
commander does not (from what i see), but I've written a similar ruby
script to generate the shell program.
3. Commander and gli both offer git like commands and help etc. However,
i think gli's command line parsing is not as complete as Commander,
which wraps over OptionParser - so if you know Optionparser you can
easily use it, and you don't lose what you are used to.
Both offer command aliasing, but it seems commander is better. Commander
allows you to alias a shortcut to a complex command.
4. Commander wraps over Highline, but i don't see that as a huge issue.
You can always use highline if you want separately.
Commander also has a decent Progressbar and a terminal-table output
5. GLI can read your program and generate an rdoc which gives help and
options. I don't see that in commander. Not v important, though.
6. GLI generates a directory structure, with gemspec/Rakefile etc,
Commander does not. I personally am using jeweler to create a project,
so I would rather not have to resolve between these 2.
7. GLI has pre and post handlers and on_error: if needed that can be
added in one's script anyway, i think.
All in all, after this quick comparison, it seems commander has an edge
for *my* needs. Yours could differ.
I'll probably start porting my next shell app to ruby in a few days
using Commander. HTH.
Posted via http://www.ruby-forum.com/.