Developer Setup for Mac

You have a new MacBook Pro! You need to setup your mac to be Developer Ready and don't know what to do. You are in the right place. I have compiled a list of installation scripts for a typical Developer to kick start a Developer Machine.

macOS Updates

Before installing any applications you require, it is a good idea to update the Operating System. As much as possible, I try to have the latest version of the MacOS with patches.

XCode

First step, you need to install XCode which is Apple's integrated development environment for MacOS. You can download it in the Apple Store free of charge. There is a command line instruction to install xcode. Open a new terminal and type the code below.

        
xcode-select --install
      

Homebrew

I pretty much use Homebrew or brew to install anything on my MacBook and Linux Machines. Run the following commands to download and install brew and upgrade it, though there should not be anything to upgrade. No harm doing though.

        
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew upgrade
      

Python3

Next to Java, Python is probably my next go to programming language. I used python a lot to build client tools and serverless applications. Jq is a tool to parse JSON Strings and I predominantly use this with python and aws. Python virtualization is a must if you are going to develop using python.

        
brew install python3
curl https://bootstrap.pypa.io/get-pip.py | python3
pip install virtualenv
brew install jq
      

AWS

I work mostly with AWS Cloud hence I require AWS Client that uses Python. If you are not in AWS, you may skip this part. This command will help you install and upgrade your aws client (if already instealled).

        
brew install awscli
brew link awscli --overwrite 
pip install awscli-local
      

Docker Desktop

Docker or container is a tool that helps me a lot. I don't really need to install directly an application in my Machine and just create a container out of it. I can have multiple versions of the app I require using containers. Run the command below to install docker.

        
brew cask install docker
      

Many times I tried to install docker client using brew and it failed. To download manually, run the command below and locate the downloaded file and click to install.

        
curl https://desktop.docker.com/mac/stable/arm64/Docker.dmg?utm_source=docker&utm_campaign=docs-driven-download-mac-arm64
      

Localstack

Since AWS is a paid service, creating infrastructure usually cost $$$ if you are unable to use the free-tier. To test out my infrastructure-as-code scripts, I spin up a Mock AWS Service called localstack.

        
pip install localstack 
      

Terminal

MacOS' terminal is nice, no complains about it. As a developer, sometimes I would like to work on multiple Terminals but within the same window. Hence, I require some Split functionality and iTerm2 has that capability. ZSH is the prefered console of MacOS terminal.

        
brew install iterm2
chsh -s /bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
      

NodeJS

As much as I don't want to tackle NodeJS, this programming language is pretty much use anywhere from backend processing to UI development using frameworks such as react or angular or vue.

        
brew install node
brew install nvm
brew install yarn
      

Serverless Framework

Between AWS Severless Application Model (SAM) and Serverless Framework (SLS), I prefer the latter. Both framework patterns their syntax from AWS Cloudformation, but I firmly believe Serverless Framework is more mature.

        
curl -o- -L https://slss.io/install | bash
      

Git and Git Flow

In one way or another, you might be using a Source Code Versioning System like github or gitlab. A git client is required. I have added a plugin called git flow for the purpose of following a release framework.

        
brew install git
brew install git-flow
      

Database Connectivity Tool

We use databases to persist data. I've used a lot of databases in my career, from MS SQL Server to Oracle to Postgres or MySQL. I don't have a clear favorite but for this tutorial, I will go with the easiest postgres. Take note, this is only a connection tool, you may ask how do you install your database? As I've mentioned, I would rather containerize my applications like databases.

        
brew install libpq 
      

Miscellaneous Tools

The rest of the apps in this code block are optional. Some are required due to the fact that I am using it like gpg for encryption and java being my favorite programming language. It is to your discretion if you will install them or not.

        
brew install atom
brew install kubectx
brew install gpg
brew install blackbox
brew install java
brew cask install eclipse-java
brew cask install postman
brew install macpass
brew install credstash
      

Full Script

I've compiled all of the above commands into one script below.

          
xcode-select --install
  
# Install Homebrew - preferred apps installation manager
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew upgrade
  
# Install Python 3
brew install python3
# update pip 
curl https://bootstrap.pypa.io/get-pip.py | python3
# install virtualenv for python, if you dont use python no need to install this
pip install virtualenv
# install jq
brew install jq

# Install AWS Client using Homebrew
brew install awscli
# if there is already an install client, ovewrite its softlink
brew link awscli --overwrite 
# install aws client for localstack
pip install awscli-local

# install docker using docker installer
brew cask install docker

# install localstack
pip install localstack

# preferred mac terminal
brew install iterm2

# CHANGE TO zsh, if you want too.
chsh -s /bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# all about NODEJS
brew install node
brew install nvm
brew install yarn
# if your office has certificate restrictions, you may want to remove ssl restriction
yarn config set strict-ssl false

# for AWS lambda deployment, we prefer Serverless Framework
curl -o- -L https://slss.io/install | bash

#install git
brew install git

# install git flow
brew install git-flow

# postgres tool
brew install libpq 

# this is my preferred editor, if you dont like it dont install it
brew install atom

# some passwords used for OPs are in keepass and macpass is the keepass version for mac
brew install macpass

# we do use kubernetes, this is required to connect to it
brew install kubectx

# install gpg 
brew install gpg

# install Java
brew install java
brew cask install eclipse-java
brew cask install postman

# password tools
brew install blackbox
brew install credstash