- Colorized and output as comment by wirb and fancy_irb
- Nice IRB prompt and IRB’s auto indention
- Includes stdlib’s FileUtils:
- Many debugging helpers:
p, but on one line
Object#m– ordered method list (takes integer parameter: level of nesting)
Objedt#d– puts the object, returns self (using
- “Magical” information constants:
- Clipboard features:
- also available:
copy_outputfor session history
- also available:
vim(or another supported editor) to edit a file, close it and it gets loaded into your current irb session, powered by interactive_editor
- Another way of live loading into irb: sketches
- Highlight a string with
colorize('string')or a file with
ray('path'), powered by coderay
- Displays ActiveRecord database entries as tables with hirb
- Restart irb with
reset!or change the Ruby version with the
usemethod and rvm!
- Includes the current directory in the load path (was removed in 1.9.2 for security reasons, but is pretty annoying in IRB)
- Shorter requiring like this:
- And rerquiring with
- Try the included
Object#rihelper, powered by ori!
- Access to a lot of more commands with boson – call
commandsto get started
gem install irbtools
On Linux, you also need to
sudo apt-get install xclip
On MacOS, you can install growl to use the g gem.
To use it, put the following in your
~/.irbrc file (this file is loaded every time you start an IRB):
require 'rubygems' unless defined? Gem # only needed in 1.8 require 'irbtools'
If it does not exists, just create a new one.
It’s is possible to modify, which libraries get loaded:
# no require 'irbtools' require 'irbtools/configure' # edit libraries using Irbtools.add_library and Irbtools.remove_library Irbtools.start
You can add irbtools to
~/.rvm/gemsets/global and it will be installed automatically for new rubies.
By the way
Sometimes, you need a clean IRB without all the
.irbrc libraries. In such a case, just start
irb with the
-f option and it will suppress loading the
I’ve now released
irbtools-more, which installs even more useful gems, which may not build out-of-the-box.
- DrX object inspector:
- Better auto completion, using Bond