Clive

The option parser.

Quick Start

Install clive with:

gem install clive

And here's a quick example in use:

require 'clive'
      
module MyApp
  VERSION = '0.0.1'
  
  class CLI < Clive
    config name: 'myapp'
    
    opt :version, 'Display current version' do
      puts MyApp::VERSION
      exit 0
    end
  end
end

result = MyApp::CLI.run

That creates a script which when run with ./myapp --version displays the version! Now let's look at the more exciting stuff clive can do.

Learn About...