5

I want to build a console-based application with Ruby. I quick googled and found all of these below libraries. Please someone suggest me which one should I use. Thank you.

  • OptionParser (http://ruby-doc.org/stdlib-1.9.3/libdoc/optparse/rdoc/OptionParser.html)
  • Thor (https://github.com/wycats/thor)
  • Rubikon (http://koraktor.de/rubikon/)
  • Trollop (http://trollop.rubyforge.org/)
  • Clamp (https://github.com/mdub/clamp)
  • Choice (http://choice.rubyforge.org/)
  • Methadone (https://github.com/davetron5000/methadone)
  • GLI (https://github.com/davetron5000/gli)
  • Commander (http://rdoc.info/github/visionmedia/commander/master/frames)
  • Main (https://github.com/ahoward/main)
  • CLAP (https://github.com/soveran/clap)
  • Optiflag (http://optiflag.rubyforge.org/)
  • Hirb (http://tagaholic.me/hirb/)
  • Boson (http://tagaholic.me/2009/10/14/boson-command-your-ruby-universe.html)
tonkla
  • 319
  • 3
  • 8
  • 3
    Can you describe what the specific needs of your application will be? Each of these libraries has its merits for different purposes. For example, if you're going to want to accept lots of different commandline arguments and options, then OptionParser can be great for that. If you want quick colored output or easy input with default options, then highline is a great lib. If you don't know what the app will do, then it's too soon to be deciding on the implementation. – Ben Taitelbaum Mar 06 '12 at 04:08
  • 2
    Methadone or Thor have by far the coolest names. Since you don't want to share what your application needs to do, there's not much anyone can do other than recommend by a cool name. – Marc Talbot Mar 06 '12 at 04:19
  • [Configliere](https://github.com/infochimps-platform/configliere) manages settings from many sources: static constants, simple config files, environment variables, commandline options, straight ruby. – zhon Oct 31 '16 at 21:03

1 Answers1

2

Ruby Toolbox is a website for comparing different gems. You may want to use it to evaluate which gems are reasonably popular.

You may find Really Cheap Command-Line Option Parsing in Ruby useful as well.

Community
  • 1
  • 1
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
  • 1
    Here's direct link to the CLI Option Parsers list https://www.ruby-toolbox.com/categories/CLI_Option_Parsers – Kirk Jul 30 '18 at 22:19