OS X: Automated provisioning using Homebrew and Cask

published on

I'm changing my hardware quite frequently as I often end up unsatisfied with my current setup. Setting up a computer from scratch is a pain in the a** but restoring a backup implies carrying around configuration files, useless software and other stuff for years. So I've decided to create a script that would set up a new computer from scratch and configure it the way I want it to be.

Using Homebrew and Cask

Today Homebrew is the most widely adopted package manager for OS X and for a good reason: I provides almost any package you could imagine and let's you manage your apps in a sane manner. What Homebrew provides for command line tools, does Cask for OS X-native graphical applications. Cask has been developed as a plugin for Homebrew but is now integrated right into Homebrew. This is the perfect solution if you want to install all your applications automatically.

The Script

For my needs I created a shell script which set's my system up just the way I want it to be. There are also other ways, e.g. using Puppet to provision one or more machines. I will release a guide featuring automated provisioning on OS X using Puppet later on. But for now, here's the script, all necessary comments can be found inline: