New Macbook Setup for Developers
Macbook DX Dev

New Macbook Setup for Developers

Scott C. Krause | Wednesday, Mar 24, 2021

MacBook Setup for the Pros 2021

Setting up a new MacBook for software development can be tricky. Here I provide the simple basics to get you started.

I realize that some developers may be migrating from Windows to OSX for the first time and that can be difficult. Especially when onboarding as a new employee. Every development environment is unique but the main apps that you want working fast are Finder, Git, Node, NPM, Java, Scala, Shell, VSCode and xCode.

Whenever possible I will provide a verification step to make sure the command worked. I’ve also included a list of the most productive Chrome extensions and VSCode extensions. I will try to keep these instructions up to date with the most recent changes.

Default Mac Shell


nano ~/.zshrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

printenv

Apple Command Line Dev Tools


xcode-select --install

xcode-select --version

Finder Config


chflags nohidden ~/Library
defaults write com.apple.Finder AppleShowAllFiles true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true

killall Finder

Menu > Finder > Preferences [ Select Drive ]

Brew


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

brew --version

Chrome Browser

Visual Studio Code

Recommended

Git good at Git


git clone -b BRANCHNAME --single-branch REPONAME

git config --global user.email "example@email.com"
git status
git branch
git checkout master
git pull origin master
git branch
git checkout -b temp
git checkout BRANCHNAME
git rebase master
git push origin BRANCHNAME
git status
git push origin BRANCHNAME --force-with-lease
git difftool --tool=vimdiff branch1 branch2 -- ./some/file.txt
Git Command Line

Node


curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm --version
nvm install --lts
node --version
npm install -g npm
mpm --version

Global NPM Packages


npm install -g typescript supervisor live-server svgo
npm install -g npm
npm list -g --depth=0
npm config ls -l
Node Version Manager

Java 8 SDK


brew update
brew tap caskroom/versions
brew cask install adoptopenjdk8
brew install jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc

java -version
ls /Library/Java/JavaVirtualMachines
ls /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home

See Also

SDKMan
JENV

Scala


brew update
brew install scala brew install sbt brew install sbt@1
scala --version

Scala Build Tool


brew install sbt@1
scala --version
sbt --version
sbt clean (Optionally delete .ivy2 )
/usr/local/etc/sbtopts -mem 2048    (Optional Increase Mem)

Go


brew update&& brew install golang
mkdir -p $HOME/go/{bin,src,pkg}

nano ~/.zshrc
export GOPATH=$HOME/go
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
Node NPM Git Golang