Skip to content
A Ruby Gem to parse command line options. Yes, another one!
Ruby Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Optioneer Gem VersionBuild Status

Dependency Status Coverage Status Code Climate Inline docs PullReview stats

A Ruby Gem to parse Command Line options. Yes, another one!

Note : There is no actual usable functionality in this Gem yet, it is still in the preliminary design stages.


Add this line to your application's Gemfile:

gem 'optioneer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install optioneer


TODO: Write usage instructions here

To Do

Thoughts in no particular order.

  • Add ability to set (optional) default value and type for each option
  • Choose default return value for registered flags that are not specified on command line (True / False / Nil?)
  • Add automatic 'inverse' flags - ie if --color is described then --no-color will return the inverse result
  • Automatically create short-form flags from the long-form if not specified.
  • Automatically provide --help and --version functionality along with the associated short-forms (-h and -v)


After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests (or simply rake). You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and/or a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the Pessimistic Version Constraint with two digits of precision. For example:

spec.add_dependency 'optioneer', '~> 1.0'

Of course, currently we have not even reached version 1, so leave off the version requirement completely. Expect any and all of the API and interface to change!


The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.