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:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Disable Analytics that are sent to Google:
brew analytics off
To extend the amount of available packages (especially GUI applications), also install homebrew-cask:
brew tap caskroom/cask
Check if the system setup is correct:
brew doctor
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 openssh python
Communication
brew cask install skype
Programming
Go Golang programming language
brew install go
Graphviz Graph Visualization Software useful for Golangs profiling visualization
brew install graphviz
brew install mercurial
Node.js and useful apps for it
brew install nodejs
brew install flow gradle watchman
brew cask install android-studio
brew install python3
pip2 install virtualenv
pip3 install virtualenv
brew cask install visual-studio-code
code --install-extension casian.plsql
code --install-extension codezombiech.gitignore
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension hnw.vscode-auto-open-markdown-preview
code --install-extension jebbs.plantuml
code --install-extension joaompinto.asciidoctor-vscode
code --install-extension mitaki28.vscode-clang
code --install-extension ms-python.python
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.Go
code --install-extension PeterJausovec.vscode-docker
code --install-extension robertohuertasm.vscode-icons
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension wayou.vscode-todo-highlight
code --install-extension xaver.clang-format
code --install-extension yzane.markdown-pdf
code --install-extension zxh404.vscode-proto3
Protocol buffers version 3 protoc compiler
brew install protobuf
System
fish - User-friendly command line shell
brew install fish
iTerm 2 - Replacement for the built in Terminal
brew cask install iterm2
appcleaner - Uninstall unwanted apps
brew cask install appcleaner
KeePassXC - Password manager
brew cask install keepassxc
NTFS-3G - Read-Write NTFS Driver
brew cask install osxfuse
brew tap homebrew/fuse
brew install ntfs-3g
VeraCrypt - disk encryption
brew cask install veracrypt
Commander One - dual pane file manager as Finder replacement
brew cask install commander-one
Usability
neovim - modern VIM version
brew install neovim
pip2 install neovim
pip3 install neovim
brew cask install vimr
Meld - A visual Two- and three-way visual diff and merge tool
brew cask install meld
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
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
brew cask install firefox
Command-line tools for network access
brew install axel curl ncftp nmap wget whois
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
2018-02-12
- A lot of updates
2017-02-28
- VIM replaced by neovim
2017-02-05
- Visual Studio Code added