# ANNOUNCE: Hirb - A gem enhancing your script/console

**URL:** <https://www.ruby-forum.com/t/announce-hirb-a-gem-enhancing-your-script-console/164101>\
**Category:** Rails\
**Created:** [March 27, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/announce-hirb-a-gem-enhancing-your-script-console/164101 "2009-03-27T22:03:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cldwalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@cldwalker](https://www.ruby-forum.com/u/cldwalker)\
**Post date:** [March 27, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/announce-hirb-a-gem-enhancing-your-script-console/164101/1 "2009-03-27T22:03:20Z")

</div>

Hi,  
I’m announcing Hirb, a mini view framework which enables script/  
console to provide custom views.  
Out of the box your activerecord objects come back as ascii tables.  
You can also configure your tree-based models to return as ascii  
trees:  
Numeric  
|-- Float  
|-- Integer  
| |-- Bignum  
| `-- Fixnum |-- Date::Infinity `– Rational

I’ve written two tutorials on it:

> **[Tagaholic - Hirb - Irb On The Good Stuff](http://tagaholic.me/2009/03/13/hirb-irb-on-the-good-stuff.html)**
>
> Irb is a great place for interacting with Ruby. Unfortunately, even with the colorful help of wirble, it's not so great for visualizing the output of those interactions. Hirb aims to change that.

and

> **[Tagaholic - Ruby Class and Rails Plugin Trees With Hirb](http://tagaholic.me/2009/03/18/ruby-class-trees-rails-plugin-trees-with-hirb.html)**
>
> In my last post, I demonstrated how Hirb can render puurty tables with automated views. In this post, I'll show Hirb's new tree view using its console methods and these three examples- clas...

It’s also got some decent documentation: [RDoc Documentation](http://tagaholic.me/hirb/doc/)

To try it out: gem install cldwalker-hirb --source  
[http://gems.github.com](http://gems.github.com)

Enjoy!  
Gabriel

---

<div class="post-metadata">

**Author:** ![cldwalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@cldwalker](https://www.ruby-forum.com/u/cldwalker)\
**Post date:** [March 31, 2009, 6:09pm UTC](https://www.ruby-forum.com/t/announce-hirb-a-gem-enhancing-your-script-console/164101/2 "2009-03-31T18:09:02Z")

</div>

Gabriel,

This looks pretty cool! Quick question: is there a way to set this up  
to be used automatically from script/console and/or irb?

Thanks,

-Danimal

---

<div class="post-metadata">

**Author:** ![cldwalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@cldwalker](https://www.ruby-forum.com/u/cldwalker)\
**Post date:** [March 31, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/announce-hirb-a-gem-enhancing-your-script-console/164101/3 "2009-03-31T18:47:47Z")

</div>

> This looks pretty cool! Quick question: is there a way to set this up  
> to be used automatically from script/console and/or irb?

Should be able to just put the following into your ~/.irbrc

require ‘hirb’  
Hirb::View.enable

---

<div class="post-metadata">

**Author:** ![cldwalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@cldwalker](https://www.ruby-forum.com/u/cldwalker)\
**Post date:** [April 3, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/announce-hirb-a-gem-enhancing-your-script-console/164101/4 "2009-04-03T22:27:48Z")

</div>

Thanks Phillip. Danimal, if you’re using Hirb just for Rails, you can  
add it in config/environment.rb and only have  
it load when using script/console:  
if $0 == ‘irb’  
require ‘hirb’  
Hirb::View.enable  
end

Also, if you’re using Wirble make sure to put Hirb::View.enable after  
loading Wirble.

Gabriel
