gcloud CLI overview Stay organized with collections Save and categorize content based on your preferences.
This page contains an overview of the Google Cloud CLI andits common command patterns and capabilities.
What is the gcloud CLI?
The Google Cloud CLI is a set of tools to create and manageGoogle Cloud resources. You can use these tools to perform many commonplatform tasks from the command line or through scripts and other automation.
For example, you can use the gcloud CLI to create and manage the following:
- Compute Engine virtual machine instances and other resources
- Cloud SQL instances
- Google Kubernetes Engine clusters
- Dataproc clusters and jobs
- Cloud DNS managed zones and record sets
- Cloud Deployment Manager deployments
You can also use the gcloud CLI to deploy App Engineapplications, manage authentication, customize local configuration, and performother tasks.
Download and install the gcloud CLI
The current gcloud CLI version is 550.0.0.
Caution: Make sure that you use the current version of thegcloud CLI, version 550.0.0. This allows youto use the latest features, including authorizing withgcloud init.If you use older versions of the gcloud CLI, you might encountererrors. To find the version number of gcloud CLI thatyou have installed, enter the following command:gcloud version. To learnhow to upgrade to the current version of the gcloud CLI, seeManage an installation.Although we strongly recommend that you use the current version ofgcloud CLI, you can also download and install previous versionsfrom thedownload archive.
If you're using Cloud Shell, the gcloud CLI is availableautomatically and you don't need to install it. Otherwise,download and install the gcloud CLI and theninitialize it.
By default, the gcloud CLI installscommands that are at the General Availability level. Additional functionality isavailable in gcloud CLIcomponents namedalpha andbeta. These componentsallow you to use the gcloud CLI to work with Bigtable,Dataflow, and other parts of the Google Cloud at earlier releaselevels than General Availability.
The gcloud CLI cheat sheet
For a quick introduction to the gcloud CLI, a list of commonlyused commands, and a look at how these commands are structured, see thegcloud CLI cheat sheet.
Release levels
The gcloud CLI commands have the following release levels:
| Release level | Label | Description |
|---|---|---|
| General Availability | None | Commands are considered fully stable and available for production use. For advance notice of changes to commands that break current functionality, see therelease notes. |
| Beta | beta | Commands are functionally complete, but could still have some outstanding issues. Breaking changes to these commands can be made without notice. |
| Alpha | alpha | Commands are in early release and may change without notice. |
Thealpha andbeta components are not installed by default when you installthe gcloud CLI. You mustinstall these componentsseparately using thegcloud components install command. If you try to run analpha or beta command and the corresponding component is not installed,the gcloud CLI prompts you to install it.
Command groups
Within each release level, gcloud CLI commands are organized into anested hierarchy of command groups, each of which represents a product orfeature of Google Cloud or its functional subgroups.
For example:
| Command group | Description |
|---|---|
gcloud compute | Commands related to Compute Engine in general availability |
gcloud compute instances | Commands related to Compute Engine instances in general availability |
gcloud beta compute | Commands related to Compute Engine in Beta |
gcloud alpha app | Commands related to managing App Engine deployments in Alpha |
Running gcloud CLI commands
You can run gcloud CLI commands from the command line andfromscripts and other automations—forexample, when using Jenkins to automate Google Cloud tasks.
Note: gcloud CLI reference documentation and examples usebackslashes,\, to denote long commands. You can execute these commands as-is(Windows users can use^ instead of\). If you'd like to remove thebackslashes, be sure to remove newlines as well to ensure the command is read asa single line.Properties
Thegcloud CLI properties are settings thataffect the behavior of the gcloud CLItools. Some of these properties can be set by either globalor command options—in which case, the value set by the option takes precedence.
Enabling accessibility features
For a more streamlined screen reader experience, the gcloud CLIcomes with anaccessibility/screen_reader property.
To enable the accessibility property, run:
gcloud config set accessibility/screen_reader trueFor more details about the accessibility features that come with the gcloudcommand-line tool, see theEnabling accessibility featuresguide.
Configurations
A configuration is a set of gcloud CLI properties. Aconfiguration works like aprofile.
When you start using the gcloud CLI, you'll work with a singleconfiguration nameddefault and you can set properties by runninggcloud init orgcloud config set. This single default configuration issuitable for most use cases.
To work with multiple projects or authorization accounts, you can set upmultiple configurations withgcloud config configurations create and switchamong the configurations. Within a configuration, you can customize properties.For example, to set your project within an active configurationuse theproject property:
gcloud config set project <project-id>For a detailed account of these concepts, see theConfigurations guide.
Global options
The gcloud CLI provides a set ofgcloud CLI optionsthat govern the behavior of commands on a per-invocation level. Options overridevalues set in gcloud CLI properties.
Positional arguments and options
While positional arguments and options affect the output of agcloud CLI command, there is a subtle difference in their usecases. A positional argument is used to define an entity on which a commandoperates while an options is required to set a variation in a command's behavior.
Use ofstdout andstderr
The output of successful gcloud CLI commands is written tostdout. All other types of responses—prompts, warnings, and errors—arewritten tostderr. Do not script against responses written tostderr becausethese responses aren't stable.
For guidelines on handling output, refer to theScripting guide.
Prompting
To protect against unintended destructive actions, the gcloud CLIconfirms your intentions before executing commands such asgcloud projects delete.
You might be prompted when additional information is needed.For example you will be asked to choose a zone when you create a Compute Enginevirtual machine instance usinggcloud compute instances create test-instance.
To disable prompting, use the--quiet option.
Do not script against the wording of prompts because the wording can change.
Suppressing prompting, writing to the terminal, and logging
The--quiet option (also,-q) for thegcloud CLIdisables all interactive prompts when running gcloud CLI commandsand is useful for scripting. If input is needed, defaults are used. If thereisn't a default, an error is raised.
To suppress printing of command output to standard output and standard error inthe terminal, use the--no-user-output-enabled option.
To adjust verbosity of logs, specify a verbosity level (debug, info, warning,error, critical, or none) using the--verbosity option.
Determining output structure
By default, when a gcloud CLI command returns a list of resources,the resources are pretty-printed to standard output. To produce more meaningfuloutput, theformat,filter, andprojection options allow you to fine-tuneyour output.
To define just the format of your output, use the--format option to produce a tabulatedor flattened version of your output (for interactive display) ora machine-readable version of the output (json,csv,yaml,value).
To format a list of keys that select resource data values, useprojections. To further refineyour output to criteria you define, usefilter.
What's next
- Learn more about gcloud CLI commands in thegcloud CLI reference.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-16 UTC.
