As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).

Before you compare Shortly to any other gem let me tell you that I did not build it to be used it only with “Rails”,(although you can use it if you want..) that means it is framework agnostic. I build it to put many terminal freaks(or homesick) (that’s what I love to call terminal people) at ease, So next time they want their url shortened, can use terminal (no need to fire a bloddy web browser taking a load of time just to start, so that they can login, get their url short.)


Oh please don’t ask this silly question you grown ups. But for newbie, fire up a terminal and type

Supported Services

Many services are supported as listed
Tinyurl This does not seem tiny at all
ShortSwitch For domain that uses this like
Be sure to cross check by #!ruby Shortly.active_services


Command Line Utility

Shortly provides command line utility. See some uses below:

shortly '' #uses googl service and shorten method by default

By default it uses Googl to short urls but you can specify which service to use. Type shortly -h for more info

shortly ‘’ -s bitly -l -p -m method-to-use

here are options and there possible values:

Options           What value do they take

-s or —service    Service to use(e.g. bitly, isgd(default googl))
-m or —method     Method to use(e.g. expand or shorten or analytics(default shorten))
-l or —login      Login credential (required for some services only)
-p or —apiKey     API Key credentials (required for some services only)

some more examples

IRB or ruby utility mode

You can use these utilities to any ruby environment

Note: We are developing many other services to stay tuned on github and RubyGems


About The Author

I am Pankaj Baagwan, a System Design Architect. A Computer Scientist by heart, process enthusiast, and open source author/contributor/writer. Advocates Karma. Love working with cutting edge, fascinating, open source technologies.

  • To consult Pankaj Bagwan on System Design, Cyber Security and Application Development, SEO and SMO, please reach out at me[at]bagwanpankaj[dot]com

  • For promotion/advertisement of your services and products on this blog, please reach out at me[at]bagwanpankaj[dot]com

Stay tuned <3. Signing off for RAAM