macOS Basic Setup

Basic macOS 10.13+ development environment for Trellis, Bedrock, and Sage


Trellis, Bedrock, and Sage development on macOS relies on several libraries and software packages. This guide will show you how to install and configure each of these recommended packages on your computer. This guide assumes basic knowledge of command line and terminal usage.

  • Xcode Command Line Tools
  • Git
  • Homebrew
  • Composer
  • nvm
  • Node.js

Xcode Command Line Tools

Install Xcode Command Line Tools using the built-in command:

$ xcode-select --install


Git is automatically installed as part of the Xcode Command Line tools. Configure Git with your user information:

$ git config --global "Your Name"
$ git config --global ""


Install Homebrew from the instructions at, or with the following command:

$ /usr/bin/ruby -e "$(curl -fsSL"


Install Composer from Homebrew:

$ brew install composer

SSH key

Create SSH key

Trellis and GitHub both use SSH keys to communicate securely without the need to type a username and password each time. Create your SSH key and add them to your macOS Keychain:

$ ssh-keygen -t rsa -b 4096 -C ""

For more details on generating SSH keys, see GitHub's excellent documentation.

Add your SSH key to the ssh-agent

Modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain.

Edit your ~/.ssh/config file and add the following lines:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Join over 6,000 subscribers on our newsletter to get the latest Roots updates, along with occasional tips on building better WordPress sites.

Looking for WordPress plugin recommendations, the newest modern WordPress projects, and general web development tips and articles?

“Easily the best WordPress email I get.” Colin OBrien

Follow us on Twitter @rootswp

Ready to checkout?