Download plugin: gurl Google URL Shortner (ver 2.1)

Important note: This plugin only functions with Alfred 1.x. It will not work with Alfred 2.

gurl is an (version 1.0) extension written to quickly shorten URLs using Google’s URL shortening service. You can download gurl v2.0 url shortener here (zip).

Update: It seems that Mountain Lion has a different version of grep than that available in Lion, and the new version breaks the gurl extension. I have put together version 2.0 of gurl to fix this issue. It has been rewritten to use PHP instead of relying on commandline tools.

Update 2: Version 2.1 of gurl was released today, July 7 2013, to fix bugs addressed by commenters Elvis and flackend. Thanks guys!


When you get a growl notification like this, your new shortened URL is in your clipboard ready to be pasted!

Hope you find this useful! Enjoy.

Alfred extension: Download gurl v2.1 url shortener (zip)

On the other extension: I originally wrote this extension before I was aware that another extension already existed. Oh well! :]


  1. john

    very useful extension. is there a way to shorten the url and the short link be stored in your google account to see the analytics? all this assuming that you’re logged in into your google account in your browser.


  2. flackend

    If you add the -n flag to your echo command it’ll remove the newline at the end of the string passed to the clipboard.

    echo $URL | pbcopy becomes echo -n $URL | pbcopy

  3. Sax

    Thanks! The other one uses “” instead of “”. The former worked for a long time, but since a few months or so it doesn’t return anything anymore.

  4. Mike Walker Author

    Hey guys! I’m glad you like the extension.
    I’m not sure why it would stop working.. it still works for me. Are you getting any errors or indications of what’s wrong?

    • ubersol

      I think it has something to do with the usage of grep. Your’s and the other one gives me the exact same error when I use it in command line. See below:

      usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
      [-e pattern] [-f file] [–binary-files=value] [–color=when]
      [–context[=num]] [–directories=action] [–label] [–line-buffered]
      [–null] [pattern] [file …]

      What I did was just to copy the contents of your extension into and chmod’ed it. ( chmod +x ). when executed as above grep complains about it. Running this on Mountain Lion and previosly on Lion. Same issue.

      • Mike Walker Author

        I believe you are right, ubersol. It looks like the -P flag isn’t working in the version of grep on Mountain Lion. This is pretty strange, since I believe both versions of OS X have the same versions of grep. I will confirm this when I check my machine at the office (still Lion).

        Regardless, I’ll fix this and post a new version shortly!

  5. Deniz

    Hey Just wanted to let you know, and I hope it is just me but your extension suddenly stopped working for me couple days ago. Very useful extension though…


  1. Stop the Presses: Alfred Hits 1.0 | Design City
  2. Stop the Presses: Alfred Hits 1.0 | Apple World
  3. Stop the Presses: Alfred Hits 1.0 | Mac.AppStorm

Leave a Reply