Git-Like Interface Command Line Parser
- Author
-
Dave Copeland (davetron5000 at g mail dot com)
- Copyright
-
Copyright © 2010 by Dave Copeland
- License
-
Distributes under the Apache License, see LICENSE.txt in the source distro
This is a DSL you can use to create a command line interface like git, gem or svn, in that the first argument is a command, and there are global and command specific flags.
Use
Install if you need to:
gem install gli
The simplest way to get started is to create a scaffold project
gli init my_proj command_name other_command_name
This will create a basic scaffold project in ./my_proj
with:
-
executable in
./my_proj/bin/my_proj
. This file demonstrates most of what you need to describe your command line interface. -
an empty test in
./my_proj/test/tc_nothing.rb
that can bootstrap your tests -
a gemspec shell
-
a README shell
-
Rakefile that can generate RDoc, package your Gem and run tests
-
A
Gemfile
suitable for use with Bundler to manage development-time dependencies
Supported Platforms
Known to work on
-
1.8.7
-
1.9.2
Though likely works on various other versions.
Documentation
Extensive documentation is available at the wiki
Links
- davetron5000.github.com/gli
-
RubyDoc
-
- www.github.com/davetron5000/gli
-
Source on GitHub
-
- www.github.com/davetron5000/gli/wiki
-
Documentation Wiki
-
:include:gli.rdoc