OSX Alfred Setup on your Mac

Jay McCormack
Jay’s Blog
Published in
2 min readMay 25, 2016

My scripting language of choice for Alfred workflows is ruby, not because I’m an expert but because I enjoy learning new programming languages and ruby seems to have good support online for learning and extending it with modules. Ruby is also supported by Alfred so it makes it easy to setup OSX Alfred workflows.

Ruby 2.0 is installed with OS X with El Capitan, Yosemite and Mavericks. There are some instructions here on installing ruby if you don’t have it already. You can check if it’s installed by running the following in a terminal window:

ruby -v

I can recommend ruby-toolbox.com for a gallery of plugins (gems) that is well indexed.

To use ruby with Alfred workflows you’re going to need (well at least want) at least one plugin that makes building script filters easier. The plugin allows you to programatically build the JSON output that Alfred 3 uses for listing items in the search box as a result of running a script. The plugin is called alfred-workflow-ruby, and you can install by running the following terminal command:

gem install alfred-3_workflow

I’ll be adding examples of ruby scripts that I’ve built or adapted here in the future.

Packages and OSX Alfred

I tend to find that as I try different packages I sometimes forget what I’ve installed and so you can use these commands to find out what packages you’ve installed and also remove ones you no longer need.

To see which packages you’ve installed:

gem list

And to remove a package you’ve installed you can use:

gem uninstall alfred-3_workflow

The other packages I’d typically installed include the following:

  • nokogiri — a great XML framework
  • plist — to read and write information from settings
  • httpclient — to be able to integrate with different web services

--

--

Jay McCormack
Jay’s Blog

Digital producer, father, geek (trying hard to raise the best geeks I can)