Over the Christmas period I found time to write a Ruby Gem called hacker_term which I’ve just published to RubyGems.
It allows you to see a list of the front page HN stories, sort them by title, score and number of comments as well as select a particular story using the arrow keys and launch it using the default browser.
It uses:
- Ruby curses module for terminal interaction
- The http://hndroidapi.appspot.com feed
- The Launchy gem for opening the browser
- The Clipboard gem for copying the article URL to the clipboard
You can find out more about the code on the Github page.
I’m sure this has been done to death before, but this incarnation was created to scratch a programming itch I had since reading about Etsy’s mctop gem -an example of Etsy once again providing inspiration.

I’m using the gem and it’s really great ; one more feature I’d like to see developed is the comments browsing! The feature seems to be present in hndroidapi and I’d like to help with the implementation but I’m definitely not very good at ruby!
Hey,
I installed hacker_term recently in my computer. When i type in “hacker_term” I am getting some weird error.
”
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’: no such file to load — json (LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /var/lib/gems/1.8/gems/hacker_term-0.0.3/bin/../lib/hacker_term/page_data.rb:1
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /var/lib/gems/1.8/gems/hacker_term-0.0.3/bin/../lib/hacker_term.rb:1
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /var/lib/gems/1.8/gems/hacker_term-0.0.3/bin/hacker_term:3
from /usr/local/bin/hacker_term:19:in `load’
from /usr/local/bin/hacker_term:19
”
Can you help me with this?
Thank you
-Vijay
Hi – I think you are using an old version of Ruby. Can you run ruby -v to confirm you are on 1.9.3 or greater? Thanks!