The gcloud CLI is Google Cloud Platform's unified command-line interface for managing resources, services, and infrastructure across the entire GCP ecosystem (current version: 566.0.0, April 2026). Unlike service-specific tools like gsutil or bq, gcloud provides a single, consistent entry point for Compute Engine, Cloud Storage, GKE, Cloud Run, IAM, and hundreds of other Google Cloud services — including Cloud Run functions (the modern successor to Cloud Functions). Understanding gcloud's hierarchical command structure (surface groups → commands → flags) and mastering its filtering, formatting, and configuration capabilities are essential for automating workflows and managing multi-project environments. The CLI supports alpha, beta, and preview release tracks for early access to experimental features, but production workloads should rely on GA (generally available) commands.
What This Cheat Sheet Covers
This topic spans 22 focused tables and 173 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Installation and Configuration
| Command | Example | Description |
|---|---|---|
gcloud init | Interactive setup wizard that authenticates your account, sets default project, and configures region/zone. | |
gcloud auth login | Opens browser to authorize your user account via OAuth and stores credentials. | |
gcloud auth application-default login | Sets up Application Default Credentials (ADC) for client libraries — separate from gcloud CLI credentials. | |
gcloud auth list | Lists all credentialed accounts and shows which is active. | |
gcloud auth print-access-token | Prints the current OAuth 2.0 access token for use in REST API calls or scripts. | |
gcloud config set project my-projectgcloud config set compute/zone us-central1-a | • Assigns a property value in the active configuration • commonly used for project, compute/region, and compute/zone. | |
gcloud config get-value project | Retrieves the current value of a single configuration property. | |
gcloud config list | Displays all properties of the active configuration in one view. |