Setting up a new computer is the most fun. Who doesn’t love spending a whole day downloading and installing software, adding licenses, and configuring preferences?

Right??

This post is about how I made my own computer setup easier and repeatable so I can quickly get to work with a fancy new MacBook Pro that we’re sure to get very soon (right, Apple? Say yes. Please. Seriously. Please.).

While a new machine setup is not something you do very often, I wondered how much of the process could be automated, so it could be repeated time and again without missing favorite customizations and apps along the way.

My ideal set up

I should start by explaining how I like to set up my machine. I’m a product designer, developer, and artist, so I need an environment optimized for both design and code.

Snoop dance.

File organization

I keep most of my digital assets synced to various Cloud services and only have apps and configuration set on my actual machine.

Here’s how my various asset types are handled:

  • Music: Streamed from Apple Music
  • Photos: Stored on Dropbox/iCloud (Personal) & Google Drive (Work)
  • Design Assets: Stored on Dropbox (Personal) & Google Drive (Work)
  • Documents: Stored on Dropbox/iCloud (Personal) & Google Drive (Work)
  • Code & Prototypes: All Github, all the time

Applications

I like to keep my workspace minimal and clean, and I factor that into the apps I install and tools I choose for both work and play.

Certain apps are installed via the App Store because they are either Apple-specific or only available through that channel. A few unfortunate apps are installed direct from their websites, but the rest can be scripted. More on that soon.

Other stuff

Tools I use for inspiration or research are also stored in the Cloud, like Raindrop.io, Pinterest, or Dribbble, for example, so I don’t have a lot of extra files just hanging around on my computer. I also try to be diligent about keeping my file system clean so that in the event of a catastrophic device failure, I won’t lose anything permanently.

The setup process

I’ve created a Github repo with the scripts and setup instructions I use. If you don’t enjoy long-winded descriptions and questionable attempts at humor, you might want to skip this post and head directly to the repo:

https://github.com/ursooperduper/mac-setup

Install App Store Apps

For those of you still with me, the first two steps in this process are, sadly, manual ones. First I download all the apps that come from the App Store, like Xcode, which is required for future steps in the setup process. I haven’t found a way (yet) to automate this. (If you have, please let me know in the comments section).

I keep a list of the App Store apps I use in the mac-setup repo, so I can refer to it when going through this installation step. For me, this list of apps includes:

  • 1Password - Password management
  • Tweetbot - The must-have Twitter client
  • Ulysses - Distraction-free writing tool
  • Xcode - A must for most Mac-based development environments (like it or not)

These are all apps I either bought through the App Store (by accident) or are available exclusively there.

Oops..not so fast

You can easily determine which of your installed apps comes from the App Store by running this command:

1
2
3
4
find /Applications \
-path '*Contents/_MASReceipt/receipt' \
-maxdepth 4 -print |\
sed 's#.app/Contents/_MASReceipt/receipt#.app#g; s#/Applications/##'

Java :(

Unfortunately, some tools require Java, so I next download and install:

Download the set-up repo

With manual steps out of the way, I next download my mac-setup repo from Github. This repo contains all the scripts I use to automate my setup. You can grab this and customize it for your own setup!

On a new machine, Github access isn’t set yet, so I grab the repo using curl:

1
2
cd ~
curl -O https://github.com/ursooperduper/mac-setup/archive/master.zip

In the repo, there’s a scripts directory that contains the following files:

.macos:

This is a macOS customization script, based on the awesome OS X customization script from Mathias Bynens. With this script, you can set your personal macOS preferences, saving you from messing with System Preferences dialogues and most individual app preferences.

A few examples of my preferences:

  • Set icon sizes to small
  • Always show scrollbars
  • Check for software updates daily instead of once a week
  • Allow quitting of Finder with CMD+Q
  • Empty trash securely by default
  • Show the ~/Library folder
  • Enable the Develop menu in Safari

There’s so much you can automate in your Mac environment - figuring out what’s available and accessing application preferences is perhaps best left to another blog post.

brew-binaries.sh

A simple bash script that contains an array of Homebrew binaries that are then looped through and installed when run.

1
2
3
4
5
6
7
8
9
10
11
binaries=(
   ack
   pg
   archey
 …
   thefuck
   the_silver_searcher
   tmux
 )

brew install ${binaries[@]}

brew-cask-apps.sh

Similar to the script above, this script contains an array of Homebrew Cask apps that are looped through and installed when run. That’s right! Using Homebrew Cask, you’re saved from visiting individual websites to download and install your apps. Cask can download, install, and keep your apps up to date!

1
2
3
4
5
6
7
8
9
apps=(
  adobe-creative-cloud
   aerial
 …
   unrarx
   xscope
 )

brew cask install ${apps[@]}

brew-fonts.sh

If you’re a Homebrew user who loves automation, then you’ll also want to know about Homebrew Cask’s ability to install fonts as well! This bash script simply contains an array of fonts that are installed when the script is run.

1
2
3
4
5
6
7
8
9
fonts=(
   font-anonymous-pro
   font-hack
 …
   font-titan-one
   font-varela
 )

brew cask install ${fonts[@]}

gems.sh

Not run through a Homebrew command, but just like the other scripts above, this bash script contains a list of Ruby Gems that are installed when the script is run.

1
2
3
4
5
6
7
8
9
gems=(
  cocoapods
   coffee-script
 …
   xcodeproj
   yaml-lint
 )

gem install ${gems[@]}

mac-setup.sh

This is the super awesome master bash script that sets up my new machine. It calls all the other scripts and walks you through the set up process. More on that in a section to follow. For now, let’s get this setup rolling!

Customize macOS

With the repo downloaded, in Terminal, I enter:

1
2
cd ~/mac-setup-master
. scripts/.macos

Once all the macOS and app preferences have been set, a restart is usually required. Ah, well…

Halt...and wait

Run mac-setup.sh

Back in Terminal after a quick restart, I jump back into the mac-setup-master directory and run the mac-setup script:

1
2
cd ~/mac-setup-master
. scripts/mac-setup.sh

The mac-setup script does the following:

  • Checks to see if Xcode is installed (and exits if it’s not installed)
  • Checks for (and installs Command Line Tools)
  • Agrees to the Xcode ToS
  • Creates an SSH key (& copies it to the clipboard) and prompts you to add it to Github
  • Creates working directories (~/code/personal, ~/code/work, & ~/code/third-party)
  • Clones Github repos (ursooperduper.github.io, keys, .atom, dotfiles, cheatsheets, prototypes, mac-setup)
  • Runs npm install and bundle install for projects
  • Exports .keys so they’re available as environment variables
  • Symlinks relevant .keys and .dotfiles files (ex: .gitconfig, .bashrc)
  • Installs Homebrew and Cask (versions, apps, fonts)
  • Installs Homebrew binaries, Cask binaries, Cask fonts, and Ruby Gems

This is where the bulk of the machine set-up happens! My favorite apps installed, development environment tools in place… BOOM!

Aziz...yes!

Set up Dropbox

Dropbox is really important in my setup because it not only stores side projects, but is also where I store fonts and other settings that are synced between machines and devices.

The next step, then, is to run the Dropbox app, log in for the first time, and customize which directories are synced to the machine. The most important directories to include in the selective sync are:

  • 1Password.agilekeychain
  • alfred
  • Dash
  • Fonts
  • projects_2016

Copy fonts to ~/fonts folder

As explained earlier, I try to install a lot of fonts using Homebrew. The rest of my fonts are saved to Dropbox (and are now synced to this machine - thanks, previous step!)

There may be a better way to do this, but next, I copy my fonts from ~/Dropbox/Fonts to the ~/fonts folder. I tried to symlink fonts, but they need to install, so I haven’t found a cleaner way to do this yet.

Set up 1Password

I use 1Password for password management across all my devices, so next, I run this app and point the archive at ~/Dropbox/1Password.agilekeychain.

It’s a good idea to keep 1Password open at this point because it’s used to logging into services for the first time and adding licenses to any software that requires them!

Set up Alfred

I really, really, really love Alfred. Sorry, Spotflight, but this tool has captured my heart and keystrokes.

Add Powerpack license

Alfred is super cool when you add the Powerpack, so grab its license which is saved in 1Password.

Sync Alfred config files

You can save and sync your Alfred preferences, so next I jump to the Advanced tab in Alfred’s preference window and at the bottom right, click the Set Sync Folder button and point that at: ~/Dropbox/alfred

These folder includes Alfred preferences, extensions, custom sites, etc. There are a few things that aren’t set so you can modify them from machine to machine. See Alfred’s documentation for more.

Enable 1Password integration

Finally, I head over to the Features tab in the Preferences dialog and enable 1Password integration. So I can get at much-needed password quickly!

Set up browsers

The last few steps are manual, but signal that the setup process is almost complete. I run Chrome, Firefox, and Safari on my machine for testing purposes, and at this step, I open each and install my favorite browser extension:

  • 1Password
  • Evernote Web Clipper
  • Ghostery
  • Muzli
  • Pocket
  • Raindrop.io

Log into Adobe Creative Cloud & install apps

In order to get Adobe Creative Cloud apps installed, you have to run, sign in, and then download your Adobe apps. For me, these are:

  • Photoshop
  • Illustrator
  • After Effects
  • InDesign

Configure startup apps

So close to the end! Next, I run and set up all the apps that should start every time I log in.

Download reference material

For portability, I like to keep all reference material in ebook form. So after logging in to the Kindle app, I download programming and design references books from my Kindle account.

Add licenses for apps

A bit slow, but it’s useful to spend time running all the apps that require licenses and adding those in, so you don’t have to do it when you’re actually trying to get work done.

Work!

That’s it! It occurred to me as I wrote this that perhaps my setup process isn’t that fast (or I am just overly verbose), but all the setup steps are now complete and I’m ready to work! Let’s go make stuff!!!

Victory!

How do you set up your machine? Do you automate it? What apps make a difference in your day to day work that I should know about? I want to hear from you! So let me know your best tips, tricks, and tools in the comments below!