Tooling

Install gcloud on macOS Apple Silicon in 5 steps

Install the Google Cloud CLI on macOS Apple Silicon in 5 steps, then sign in twice — once as yourself, once for Application Default Credentials.

··3 min read·Koppelvlak

The Google Cloud CLI (gcloud) lets you run Google Cloud commands from your terminal. Most local tools, like Terraform and MCP servers, also use it to find credentials.

Installing it on macOS takes 5 steps. You download the archive, extract it, run the installer, then sign in twice.

What you’ll achieve

  • A working gcloud CLI on macOS Apple Silicon, on your PATH in any new shell.
  • Two separate sign-ins: one for gcloud commands, one for SDKs and local tools that use Application Default Credentials.
Tutorial setup 3 prerequisites
Requirements
  • A Google accountwith access to at least one Google Cloud project.
  • A terminalzsh or bash. The default macOS shell works.
  • Python 3macOS includes a compatible version. The installer will find it.

Step-by-step guide

Step 1: Download the archive

Download the Apple Silicon build into your current directory:

curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-arm.tar.gz

Step 2: Extract it

tar -xf google-cloud-cli-darwin-arm.tar.gz

This creates a google-cloud-sdk/ directory next to the archive. Move it somewhere permanent before you run the installer. Your home directory is a good choice. If you leave it in ~/Downloads and later clean that folder out, gcloud will be deleted with it.

Step 3: Run the installer

./google-cloud-sdk/install.sh

The script adds gcloud to your PATH and sets up shell completion. It asks before editing your .zshrc or .bash_profile. Say yes unless you manage your shell config elsewhere. Open a new terminal window so the updated PATH takes effect.

Step 4: Sign in as yourself

gcloud auth login

This opens a browser, asks you to pick a Google account, and saves a credential for the gcloud command. After this, commands like gcloud projects list and gcloud compute instances list will work.

Step 5: Sign in for application code

gcloud auth application-default login

This uses the same browser flow but saves to a different credential store. It writes ~/.config/gcloud/application_default_credentials.json. Libraries and tools read this file when they call google.auth.default() or similar. If you skip this step, anything other than the gcloud CLI will fail with an authentication error.

Verification / Testing

In a new terminal window, run:

gcloud --version
gcloud projects list

The first command confirms gcloud is on your PATH. The second confirms your user sign-in worked — you should see at least one project. To confirm Application Default Credentials are set, check the file exists:

ls ~/.config/gcloud/application_default_credentials.json

Troubleshooting

  • gcloud: command not found. Your shell did not pick up the new PATH. Open a new terminal window or run source ~/.zshrc (or ~/.bash_profile).
  • Tools complain about a missing quota project. Some APIs bill against a “quota project” that is separate from the one holding your resources. Run gcloud auth application-default set-quota-project your-project-id.
  • Every command needs --project. Set a default once: gcloud config set project your-project-id.

What you learned

  • Why gcloud auth login and gcloud auth application-default login are two different sign-ins, and which tools need which.
  • Where the SDK lives on disk, and how to keep it out of ~/Downloads so a future cleanup does not break your tooling.
  • How to set a default project and quota project so you stop passing --project to every command.