Linen
Linen is a framework for creating applications that use a command line interface. It features a simple plugin system, readline integration for history and completion, and other features.
Example Script
The simplest example is the math.rb script in the distribution. It defines a simple plugin and command that allows you to do basic math on two floating point numbers. Drop that code into a file, then start it:
superx ~/linen > ruby example.rb math >
You can then start exploring by issuing the help command. Be sure to check out the host.rb example for a more in-depth look at what you can do with Linen.
Download
You've got options! Linen is available as a gem, so a simple gem install linen should get you the newest version. You can also download archives from RubyForge or from this Trac:
- RubyForge Download Page
- Linen source -- look for the "Download Zip Archive" link at the bottom of the page.
License
Linen is released under the terms of the BSD license. See here for the actual license text.
