How To Configure Google Cloud SDK on Mac

Install the Cloud SDK using Homebrew and start managing your projects via CLI

Ahad Sheriff
3 min readNov 23, 2021
Source: Google Cloud Platform

The Google Cloud SDK includes a CLI tool and lets developers run gcloud commands to help manage their projects. Sure, you could always just download and install the SDK directly, or you could skip a few steps and install it using Homebrew as I outline below.

Prerequisites

Make sure you have Python installed (Python 3 (3.5 to 3.8, 3.7 recommended) or Python 2 (2.7.9 or higher)

$ python -v

Make sure you have HomeBrew (and that it’s up to date):

$ brew --version
$ brew update

Install the Cask plugin. If you’re unfamiliar, Cask extends Homebrew and allows you to install large binary files via CLI.

$ brew tap homebrew/cask

Install the Cloud SDK

  1. Install the SDK via Homebrew
$ brew cask install google-cloud-sdk

2. Add SDK to your shell profile (i.e. ~/.zshrc )

# GCP SDK
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
source "$(brew…

--

--