Tania Rascia

Skip Navigation
Setting up a Brand New Mac for Development

Setting up a Brand New Mac for Development

 /  30 responses

I just got a new MacBook Pro, and I decided to research the fastest, most efficient method to set up a clean, organized, and up-to-date development environment for my new computer. I wrote about some of these steps in my front end web development setup post, and now I’m going to go into more detail.

I documented everything I did after taking the Mac out of the box. This post will be useful to anyone setting up a new Mac, whatever your preferred apps and settings are. Simply change variables as necessary.


I’m a front end web developer, and most of the software I install will pertain to that. I still have much to learn, but this process will setup my Mac to run Git, Jekyll, Gulp, Sass, an Apache server, and more.

View on GitHub

I’ve included all the commands from this article without any of the explanation on a GitHub readme. Feel free to fork, modify, and keep for your own future records.

macOS Mojave v. 10.14 Setup

The Setup Assistant will launch once you turn the computer on. Here you’ll enter your language, time zone, Apple ID, and so on. I choose not to use “Migration Assistant”, and set up my computer from scratch. The first thing you should do is update macOS to get the latest security updates and patches.

If you’re setting up for the first time, you’ll have to install App Store software through the App Store itself, but if you’ve installed them before, you’ll be able to use Homebrew, Cask, and Mas to install all your programs from the command line.


Install the Homebrew package manager. This will allow you to install almost any app from the command line. In previous versions, you’d have to install XCode or Command Line Tools before using this, but that step is no longer necessary.

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

Mac App Store

The Mac App Store command line interface, or mas-cli, will allow you to install from the App Store.

brew install mas
Sign in

If you haven’t already logged into the App Store, you can do so now.

mas signin [email protected]


Now I’ll create a file called Brewfile in my main directory, which will list all the programs I want on the computer, and install them in a bundle.

Open Terminal, which will be in your home folder by default (/Users/you). Create the file.

touch Brewfile

You can edit the file with TextEdit, or by typing nano Brewfile. If you choose to edit with nano, you can save the file by typing Control + O to save, and Control + X to exit the file.

List of Programs

Here are all the programs I intend to install with a brief description. You can choose to add or subtract any programs you’d like. They’re all free.

  • Cask – an extension to Homebrew that will allow you to install almost any program that exists for a Mac
  • Git – for version control
  • npm – Node Package Manager (yes, we’re installing package managers with package managers. Welcome to current year! Also, npm doesn’t actually stand for that, but shh.
  • Brackets – Was my text editor when I originally wrote this. Feel free to install Atom, VSC, or alternative instead or in addition to Brackets
  • f.lux – Night Shift for your Mac. Save your eyes!
  • Firefox – a front end dev should have all the major browsers installed
  • Gimp – a free Photoshop alternative
  • Google Chrome – web browser
  • MAMP – simplify and sandbox your development environment, if you choose
  • Opera – web browser
  • Spectacle – excellent free app for resizing your windows
  • Sequel Pro – excellent free GUI for MySQL databases
  • VLC Media Player – it plays everything!
  • Slack – the communication app
  • Sip – indispensable free app to gather the color/HEX code of any pixel on your screen
  • Simplenote – my note-taking app of choice
  • Todoist – my to-do app of choice
  • Numbers – the Apple equivalent of Excel – should come preinstalled
  • Pages – the Apple equivalent of Word

Note: I no longer use f.lux, as Mac comes with this feature now, and I use VSC instead of Brackets.

Below are the entire contents of my Brewfile, which will install all the above programs with a single command.

tap 'caskroom/cask'

brew 'git'
brew 'npm'

cask 'brackets'
cask 'flux'
cask 'firefox'
cask 'gimp'
cask 'google-chrome'
cask 'mamp'
cask 'opera'
cask 'spectacle'
cask 'sequel-pro'
cask 'vlc'

mas 'Numbers', id: 409203825
mas 'Pages', id: 409201541
mas 'Slack', id: 803453959
mas 'Sip', id: 507257563 
mas 'Simplenote', id: 692867256 
mas 'Todoist', id: 585829637

Now simply run this command to install the bundle.

brew bundle install


Config – ~/.bash_profile

Now that we have all our programs installed and Homebrew all nice and new, we should create a simple script to keep Homebrew up to date. I found this handy command on this Best of Homebrew gist.

First, create a .bash_profile dotfile in your home folder.

touch .bash_profile

We’ll create a bash alias to combine all the commands to keep Homebrew clean and up to date.

alias brewup='brew update; brew upgrade; brew prune; brew cleanup; brew doctor'

Run the following command.

source ~/.bash_profile

Now you can run brewup to update, upgrade, prune, cleanup, and doctor Homebrew. It’s a good idea to do this often, even daily.



Config – ~/.gitconfig

The first thing you should do with Git is set your global configuration. We can do this by running a lot of small commands which will update the Git configuration file.

git config --global user.name "First Last"

Or we can just create the Git configuration file and input it all ourselves.

touch .gitconfig

Here I’ll input my name, email, GitHub username, some aliases to be able to type less and do more, and connect Git to the OS X Keychain so I don’t have to type my username and password every time I want to push to GitHub.

    name = First Last
    email = [email protected]
    user = username
    a = add
    ca = commit -a
    cam = commit -am
    s = status
    pom = push origin master
    pog = push origin gh-pages
    puom = pull origin master
    puog = pull origin gh-pages
    cob = checkout -b
    helper = osxkeychain

With the above aliases, I can run git s instead of git status, for example. The less I have to type repeatedly, the happier I am.


If you use SSH (Secure Shell) to connect to any remote hosts via the command line, you can simplify the process.

Config – ~/.ssh/config

Create an SSH config file.

touch .ssh/config

Add the following contents, changing the variables for any hosts that you connect to. Using the below will connect to -i key.pem [email protected]. You can remove the IdentityFile if you don’t connect with a pem key. The output will then simply be [email protected] and you’ll be prompted for password authentication.

Host example
    HostName example.com
    User example-user
    IdentityFile key.pem

Now just run the alias to connect.

ssh example

Generate SSH key

You can generate an SSH key to distribute.

ssh-keygen -t rsa -b 4096 -C "[email protected]"


We’re going to use Node Version Manager (nvm) to install Node.js.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

Install the latest version.

nvm install node

Restart terminal and run the final command.

nvm use node

Confirm that you are using the latest version.

node -v

You can also test with which node, which will output your Node path and version number.


And for later, here’s how to update:

nvm install node --reinstall-packages-from=node

Node Package Manager

I have npm installed, and npm is mostly used locally for projects. The only thing I use globally at the moment is Gulp.


Install Gulp globally.

npm install --global gulp-cli


Ruby is required to run Jekyll, a popular static site generator. I’m going to download Ruby Version Manager (rvm) to make sure I have the updated version of Ruby without messing with the built-in system Ruby.

Download rvm

\curl -sSL https://get.rvm.io | bash -s stable

Install Ruby version

You can look for and install the latest version by number, or by running the below command.

rvm install ruby-head

You can run rvm list to see the full list of versions available. To use the latest version, find the number and run this command.

rvm --default use 2.4.0

Confirm that you are using the latest version.

rvm -v

You can also test with which ruby, which will output your Ruby path and version number.


Install bundler

Gem is the Ruby package manager that we’re going to use to install bundler…a package manager. This is necessary to use Jekyll and useful for any other Ruby project.

gem install bundler

Install Composer

A necessity for modern PHP development.

curl -sS https://getcomposer.org/installer | php

Add it to the executable path.

sudo mv composer.phar /usr/local/bin/composer

Test it on the command line.

composer --version

Virtual Hosts

If you’re using MAMP like I am to set up an Apache/MySQL/PHP/Python/Ruby environment, here is a mini-tutorial on setting up virtual hosts.

Terminal Colors

I like to set a color scheme for my terminal. You can do this from Preferences, or by finding one online and opening the .terminal file, which will open a terminal with the new preferences. You can then save it as default. Add this to your bash_profile to enable colors in Terminal.

I also added something that will show what Git branch you’re on.

export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\$(parse_git_branch)\[\033[m\]\$ "


I have a few preferences I like to set.

  • Keyboard > Text > Disable “Correct spelling automatically”
  • Security and Privacy > FileVault > On (makes sure SSD is securely encrypted)
  • Security and Privacy > Firewall > On (extra security measure)
  • Security and Privacy > General > App Store and identified developers
  • File Sharing > Off
  • Users & Groups > Login Items > Spectacle, Flux (I like these to open on startup)

A few more commands to change some defaults.

Show Library folder

chflags nohidden ~/Library

Show hidden files

defaults write com.apple.finder AppleShowAllFiles YES

Show path bar

defaults write com.apple.finder ShowPathbar -bool true

Show status bar

defaults write com.apple.finder ShowStatusBar -bool true

Prevent Two Finger Scroll on Chrome

defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE


That sums it up for my current preferences on setting up a 2015 era MacBook Pro. I hope it helped speed up your process, or gave you ideas for the next time you’re setting up a new computer. This should set the groundwork for adding new software and processes in the future.

I know there is a lot I’m still missing. Some of my goals for 2017 involve setup with popular software like Vagrant, VirtualBox, Docker, and Ansible. If there’s anything you do differently, please feel free to let me know!

I also recently acquired an actual PC running Windows, so I can probably do some of my articles in a Windows environment upon request.


Get updated when I create new content.
Unsubscribe whenever. Never any spam.


I'm Tania. I turn down every ad, affiliate, and sponsor request I get. I write free resources that help thousands of people successfully become devs. If you enjoy my content, please consider supporting what I do.

Support my work

Write a response

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

All code will be displayed literally.


  • Akis says:

    Thank you! You are awesome! I use Sip years now, but unfortunately it's not free anymore…

  • Todd says:

    This is great! Now I want buy a new Mac just to be able to run through this setup.

    I recently started a job that requires we use Windows. As a Mac person that feels a bit lost getting used to Windows, I would appreciate a post on your Windows setup.

  • David says:

    Hi folks, there is just one thing I’m not clear on: what is the .terminal file (mentioned under the Terminal colors section)? I am familiar with the .bash_profile configuration file from Linux, but I had no idea .terminal files were such a thing. I couldn’t find much info by Googling either. Perhaps someone can enlighten me or send a link?

  • Ben Jyring says:

    Great defaults, thanks for saving a lot of people a lot of headaches!

  • Nicola says:

    Thank you so much!!!! Amazing =)

  • Melissa says:

    SO HELPFUL! Thank you.

  • Jonathan says:

    Hey real cool, Im a fan of having everything very nice in my dev env,

    for the hidden files I have alias though

    alias showf=’defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app’

    alias hidef=’defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app’

  • James Brown says:

    Great write up! Thanks!

  • otedanyel says:

    Colors in Terminal! I didn’t know it was possible, thanks! 🙂
    I was hesitant to perform a clean install of Sierra on a 2012 MacBook Pro and thanks to your tutorial I feel more confident while setting up a Mac for development (I’m more of a designer).

  • Adrian says:

    Hi Tania! Congrats for the article, it’s very nice and useful. One question: about the app ID’s shown on the Brewfile, where did you get them? They are not valid for my installation so I had to do it through App Store instead using mas. Thanks!

  • Oscar says:

    Thanks for sharing this setup. I actually cloned your repo and tweaked it to include docker and docker-machine, plus VirtualBox. You can take a look at https://github.com/SharePointOscar/mac

    Thanks again, this makes life easier especially since I just setup the new MacBook Pro with this script!


  • Anton says:

    Hi Tania,
    Talking about popular virtualization tools you mentioned (Docker, Vagrant, VB etc) I’d suggest Docker to learn deeper, because nowadays it is widely used in production and test environments as the main DevOps tool. I used all of them and stuck in Docker because of its huge images warehouse on DockerHub, simplicity of packaging and deploying, system resources isolation, low memory consumption and so on. In other words you pack and deliver on server only your app and environment and nothing more. Vagrant and VirtualBox are usually used as just virtual machines with guest OS.
    As for Ansible – I use it as orchestration tool for delivering builds on remote servers via ssh and it is very handful due to its, so to speak, agentless tool. All you need is ssh access and prepared scripts (playbooks).
    So, Docker + Ansible is a comprehensive toolbox, swiss knife, to perform DevOps tasks. Try it and you won’t regret 🙂

  • Pera says:

    I’m also interested in your Windows setup.

    Great work!

  • Sam S says:

    Hi Tania,

    Love your blogpost! I have used Brackets before, but at a certain moment, it kept lagging like hell for reasons. Now I’m using Visual Studio Code, which I’m absolutely loving it so far. It’s also very easy to use with Git in VS Code.

  • Thanks for writing this article. 🙂

  • Paul says:

    Great list!!!, just one thing to point out. I think you might have a typo in “touch .bash_proflile”

  • Douglas says:

    Thanks! Your work is noticed, put to use, and appreciated greatly by a random fellow macbook user.

    I have an older machine that I’ve tweaked so many times and everything works but couldn’t tell you half of what I’ve done to it over the past 5 years. So this guide was exactly what I was looking for. Thanks again 🙂

    • Tania says:

      I’m glad it still managed to work despite years of tweaking! I like to try to compile everything in a fresh install as much as possible. 🙂

  • Ted Martin says:

    If you don’t mind telling, what Mac did you get? Even though they’ve received a lot of poor coverage, I’m a big fan of the 2016 MacBooks. Another great article!

    • Tania says:

      Actually, I got the previous model MacBook Pro, which was Early 2015. It was the lower tier one, at 13″, but it was a few hundred dollars cheaper than the new one with almost the same specs, and I like the old keyboard more.

  • Rocker irwin says:

    To me it is a bad idea to buy a Mac for development. There is nothing special about a Mac and yet costs much much more than the PC version with same specs if not better. If you are concerned about windows, there are hundreds of other Linux distributions. I seriously don’t get it. Can you tell me why you bought a Mac ?

    • Tania says:

      It doesn’t matter what you use: Mac or Windows. Vim or Emacs. Tabs or spaces. PHP or Python. If all the options didn’t have merit, there wouldn’t be an argument. This list is not meant to be an endorsement for or against anything, just one person’s web development workflow. Learn. Be open minded. Try new things. Research. Discover what works best for you. – Me

  • A.Prather says:

    Thank you for sharing… If its not too much to ask. Upon request, please share what you’ve done or would do on Windows, the same way you did with Mac.