Googlus is a Ruby wrapper around Google URL Shortener REST API.

I often use URL shortener services and I was like “It would be cool if I could use it in Textmate, in my Ruby code or on the command-line!” so I wrote this thin lib to be able to do that.


  • shorten URLs
  • expand URLs
  • analyse URLs usage


$ gem install googlus


In your Ruby code:

require 'rubygems'
require 'googlus'

On the command-line:

$ googlus -s # Shorten URL
$ googlus -e   # Expand short URL
$ googlus -a   # Get analytics for short URL


If you want to contribute you should take a look at:

Source can be cloned using Mercurial on my Bitbucket repo.

Problems, comments, and suggestions are welcome on the tracker.

This gem is released under the MIT license.

Leave a Comment