skip to Main Content

Mac OS X Development Setup Guide

This blog entry contains a list of applications and instructions how to install them for setting up a Mac as a development machine. Some applications need to be installed manually, for the rest I recommend using Homebrew - a package manager for Mac OS X. If you plan to start with a fresh Mac OS X install, follow the instructions on Apple Support.

Setting up brew

Open a terminal and install the Command Line Tools for Xcode that are needed for the Homebrew installation

xcode-select --install

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Disable Analytics being sent to Google:

brew analytics off

To extend the amount of available packages (especially GUI applications), also install homebrew-cask:

brew install caskroom/cask/brew-cask

Check if the system setup is correct:

brew doctor

On my fresh system install it found the problem that /usr/local/etc isn't writeable. I fixed it by running:

sudo chown `whoami` /usr/local/etc

Rerun the doctor command again to see if all problems are fixed now. On success it shows:

Your system is ready to brew.

Now you are ready to install all other applications using a simple command on the shell. Brew also takes care of updating them.

Update existing applications

Replace the installed applications by newer versions:

brew install bash ctags git python
brew tap homebrew/dupes
brew install openssh

Communication

Skype

brew cask install skype

Programming

Go Golang programming language

brew install go

Graphviz Graph Visualization Software useful for Golangs profiling visualization

brew install graphviz

Mercurial

brew install mercurial

Node.js and useful apps for it

brew install nodejs
brew install flow gradle watchman

Android SDK and Genymotion

brew install android-sdk
brew cask install android-studio
brew install genymotion

Python 3

brew install python3
pip2 install virtualenv
pip3 install virtualenv

Visual Studio Code - IDE

brew cask install visual-studio-code
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension PeterJausovec.vscode-docker
code --install-extension casian.plsql
code --install-extension codezombiech.gitignore
code --install-extension donjayamanne.python
code --install-extension joaompinto.asciidoctor-vscode
code --install-extension lukehoban.Go
code --install-extension mitaki28.vscode-clang
code --install-extension ms-vscode.cpptools
code --install-extension robertohuertasm.vscode-icons
code --install-extension vscodevim.vim
code --install-extension wayou.vscode-todo-highlight
code --install-extension yzane.markdown-pdf
code --install-extension zxh404.vscode-proto3

Protocol buffers version 3 protoc compiler

brew install protobuf

neovim - modern VIM version

brew install neovim/neovim/neovim
pip2 install neovim
pip3 install neovim
brew install rogual/neovim-dot-app/neovim-dot-app
brew linkapps neovim-dot-app

Meld - A visual Two- and three-way visual diff and merge tool

brew install homebrew/gui/meld

System

fish - User-friendly command line shell

brew cask install fish

iTerm 2 - Replacement for the built in Terminal

brew cask install iterm2

appcleaner - Uninstall unwanted apps

brew cask install appcleaner

KeePassX - Password manager

brew cask install keepassx

NTFS-3G - Read-Write NTFS Driver

brew cask install osxfuse
brew tap homebrew/fuse
brew install ntfs-3g
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs

VeraCrypt - disk encryption

brew cask install veracrypt

Commander One - dual pane file manager as Finder replacement

brew cask install commander-one

Usability

f.lux - makes the color of your computer's display adapt to the time of day, warm at night and like sunlight during the day

brew cask install flux

KeepingYouAwake - Menu bar utility to prevent your Mac from going into sleep mode

brew cask install keepingyouawake

htop - an interactive process viewer

brew install htop

Shortcat - Faster clicking without using the mouse

brew cask install shortcat

Virtualization

docker - lightweight software container isolation, client

brew cask install docker
mkdir -p ~/.config/fish/completions
curl -o ~/.config/fish/completions/docker.fish https://raw.githubusercontent.com/docker/docker/master/contrib/completion/fish/docker.fish

VirtualBox - operating system virtualization

brew cask install virtualbox

Docker Compose - define and run multi-container applications with docker

brew install docker-compose

Wine - runs Windows applications on non Windows systems

brew cask install xquartz
brew install wine winetricks

Network

Google Chrome - My default browser to replace Safari

brew cask install google-chrome

Firefox

brew cask install firefox

Command-line tools for network access

brew install axel curl ncftp nmap wget

VPN / Proxy tools

brew install corkscrew
brew cask install tunnelblick

Syncthing - Decentralized file sync

brew install syncthing
ln -sfv /usr/local/opt/syncthing/*.plist ~/Library/LaunchAgents

dnscrypt - Circumvent DNS blocking of ISPs

brew cask install dnscrypt

Multimedia

VLC - Multimedia player for videos

brew cask install vlc

VOX - Slim audio player

brew cask install vox

XnView MP - Image viewer

brew cask install xnviewmp

ImageMagick - Image processing

brew install imagemagick --with-librsvg

RawTherapee - Photo editor

brew cask install rawtherapee

GIMP - Image editor

brew cask install gimp

keycastr - keystroke visualizer

brew cask install keycastr

HandBrake - video converter

brew cask install handbrake

Office

LibreOffice - Free Office suite

brew cask install libreoffice

Haroopad - Markdown editor

brew cask install haroopad

Pandoc - Universal document converter

brew install pandoc

Ghostscript - PostScript and PDF utilities

brew install ghostscript

calibre - e-book library management

brew cask install calibre

Fish shell configuration

Set fish as your default shell:

chsh -s /usr/local/bin/fish

Update fish tab completion data by starting a new Terminal with fish and executing:

fish_update_completions

Install oh-my-fish plugin management:

curl -L http://get.oh-my.fish | fish

Install plugins based on your preference:

omf install brew extract tab

Edit the ~/.config/omf/init.fish and adjust to your own needs:

if status --is-interactive

set -gx fish_greeting ''
set -gx GOPATH ~/gocode
set -gx PATH $PATH $GOPATH/bin

end

Git configuration

# Ignore file mode differences
git config --global core.fileMode false
# Better cross-platform line ending handling
git config --global core.autocrlf input
# fix go get redirect errors
git config --global http.https://gopkg.in.followRedirects true

Adjust Mac OS X default settings

# Disable Game Center
launchctl unload -w /System/Library/LaunchAgents/com.apple.gamed.plist
# Avoid creation of .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable autocorrect
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Enable dark mode
defaults write NSGlobalDomain AppleInterfaceStyle Dark; killall Dock
# Ask for password screen lock delay
defaults -currentHost write com.apple.screensaver askForPasswordDelay -int 10
# Allow app installation from any source
sudo spctl --master-disable

Tune system settings

brew install m-cli
m dock magnification NO
m dock prune
m finder showhiddenfiles YES
m finder showextensions YES
m finder showdesktop YES
sudo m gatekeeper disable
m notification showcenter NO

Remove not needed Applications

sudo rm -rf /Applications/GarageBand.app
sudo rm -rf /Applications/iMovie.app
sudo rm -rf /Applications/iTunes.app
sudo rm -rf "/Library/Application Support/GarageBand"
sudo rm -rf "/Library/Application Support/Logic"
sudo rm -rf "/Library/Audio/Apple Loops"

Install DejaVu fonts

wget http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2
tar -xf dejavu-fonts-ttf-2.37.tar.bz2
cp dejavu-fonts-ttf-2.37/ttf/*.ttf ~/Library/Fonts/
rm -rf dejavu-fonts-ttf-2.37/ dejavu-fonts-ttf-2.37.tar.bz2

iTerm2 theming

Download iTerm2-Color-Schemes and unpack it. Import the unpacked schemes folder it into iTerm Preferences/Profiles/Colors settings. Try different themes or have a look at http://iterm2colorschemes.com/ for a gallery. I prefer the theme Solarized Dark Higher Contrast, which is based on Solarized.
You can get the original Solarized theme at http://ethanschoonover.com/solarized/files/solarized.zip

Restore function keys

  • Apple Menu -> System Preferences -> Keyboard
  • Tick "Use All F1, F2, etc keys as standard function keys"

Changelog

2017-02-28
* VIM replaced by neovim

2017-02-05
* Visual Studio Code added

2016-12-26
* Commander One added
* HandBrake added
* VeraCrypt instructions updated

2016-06-28

  • MacDown exchanged with haroopad
  • fish shell instructions updated
  • VeraCrypt / OSXFUSE instructions updated

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top