Runfile - If Rake and Docopt had a baby
A beautiful command line application framework.
Rake-inspired, Docopt inside.
Wait, What?
Runfile lets you create command line applications in a way similar to Rake, but with the full power of Docopt command line options.
You create a Runfile, and execute commands with
run command arguments -and --flags.
Install
$ gem install runfile
Quick Start
$ run make
$ run --help
$ vi Runfile
Example
The most minimal Runfile looks like this:
usage "greet <name>"
action :greet do |args|
puts "Hello #{args['<name>']}"
end
You can then run it by executing this command:
$ run greet Luke
Hello Luke
Executing run without parameters, will show the usage patterns:
$ run
Usage:
run greet <name>
run (-h|--help|--version)
Executing run --help will show the full help document (docopt)
$ run --help
Runfile 0.0.0
Usage:
run greet <name>
run (-h|--help|--version)
Options:
-h --help
Show this screen
--version
Show version