geoffrey

Introduction

Geoffrey's your little helper, that who just wants to makes your life easier. It helps you install applications into your OS X system.

It will help you in two ways, with a command line application, and an API to let you create your own recipes.

If, like me, you use different computers at work, home, or even when travelling, you'll know it's a pain in the ass to keep everything up to date.

Inspired in the numerous dotfiles projects, specially holman's, the intention is to bring customization to a bigger extend.

Installation

 $ [sudo] gem install geoffrey

Command line

Type geoffrey to see help with the commands. Right now you can list the provided recipes, and install them.

$ geoffrey list
adium growl skype unrarx

$ geoffrey install adium
>> Adium is a free instant messaging application for Mac OS X that can connect to AIM, MSN, Jabber, Yahoo, and more.
>> Downloading http://adiumx.cachefly.net/Adium_1.3.10.dmg
:              100% |oooooooooooooooooooooooo|  21.3MB 451.6KB/s ETA:  00:00:00
>> Moving file to /Applications
>> Install successful

$ geoffrey install http://www.example.com/template.json --remote
>> Parsing http://www.example.com/template.json
...

$ geoffrey seach jabber
>> Adium: Adium is a free instant messaging application for Mac OS X that can connect to AIM, MSN, Jabber, Yahoo, and more.

API

Geoffrey has many talents, and thus you'll find he can help you in one of these areas:

Packages

If you ever used CiarĂ¡n Walsh's SIMBL plugins, you'll remember what a pain it is to install them every time. Now you can do so with the next piece of code:

require 'geoffrey'
Geoffrey.package do
  url 'http://www.culater.net/dl/files/SIMBL-0.9.7a.zip'
  options :sudo => true, :unless => Proc.new{ File.exists?("/Library/LaunchAgents/net.culater.SIMBL.Agent.plist") }
end

See Geoffrey::package for extended documentation.

Application Configuration

Everything in OSX seems to work around .plist files. This takes a little bit of work to figure out, but once you do, you can have your favourite apps the way you like. This is my script to get Terminal.app up and running with Pro scheme, Menlo Font 14pt, and a size 520x100.

require 'geoffrey'

Geoffrey.plist do
  file :terminal
  affects "/Applications/Utilities/Terminal.app"

  options["Default Window Settings"] = "Pro"
  options["Startup Window Settings"] = "Pro"
  options["HasMigratedDefaults"] = true
  options["Window Settings"]["Pro"]["Font"] = "bplist00\xD4\x01\x02\x03\x04\x05\x06\x18\x19X$version(..)"
  options["Window Settings"]["Pro"]["Font"].blob = true
  options["Window Settings"]["Pro"]["columnCount"] = 520
  options["Window Settings"]["Pro"]["rowCount"]    = 100
end

See Geoffrey::plist for extended documentation.