= Git-Like Interface Command Line Parser

GLI is the best way to make a "command-suite" command-line application, e.g. one like <tt>git</tt> (for the best way to make a
simpler command-line application, check out methadone[http://www.github.com/davetron5000/methadone]).

GLI allows you to make a polished, easy-to-maintain command-line application without a lot
of syntax, but without restricting you in any way from the power of +OptionParser+.

* {Overview}[http://davetron5000.github.com/gli]
* {Source on Github}[http://github.com/davetron5000/gli]
* RDoc[http://davetron5000.github.com/gli/rdoc/index.html]

{<img src="https://secure.travis-ci.org/davetron5000/gli.png?branch=gli-2" alt="Build Status" />}[https://travis-ci.org/davetron5000/gli]

== Use

Install if you need to:

    gem install gli

The simplest way to get started is to create a scaffold project

    gli init todo list add complete

This will create a basic scaffold project in <tt>./todo</tt> with:

* executable in <tt>./todo/bin/todo</tt>.  This file demonstrates most of what you need to describe your command line interface.
* an empty test in <tt>./todo/test/default_test.rb</tt> that can bootstrap your tests
* an empty feature in <tt>./todo/features/todo.feature</tt> that can bootstrap testing your CLI via Aruba.
* a gemspec shell
* a README shell
* Rakefile that can generate RDoc, package your Gem and run tests
* A <tt>Gemfile</tt> suitable for use with Bundler to manage development-time dependencies

Now, you are ready to go:

    > cd todo
    > bundle exec bin/todo help
    NAME
        todo - Describe your application here

    SYNOPSIS
        todo [global options] command [command options] [arguments...]

    VERSION
        0.0.1

    GLOBAL OPTIONS
        -f, --flagname=The name of the argument - Describe some flag here (default: the default)
        --help                                  - Show this message
        -s, --[no-]switch                       - Describe some switch here

    COMMANDS
        add      - Describe add here
        complete - Describe complete here
        help     - Shows a list of commands or help for one command
        list     - Describe list here

    > bundle exec bin/todo help list
    NAME
        list - Describe list here

    SYNOPSIS
        todo [global options] list [command options] Describe arguments to list here

    COMMAND OPTIONS
        -f arg - Describe a flag to list (default: default)
        -s     - Describe a switch to list

All you need to do is fill in the documentation and your code; the help system, command-line parsing and many other awesome features are all handled for you.

Get a more detailed walkthrough on the {main site}[http://davetron5000.github.com/gli]

== Supported Platforms

Tests should be passing supported MRI Rubies (see +.travis.yml+ for specifics).

Due to the vagaries of Travis, I can't keep the test suite running on unsupported Rubies, however GLI has been used on older ones, like:

* 1.8.7
* 1.9.2
* 1.9.3
* Ruby Enterprise Edition 1.8.7
* JRuby 

== Documentation

Extensive documentation is {available at the wiki}[https://github.com/davetron5000/gli/wiki].

API Documentation is available {here}[http://davetron5000.github.com/gli/rdoc/index.html].  Recommend starting with GLI::DSL or GLI::App.

== Credits

Author::  Dave Copeland (mailto:davetron5000 at g mail dot com)
Copyright:: Copyright (c) 2010 by Dave Copeland
License:: Distributes under the Apache License, see LICENSE.txt in the source distro

== Links

* [http://davetron5000.github.com/gli] - RubyDoc
* [http://www.github.com/davetron5000/gli] - Source on GitHub
* [http://www.github.com/davetron5000/gli/wiki] - Documentation Wiki
* [http://www.github.com/davetron5000/gli/wiki/Changelog] - Changelog

= <code>gli</code> CLI documentation

:include:gli.rdoc
