Add the following code to your project's shard.yml under:
to use in production
- OR -
development_dependencies to use in development
Warning: This tool is a work in progress. It has severe limitations. I'm working on this project in conjunction with another, extracting pieces of functionality that can belong in this package, able to be reused.
Quickly helps setup an opinionated CLI harness.
Add the dependency to your
dependencies: harness: github: Willamin/harness
require "harness" class MyApp::Cli < Harness::Cli @[Harness::Subcommand] def version STDOUT.puts("myapp 1.0.0") end end
Create a subclass of the type
Harness::Cli. This will get you setup with a harness for subcommand-style CLIs. To add a subcommand, write a method with the name of the subcommand and add the annotation
@[Harness::Subcommand]. This tells the harness to listen for this subcommand.
git checkout -b my-new-feature)
git commit -am 'Add some feature')
git push origin my-new-feature)