Ruby Dialog Interface

Get Version 0.5.0

→ ‘rdialog’


Interface with the command-line curses interface dialog, and rapidly develop simple dialog-driven TUI applications


Install dialog on your machine.

sudo gem install rdialog

The basics

After installation is complete, require the gem in your source code, and away you go!

RDialog handles the interface between ruby scripts and dialog’s command-line interface. RDialog accepts input as arrays and/or strings, and returns similar objects.

Once you have initialized an instance of RDialog via
, options can be set that will persist throughout the lifetime of the instace. For example:

dialog =
dialog.shadow = false

This will prevent dialog from drawing shadows around all further boxes.

Demonstration of usage

require "rdialog" 

items =
items.push(["", "a cool server", false])
items.push(["", "an even cooler server!", false])
items.push(["", "quite cool as well", true])

dialog =

dialog.nocancel = true
selected_item = dialog.radiolist("ssh to:", items)

exec("ssh sweeper@" + selected_item)



This code is free to use under the terms of the MIT licence.


Comments are welcome. Send an email to Aleks Clark.

Dr Nic, 21st May 2007
Theme extended from Paul Battley