Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Instructions for setting up OSX 10.X.X

Setup OSX 10.X with a Clean Install

About once a year, my machine gets pretty sluggish and it's time to start fresh. Here's the process I use to update it with everything I need.

1. Start with a Fresh Install of OS X

  • Back up all photos, music, apps, iTunes library, keychains, etc.
  • Deauthorize iTunes and Photoshop.
  • Deactivate CleanMyMac 3 license.
  • 1Password, Dropbox, Evenote sync
  • Update Brewfile (below) with these:
    • Get a list of currently install brew packages: brew list
    • Get a list of currently installed brew casks: brew cask list
    • Get a list of installed App Store apps: mas list
  • Get a list of NPM packages: npm list -g --depth=0
  • Copy settings/preferences for any other apps in a safe place (ST3/Atom, Adobe apps, TextExpander/keyboard shortcuts, FTP favorites, email account info, app licenses/serials, browser bookmarks, etc. etc. etc.)

When you're ready to take the plunge:

  • Restart your Mac from the Apple menu and hold down Cmd+R as soon as the reboot starts
  • Click on Disk Utility then Continue first of all to get your Mac's hard drive wiped. Select your startup drive on the left (typically Macintosh HD), switch to the Erase tab and choose Mac OS Extended (Journaled) from the Format drop-down menu. Select Erase and then confirm your choice.
  • Quit out of the Disk Utility app, and this time choose Reinstall OS X and Continue. Follow the instructions that appear on screen, license agreements and all, and choose the hard drive to use (in most cases it'll be the only one available). Along the way you can sign in with your Apple credentials to get your apps and iCloud links back again.

2. Install XCode and Command Line Tools

This may be needed to run vagrant machines and yo.

  • Open the App Store and search for XCode
  • Open XCode after it finishes installing and accept the "Terms of Service"
  • Command Line Tools is a separate download

3. Reset some OSX Preferences

# Show hidden files
defaults write AppleShowAllFiles -boolean true
killall Finder

# Show the ~/Library folder
chflags nohidden ~/Library

# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Disable the warning when changing a file extension
defaults write FXEnableExtensionChangeWarning -bool false

# Show Path bar in Finder
defaults write ShowPathbar -bool true

# Show Status bar in Finder
defaults write ShowStatusBar -bool true

# Show absolute path in finder's title bar. 
defaults write _FXShowPosixPathInTitle -bool YES

# Symlink directories with parentheses
# cd to your home folder and create a symlink of the directory that has the parentheses:
ln -s '/Users/username/Dropbox (Personal)/' DropboxPersonal

# Change screenshots from PNG to JPG
defaults write type jpg
killall SystemUIServer

# Specify a directory for screenshots
# Use symlink created above if directory has parentheses
defaults write location ~/screenshot-directory-path
killall SystemUIServer

# Use plain text mode for new TextEdit documents
defaults write RichText -int 0

# Disable Gatekeeper in macOS Sierra
sudo spctl --master-disable
# Enable Gatekeep in macOS Sierra
sudo spctl --master-enable

Other commands for preferences here.

4. Configure Git and Generate SSH keys for GitHub

Copy the attached gitconfig settings and set your user info (left out to avoid issues; update [YOUR GITHUB USERNAME] in .gitconfig before using!). Then, enable Git password caching

cd ~/ && curl -O
git config --global "Your Name Here"
git config --global
git config --global credential.helper osxkeychain

Visit GitHub's official guide for instructions.

Be sure to set proper permissions for your /home/<user>, ~/.ssh, and ~/.ssh/authorized_keys, or you'll get a "Permission denied (publickey)." error:

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

5. Clone and Install Bash-It

Visit the Bash-It repo for more details.

Chruby is required for the rest of the setup, be sure to enable it when setting up Bash-It plugins

git clone


git clone --depth=1 ~/.bash_it

Open a new terminal window to use the Bash-It options you've set

6. Clone and Install Brew-It

Many apps can be installed through Homebrew, homebrew-cask, and mas-cli which makes the process way simpler

Visit my Brew-It repo for more details.

git clone ~/.brew_it
brew update
brew upgrade

This will clone and install Homebrew. Many apps can be installed through Homebrew which makes the process way simpler. This includes Homebrew-Cask now.

/usr/bin/ruby -e "$(curl -fsSL"

If that fails, these were the older instructions:

1. Install Homebrew Bundle

brew tap homebrew/bundle

2. Install mas-cli

This is a simple command line interface for the Mac App Store.

brew install mas

3. Clone and install my Brewfile

Be sure to update it first with your own preferred packages, casks, apps, etc.

git clone --depth=1
brew bundle

7. Set up Ruby

Add eval "$(rbenv init -)" to your .bash_profile and run the rbenv-doctor script

curl -fsSL | bash

If everything is working fine, set up your preferred version of Ruby and install Bundler.

rbenv install 2.5.0
rbenv global 2.5.0
gem install bundler

If the above fails, these were the old instructions:

Install Ruby properly:

8. Update PATH

Open .bash_profile and make the following edits

  • Add local bin and local sbin ahead of $PATH /usr/local/bin:/usr/local/sbin:

9. Install Node and Global Packages

As part of the brew installation nvm should have been installed. It requires a bit of manual setup.

Create NVM's working directory if it doesn't exist:

mkdir ~/.nvm

Add the following to ~/.bash_profile:

export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/"

Install your prefered version of node

nvm install 9

Install global packages

npm install -g yo bower gulp bundler generator-evolve generator-genesis-wordpress generator-evolve git-open grunt-cli node-gyp sass-lint

If the above fails, these were the old instructions:

Install Node sans NPM, and then NPM separately:

For more info, visit

To install various versions of Node via Homebrew:

Install Node Version Manager:

10. Install Composer:

PATH update below.

11. Powerline for Bash:

12. Final PATH Updates:

These are the last few lines of my .bash_profile:

# Load Bash It
source $BASH_IT/

# Point to location of npm-packages
export PATH="$HOME/.npm-packages/bin:$PATH"

# bash-powerline
source ~/

# Add local bin and local sbin ahead of $PATH
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"

# Initialize rbenv
#if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

# Add composer
export PATH="$PATH:$HOME/.composer/vendor/bin"

# Persist SSH Key across reboots
ssh-add -A 2>/dev/null;

# Create an alias like be or bex or similar to make life easier
alias bex="bundle exec"
alias proddeploy="bundle exec cap production deploy"
alias stagdeploy="bundle exec cap staging deploy"
alias nbbc-install="rm -rf node_modules/ && rm -rf bower_components/ && yarn install && bower install && composer update && bundle install"
alias phpw="open http://localhost:8000 && php -S localhost:8000"
alias dnsflush="sudo dscacheutil -flushcache"

13. Install Color Schemes

My current preferred color scheme:

My previous color scheme:


cd ~/ && curl -O && open ./Monokai%20Dark.terminal

Open Terminal > Preferences (or CMD + ,) and select "Default" to make your new theme the default theme


My preferred version of Monokai Extended Bright

Material Theme

Visit @jimmynotjim's OSX Phix Theme repo for more details.

cd ~/ && curl -O && open ./material-theme.terminal

15. Configure Sublime Text

Install Package Manager

Set up PHP Code Sniffer

Add subl command

To map SublimeText to open files from the command line, add the subl command. If you don't have a ~/bin in your home directory, follow this.

ln -s "/Applications/Sublime" ~/bin/subl


See my Package Control User Settings. See my ST User Preferences.

Add Open with Sublime Text service:

More information:

16. Install Alfred Workflows

Can use Alfred Workflow Searcher to get many of these.

17. Set NPM user

npm adduser username

18. Download a base Ubuntu box for Vagrant for local development:

Ubuntu 12.04 LTS 64-bits

vagrant box add precise64

19. Configure Environment for Genesis or Evolution

You need all these:

These should have been installed above:

These were installed in your Brewfile:

Install the remaining items to get the needed vagrant plugins and gems:

vagrant plugin install vagrant-hostmanager
vagrant plugin install vagrant-list
curl >> ~/.ssh/authorized_keys
gem install capistrano -v 2.15.3
gem install capistrano-ext colored

If you get EMFILE issues, try running: $ ulimit -n 4096.

(You can check your versions by running node --version, npm --version, etc.)

Then, install Capistrano v2.15.* via Bundler & Ansible:

$ sudo bundle install
$ sudo easy_install pip
$ sudo pip install ansible

Or, install a specific version of ansible with sudo pip install 'ansible==' as needed.

All done, have fun!

This process has been borrowed from here, here, here, here, here, here, and of course, here.

whitespace = fix
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = white reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
branch = magenta
[url "git://"]
insteadOf = "github:"
[url ""]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://"
[url ""]
insteadOf = "germanny:"
default = matching
# Include summaries of merged commits in newly created merge commit messages
log = true
keepBackup = true
[mergetool "diffmerge"]
cmd = diffmerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"
trustExitCode = true
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge $LOCAL $REMOTE
excludesfile = ~/.gitignore_global
editor = /usr/bin/sublimetext
; show merge tree + commits info
graph = log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short
lg = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an%d%Creset %s %Cgreen(%cr)%Creset' --date=relative
; basic logging for quick browsing
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --numstat
; log + file diff
fl = log -u
; find paths that matches the string
f = "!git ls-files | grep -i"
; delete all merged branches
; dm = !git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
; shortcuts
cp = cherry-pick
st = status -s
cl = clone
ci = commit
co = checkout
br = branch
dc = diff --cached

Mac OS X App List


  • Bitly (custom link share tool)
  • ST2 (text editor for markup/code)

Homebrew install (see Brewfile or Brew-It repo)

Web Tools

Media Players

Other suggested apps

From Eric Rasch:

{ // It seems python/sublime cannot always find the php application // If empty, then use PATH version of php, else use the set value "phpcs_php_path": "/usr/bin/php",

// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_executable_path": "/Users/germanny/.composer/vendor/bin/phpcs",

// Path to where you have the phpcbf installed
"phpcbf_executable_path": "/Users/germanny/.composer/vendor/bin/phpcbf",

// Path to where you have the php-cs-fixer installed
"php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer",

"phpcs_show_quick_panel": false,

"php_cs_fixer_on_save": true,

"phpcbf_on_save": true


	"bootstrapped": true,
		"Agila Theme",
		"Dracula Color Scheme",
		"Markdown Extended",
		"Package Control",
		"Theme - Dark Material",
	"afn_insert_dimensions": false,
	"always_show_minimap_viewport": true,
	"auto_complete": true,
	"auto_complete_selector": "source, text",
	"auto_indent": true,
	"bold_folder_labels": true,
	"caret_extra_bottom": 2,
	"caret_extra_top": 2,
	"caret_extra_width": 1,
	"caret_style": "solid",
	"close_windows_when_empty": true,
	"color_scheme": "Packages/User/SublimeLinter/Dracula (SL).tmTheme",
	"detect_indentation": true,
	"draw_centered": false,
	"draw_minimap_border": true,
	"draw_white_space": "selection",
	"enable_tab_scrolling": false,
	"ensure_newline_at_eof_on_save": true,
		"PATH": "/usr/local/bin"
	"fade_fold_buttons": false,
	"find_selected_text": true,
	"font_face": "OperatorMono-Book",
	"font_size": 16.0,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"line_padding_bottom": 2,
	"line_padding_top": 2,
	"margin": 4,
	"match_brackets": true,
	"match_brackets_angle": true,
	"match_brackets_braces": true,
	"match_brackets_content": true,
	"match_brackets_square": true,
	"origami_auto_zoom_on_focus": false,
	"overlay_scroll_bars": "enabled",
	"scroll_past_end": true,
	"show_encoding": true,
	"show_full_path": true,
	"show_line_endings": true,
	"soda_classic_tabs": true,
	"soda_folder_icons": true,
	"spell_check": true,
	"tab_size": 2,
	"theme": "Agila Dracula.sublime-theme",
	"theme_agila_compact_tab": true,
	"theme_agila_horizontal_scrollbar_thickest": true,
	"theme_agila_sidebar_font_xsmall": true,
	"theme_agila_sidebar_mini": true,
	"theme_agila_vertical_scrollbar_thickest": true,
	"translate_tabs_to_spaces": true,
	"trim_automatic_white_space": true,
	"trim_trailing_white_space_on_save": true,
	"use_simple_full_screen": false,
	"use_tab_stops": true,
	"wide_caret": true,
	"word_wrap": true
"@disable": true,
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"lint_mode": "save only",
"@disable": false,
"@disable": false,
"standard": "PSR2"
"@disable": false,
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
"tooltip_fontsize": "1rem",
"tooltip_theme": "Packages/SublimeLinter/tooltip-themes/Inline/Inline.tooltip-theme",
"tooltips": true,
"warning_color": "DDB700",
"wrap_find": true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.