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.
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.
gcloud auth login signs you in as the person running gcloud commands.
gcloud auth application-default login signs in the code that runs as
you. That includes SDKs, local scripts, and any tool that looks for
Application Default Credentials. These are 2 separate credential stores.
Most setups need both.
What you’ll achieve
- A working
gcloudCLI on macOS Apple Silicon, on yourPATHin any new shell. - Two separate sign-ins: one for
gcloudcommands, one for SDKs and local tools that use Application Default Credentials.
Tutorial setup 3 prerequisites
- A Google account — with access to at least one Google Cloud project.
- A terminal — zsh or bash. The default macOS shell works.
- Python 3 — macOS 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.
Run gcloud --version in a fresh terminal. You should see the SDK version
and a list of installed components. If the command is not found, your
shell did not pick up the new PATH. Open a new window or source your
shell config.
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 newPATH. Open a new terminal window or runsource ~/.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 loginandgcloud auth application-default loginare two different sign-ins, and which tools need which. - Where the SDK lives on disk, and how to keep it out of
~/Downloadsso a future cleanup does not break your tooling. - How to set a default project and quota project so you stop passing
--projectto every command.
Related articles
Connect Tableau Server to Claude Code via MCP + PAT
Wire Claude Code into Tableau Server using the official MCP server, authenticated with a Personal Access Token — list workbooks and views from chat.
Give Claude Code system-wide memory with CLAUDE.md
Put your KPIs, role, and writing style in one file at ~/.claude/CLAUDE.md and Claude Code reads it on every prompt — across every project.
Connect Claude Code to Slack with the official plugin
Install the official Slack plugin for Claude Code with one command, then post to channels and read threads from any session — no custom MCP server needed.