Setup MacOS for Development
Camilo Martinez
Updated on
・7 min read
macos-helpful-tips (5 Part Series)
I’m relative new on MacOS and one of the biggest problem switching from Windows was setup all those SDK and libraries required for web/mobile development.
I made several mistakes, but I think that finally found a good way to setup a MacOS as development machine.
It's not a definitely solution, just use what you need. Don't install sdk or software that you not gonna use.
Before start highly recommend change your terminal follow this configuration:

iTerm2 + Oh My Zsh! + Powerlevel9K best terminal combination for Geeks!
Camilo Martinez ・ Sep 25 '18 ・ 4 min read
Package Manager
Homebrew
Brew have his own classification. Inside brew can found CLI app and utilities. Inside cask are all the application with Graphical Interface.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew upgrade
brew cleanup
Run this command, and follow doctor recommendations:
brew doctor
SDK Man
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
Permissions
Add permissions to user (or group) under this folders and enclosed items:
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/share
WARNING: Add next permission just in case you machine is used by only one user.
sudo chown -R $(whoami) /usr/local/lib
Libraries
I like install Gradle and Java with SDK Man because have projects that and need switch between different version, change it with SDK Man is easy.
Gradle
I'm working with 3.3 and 4.4.1 versions, if you want use last version avoid version number at end.
sdk install gradle 3.3
sdk install gradle 4.4.1
sdk use gradle 4.4.1
sdk default gradle 4.4.1
Java
sdk list java
Search oracle version, like 8.0.222.hs-adpt
on this list and use it at the end of next commands.
sdk install java 8.0.222.hs-adpt
sdk use java 8.0.222.hs-adpt
sdk default java 8.0.222.hs-adpt
Node.js
I prefer install node through NVM (Node Version Manager).
brew install nvm
mkdir ~/.nvm
chmod +x /usr/local/opt/nvm/nvm.sh
Add this environment variables to ~/.bash_profile
and/or ~/.zshrc
file:
export NVM_DIR="$HOME/.nvm"
#Load NVM and Bash Completion
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"
Install last LTS version
nvm install --lts
nvm alias default stable
nvm use default
And finally update npm:
npm i -g npm
If don't recognize npm
command close and open terminal and run the command again.
Yarn
brew install yarn --ignore-dependencies
Git
brew install git
rm '/usr/local/bin/git-cvsserver'
brew link --overwrite git
brew install git-lfs
git lfs install
In order to use setup git config
to use Visual Studio Code instead of Vim run this command:
git config --global core.editor 'code --wait'
And this command to edit global global configuration:
git config --edit --global
Android SDK
brew cask install android-sdk
Useful SDK Manager commands:
Action | Command |
---|---|
List packages | sdkmanager --list |
Install NDK | sdkmanager "ndk-bundle" |
Install build-tools | sdkmanager "build-tools;28.0.3" |
Install platform | sdkmanager "platforms;android-28" |
Update installed packages | sdkmanager --update |
Add this environment variables to ~/.bash_profile
and/or ~/.zshrc
file:
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
export ANDROID_HOME="$ANDROID_SDK_ROOT"
export ANDROID_NDK_HOME="$ANDROID_SDK_ROOT/ndk-bundle"
export ANDROID_BT_VERSION="$(ls -tr $ANDROID_SDK_ROOT/build-tools | sort | tail -1)"
export PATH="$ANDROID_SDK_ROOT/bin:$PATH"
export PATH="$ANDROID_SDK_ROOT/build-tools/$ANDROID_BT_VERSION:$PATH"
export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH"
export PATH="$ANDROID_SDK_ROOT/tools:$PATH"
export PATH="$ANDROID_NDK_HOME/:$PATH"
Android Bundle Tool
brew install bundletool
.Net Core SDK
brew cask install dotnet-sdk
Add this environment variables to ~/.bash_profile
and/or ~/.zshrc
file:
export DOTNET_HOME="/usr/local/share/dotnet/dotnet"
export PATH="$DOTNET_HOME/bin:$PATH"
Packages
Do it with your favorite node package manager: yarn or npm
Yarn | npm |
---|---|
yarn global add @angular/cli |
npm i -g @angular/cli |
yarn global add typescript |
npm i -g typescript |
yarn global add gulp |
npm i -g gulp |
yarn global add nativescript |
npm i -g nativescript |
yarn global add eslint |
npm i -g eslint |
yarn global add cordova |
npm i -g cordova |
Yarn with VSCode
If you are using Visual Studio Code and ESLint extension, need extra configurations settings:
"eslint.packageManager": "yarn",
Yarn with Angular
Using Yarn with Angular CLI, needs run a command inside an Angular project.
v1.7.4- | v6+ |
---|---|
ng set --global packageManager=yarn |
ng config -g cli.packageManager yarn |
Angular Console
The Power of the Angular CLI. The Convenience of an App.
brew cask install angular-console
Versions
Please see software versions in order to check that installation process was ok.
node -v
npm -v
yarn -v
gradle -v
java -version
ng -v
tsc -v
gulp -v
tns --version
eslint -v
cordova -v
Software
MySQL + Workbench
brew install mysql
brew cask install mysqlworkbench
To have launchd start MySQL now and restart at login:
brew services start mysql
Or, if you don’t want/need a background service you can just use the mysql.server tool
:
mysql.server start
mysql.server stop
Source Tree
brew cask install sourcetree
Visual Studio Code
brew cask install visual-studio-code
On first run press ⌘
+ ⇧
+ P
and run the command: Shell Command: install 'code' command PATH
. And you can use code
command from command line. Example: code .
open editor on current folder.
Android Studio
brew cask install android-studio
brew cask install intel-haxm
On first run go to Tools -> Create Command-line Launcher
. And you can use studio
command from command line. Example: studio .
open IDE on current folder.
JADX
Dex to Java decompiler
brew install jadx
Vysor
brew cask install vysor
Xcode
Just install it from Apple Store: Xcode and Xcode Command Line Tools
xcode-select --install
15:10 PM - 10 Oct 2018
Utilities
Browsers
brew cask install google-chrome
brew cask install firefox
brew cask install homebrew/cask-versions/firefox-developer-edition
brew cask install opera
brew cask install opera-developer
brew cask install microsoft-edge-dev
Take this FREE course: DevTools Pro: The Basics of Chrome Developer Tools.
Don't use default mail app, it's primitive and not usable at all. Just install
Spark Mail from Apple Store.
Communicators
brew cask install slack
brew cask install microsoft-teams
brew cask install webex-teams
brew cask install skype-for-business
FileZilla (FTP Client)
brew cask install filezilla
Keka (File Compression)
brew cask install keka
Follow this instructions: set as default compress application
Gimp (Image Editor)
brew cask install gimp
App Cleaner (App Uninstaller)
Use it with software installed manually. With software installed with brew
use brew remove <package_name>
or brew cask remove <software_name>
.
brew cask install appcleaner
Docker
brew cask install docker
Cryptomator
Free client-side encryption for your cloud files. Open source software: No backdoors, no registration.
brew cask install cryptomator
Spectacle (Windows Management)
brew cask install spectacle
The common MacOS modifier keys are:
Command | Control | Option | Shift |
---|---|---|---|
⌘ |
⌃ |
⌥ |
⇧ |
I changed some Spectacle shortcuts to avoid collisions with Visual Studio Code keyboard shortcut combination.
Action | Combination |
---|---|
Center | ⌃⌥C |
Fullscreen | ⌃⌥F |
Next Third | ⌃⇧→ |
Previous Third | ⌃⇧← |
Left Half | ⌃⌥← |
Right Half | ⌃⌥→ |
Top Half | ⌃⌥↑ |
Bottom Half | ⌃⌥↓ |
Lower Left | none |
Lower Right | none |
Karabiner (Keyboard Customizer)
brew cask install karabiner-elements

What’s the better way to use PC Keyboard on macOS?
Camilo Martinez ・ Sep 23 '18 ・ 2 min read
Aware (Track Time)
A simple menubar app that tracks how long you’ve been actively using your computer.
brew cask install aware
CheatSheet (Key Shortcuts)
Just hold the ⌘-Key
a bit longer to get a list of all active short cuts of the current application. It’s as simple as that.
brew cask install cheatsheet
Google Play Music (Desktop Player)
Yes, I'm that kind of Developer that turn Caffeine Music into Code
.
brew cask install marshallofsound-google-play-music-player
Bonus Track
Screenshot without Shadow
Just use Shift ⇧
+ ⌘
+ 4
+ Space
, and hold down ⌥
when you click to select the window.
Or you can disable forever the shadow added when capturing an entire window by executing the following command from the terminal:
defaults write com.apple.screencapture disable-shadow -bool TRUE
killall SystemUIServer
Drag & Drop
Learn this useful tips:
That’s All Folks!
Happy Coding 🖖
macos-helpful-tips (5 Part Series)
I didn't read everything but a quick note about your Node and Yarn setup! I would strongly recommend using nvm for managing Node versions and not installing Node through Brew. It allows you fine grained control over what Node you want to use, don't have to just use one version on your whole system!
Once you've got that, you'll also want to install Yarn without Node so that it's independent of the version of Node which is handled by nvm.
I've found it's a far more pleasant experience working this way, being able to easily change versions as needed!
Excellent, I have no idea about nvm. I'n my case I'm only need LTS version but it's cool to other know that. Thanks!
Now I moved to NVM :D
You might consider giving this repo a look:
github.com/Pivotal/workstation-setup
With a couple of tweaks (you can fork the repo to your own GitHub and make them there) you can cover most everything a modern developer might encounter.
Disclaimer: I work at Pivotal and use this setup project to pave our workstations on a regular basis between client engagements.
Looks nice. I'm thinking do it similar with a console in .Net Core
Hello Camilo, what a coincidence that I read some of this article yesterday! I just got a new Macbook and looked through around 10 articles to make sure I set up my $PATH and nvm correctly. I'm confused why tutorials advise having
.ssh
and.bashrc
under$HOME
whilst stuff that's installed through brew actually goes intoMacintoshHD/usr/local/
....?Really, I have no idea. I never seen something about it before.
Do you have some of this links? I can take a look and try to understand.
Very Nice overview. But let's not forget dart cli and eco system:
dart.dev/get-dart
I don't think you really need to do all this. Macs aren't far off being usable machines in the first place.
I'd do
homebrew
and a better terminal and (if my development stack was that way) installdocker
and/orvagrant
. The rest of it's all very specific to a particular development stack.On a more serious note, I would not do this:
simply because there's no reason to and you're messing things up for anyone else who wants to use the same system. I know, I know, Macs are usually one-person machines, but they run unix and are theoretically multi-user. Why try to break it?
Yes this kind of thing are very opinionated. I work with non particular Stack: c#, .Net Core, Web and Mobile. Hope can be used as guide. You give me a good idea, organizing it as stacks.
About
/usr/local/bin
you are completely right I'll add a Warning about. Just use in case you machine is used by only one user.Thanks!
This leaves out all the web developers, luckily there's this walkthrough --> medium.com/the-way-of-the-dev/http...
DISCLAIMER: the walkthrough is written by me -_^
Great! Almost everything looks familiar, but have learned something new.
Found typo: Filezilla gist repeats below Keka (File Compression).
Thanks! Fixed.
I never heard about meta key. I'll search about it.
Using docker for development will be good instead of installing all this stuff
Yeeess, that say me a partner. Maybe you know a link that to the same with Docker? I want to learn.
Those quick access sound nice... great tip.
Sometimes fix something in terminal is slowly, moving only with arrow keys.
Thanks!