Josh
Josh

Reputation: 21

Ruby libraries for command-prompt-based applications

I'm looking to create a Ruby application with a command-prompt-based interface. By "command-prompt-interface," I mean something similar to irb, but note that I do not mean actually executing Ruby code. The gems I'm finding via Google seem to be more suited to CLIs like git, not an actual prompt like irb.

I need to be able to define commands and handlers for those commands, so something like:

(prompt) helloworld
Hello World
(prompt)

Validation and a built-in help system would also be good extras, as would the ability to execute a single command from the command line (calling it from the shell cliapp.rb -c helloworld).

I'm able to create this from scratch, but if there are any libraries available I'd prefer to use that rather than reinventing the wheel.

Upvotes: 2

Views: 233

Answers (1)

Mark Thomas
Mark Thomas

Reputation: 37517

You may want to try Methadone, which was created by David Bryant Copeland, the author of the book "Build Awesome Command-Line Apps in Ruby". You may want to check out the book as well.

See this blog post for more information.

Upvotes: 1

Related Questions