→ repl

12 December 2009

I've been playing with redis-cli a lot this year and at one point thought, "This would be great as a simple little shell."

So, repl. It turns any basic, non-interactive program into an interactive one.

In other words, this:

$ redis-cli set name chris
OK
$ redis-cli get name
chris

Becomes this:

$ repl redis-cli
>> set name chris
OK
>> get name
chris

If you have rlwrap installed you even get the full benefits of readline: history, reverse searches, etc.

What's more, the contents of any file in ~/.repl matching the name of the command you're running will be used as a completion list. See the repl-completion project (still in its infancy) for more info.

Check out the README, manual, or just install it as a gem:

$ gem install repl -s http://gemcutter.org/

Enjoy.