{"repo":"denisdefreyne/cri","free":true,"listed":false,"github":"https://github.com/denisdefreyne/cri","clone":"git clone https://github.com/denisdefreyne/cri.git","description":"A tool for building commandline applications","language":"Ruby","stars":123,"topics":["ruby","cli"],"license":"MIT","category":"cli-tools","readme_excerpt":"Cri Cri is a library for building easy-to-use command-line tools with support for nested commands. Requirements Cri requires Ruby 2.6 or newer (including Ruby 3.x). Compatibility policy Cri is guaranteed to be supported on any officially supported Ruby version, as well as the version of Ruby that comes by default on - the last two Ubuntu LTS releases - the last two major macOS releases Usage The central concept in Cri is the command , which has option definitions as well as code for actually executing itself. In Cri, the command-line tool itself is a command as well. Here’s a sample command definition: To run this command, invoke the #run method with the raw arguments. For example, for a root command (the command-line tool itself), the command could be called like this: Each command has automatically generated help. This help can be printed using Cri::Command#help ; something like this will be shown: General command metadata Let’s disect the command definition and start with the first five lines: These lines of the command definition specify the name of the command (or the command-line tool, if the command is the root command), the usage, a list of aliases that can be used to call this command, a one-line summary and a (long) description. The usage should not include a “usage:” prefix nor the name of the supercommand, because the latter will be automatically prepended. Aliases don’t make sense for root commands, but for subcommands they do. Command-line options The next few l","default_branch":null,"files":null,"tree":[],"storefront":"/r/denisdefreyne","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/denisdefreyne/cri/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}