Skip to content
docopt-based command line utility builder
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
lib
spec
.bettercodehub.yml
.codeclimate.yml
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE
README.md
Runfile
super_docopt.gemspec

README.md

Super Docopt

Gem Version Build Status Maintainability


Create command line utilities with ease. Super Docopt is an extension that provides syntactic sugar to Docopt


Install

$ gem install super_docopt

Getting Started

# my_command_line.rb
require 'super_docopt'

class MyCommandLine < SuperDocopt::Base
  version '1.0.0'
  docopt 'docopt.txt'
  subcommands ['download', 'upload']

  def download
    puts "#download called with #{args}"
  end

  def upload
    puts "#upload called"
  end
end

MyCommandLine.execute ARGV
# docopt.txt
My Command Line

Usage:
  mock download [--force]
  mock upload
  mock (-h|--help|--version)

See the examples folder for more examples.


You can’t perform that action at this time.