Skip to content
Switch branches/tags

MUSh Build Status

A multiple service URL shortener gem with command-line utilities

NOTE: This gem only supports url shortening, nothing else, no stats, no info, no expand and it won't support any of them.


MUSh depends on HTTParty

sudo gem install httparty
sudo gem install mush


sudo gem install mush --include-dependencies

Supported services


and thanks to Noel Dellofano from ZenDesk:

* custom service

and thanks to Alex Rodionov:


Usage as a command line utility

$ bitly -l login -k apikey -u

$ isgd

$ owly -k apikey -u

$ zaebz

$ shorten -s "{{url}}" -u

NOTE: The 'shorten' command uses Mush::Service::Custom and currently it only works with services that accept 'get' as method (not 'post') and with services that return only the shortened url not a full html page

Sorry, but at this moment, if you want to use the bitly or owly command line without apikey or login do this:

Add the following alias to your ~/.bash_profile or ~/.bashrc

alias bitly='bitly -l your_login -k your_apikey'

alias owly='owly -k your_apikey'

then use it this way (you won't need the -u)

$ bitly

$ owly

Usage as a Gem

require 'rubygems' #in a Rails project you won't need this line
require 'mush'

bitly =

bitly.login = "login"
bitly.apikey = "apikey"

bitly.shorten ""

isgd =
isgd.shorten ""

custom =
custom.set_service = "{{url}}"
custom.shorten ''


  • Use bitly commmand without -l and -k, save config in home folder (.mush file)
  • Make shorten method to accept multiple URLs
  • add and maybe other services
  • Cache

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature/service addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


Copyright (c) 2011 Rafael Magana. See LICENSE for details.


A Multi-service URL Shortener gem with command-line utility (,, and supported)




No packages published

Contributors 4