{"id":18471065,"url":"https://github.com/amitizle/optio","last_synced_at":"2025-07-12T05:07:41.670Z","repository":{"id":79149955,"uuid":"100647038","full_name":"amitizle/optio","owner":"amitizle","description":"A wrapper on Ruby's OptionParser for quickly setting up cli switches","archived":false,"fork":false,"pushed_at":"2017-08-20T19:57:49.000Z","size":335,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T18:44:41.099Z","etag":null,"topics":["option-parser","ruby","ruby-cli","ruby-gem","rubygems"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitizle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-17T21:33:21.000Z","updated_at":"2017-08-21T12:40:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"188ce75d-1124-4176-8465-60e3dcaffa2f","html_url":"https://github.com/amitizle/optio","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Foptio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Foptio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Foptio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Foptio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitizle","download_url":"https://codeload.github.com/amitizle/optio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253748715,"owners_count":21957972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["option-parser","ruby","ruby-cli","ruby-gem","rubygems"],"created_at":"2024-11-06T10:15:43.946Z","updated_at":"2025-05-12T13:35:36.223Z","avatar_url":"https://github.com/amitizle.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"  * [![Build Status](https://travis-ci.org/amitizle/optio.svg?branch=master)](https://travis-ci.org/amitizle/optio)\n  * [![Gem Version](https://badge.fury.io/rb/optio.svg)](https://badge.fury.io/rb/optio)\n\n# Optio\n\nA simple wrapper for Ruby's [OptionParser](https://ruby-doc.org/stdlib-2.4.1/libdoc/optparse/rdoc/OptionParser.html).\nThe aim of this library is to be able to use the powerful _OptionParser_ for it's most basic use, with an simpler\nsetup.\nFor things that are a bit more complicated than the very basic usage of options parsing for CLI tools, it's\nprobably better to use Ruby's _OptionParser_.\n\n\n## Installation\n\n```ruby\ngem 'optio'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install optio\n\n**Or**, install via [Rubygems](https://rubygems.org);\n\n```\n$ gem install optio\n```\n## Usage\n\nThe goal is to make the usage somehow similar to the _OptionParser_ one;\n\n```ruby\nrequire 'optio'\n\nparsed = Optio::Parser.new do |parser|\n  parser.switch :verbose, desc: \"Verbose!\", short: 'v', type: TrueClass\nend.parse!\n```\n\nWhere the types are the same ones that are specified [in here](https://ruby-doc.org/stdlib-2.4.1/libdoc/optparse/rdoc/OptionParser.html#class-OptionParser-label-Type+Coercion).\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/optio. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Optio project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/optio/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitizle%2Foptio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitizle%2Foptio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitizle%2Foptio/lists"}