IMPORTANT: This tool is superseded by cli-template. This tool still works and generates a fine CLI. The new one supports different templates and auto-completion.
thor_template
is a generator tool that builds a starter CLI project based on Thor. This blog post, Build Thor CLI Project in Under a Second, also covers usage and also contains a video demo.
gem install thor_template
thor_template new mycli
cd mycli
exe/mycli hello world
The above generated a starter CLI project called mycli with a working hello command. The generated project also has starter specs for you ๐
$ rake
rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
Foo::CLI
foo
should hello world
Finished in 0.09672 seconds (files took 0.20945 seconds to load)
1 example, 0 failures
$