Jump to
gCloud CLI

Google Cloud Command Line Interface (gcloud CLI)

Create and manage Google Cloud resources and services directly on the command line or via scripts using the Google Cloud CLI. With broad platform compatibility and service coverage, perform common platform tasks faster and control your cloud resources at scale.

Benefits

Fast, scriptable orchestration

The gcloud CLI gives you a terminal command-line method to interact with the same Google Cloud services you already manage using the Cloud console. Interact via the Console and use it for scriptable automation.

Accelerates your software development

Manage development workflows like pushing files to VMs, using data emulators for local Pub/Sub, databases, or BigQuery development, and deploying code to Cloud Functions.

Simplifies authentication

Authenticate to Google Cloud services using various simplified authentication approaches. Implement authentication flows for your client libraries code to run seamlessly locally, in staging, and production.

Key features

Key features

Orchestrate Google Cloud resources granularly and at scale

Google Cloud CLI supports over 8,000 commands to provide complete management and control over nearly all Google Cloud services and products. The CLI also provides preview command sets for early access to pre-release Google Cloud products.

Local emulators to accelerate software development

To assist with your local software development, the gcloud CLI provides data emulators for Bigtable, Cloud Datastore, Firestore, Spanner, and Pub/Sub for local development, testing, and validation. These simulate the service back ends to help you write client-side code more efficiently.

The gcloud CLI is also bundled with specialized sub-tools for working with BigQuery (the bq CLI), Cloud Storage (the gsutil CLI), and Kubernetes Clusters (the kubectl CLI) to provide precise and deep control over those respective products.

With bq, run BigQuery queries and manipulate datasets, tables, and entities. With gsutil, manage Storage buckets and objects, and with kubectl, deploy and manage Kubernetes container clusters.

Multi-platform installers, or run in web-based Cloud Shell

Supports Linux, Mac OS X, and Windows and is available across a breadth of package managers, OS installers, and as a Docker image. Alternatively, or in conjunction, you can simply launch a Cloud Shell session to access the preinstalled gcloud CLI directly in the web browser and without installing anything. 

Deploy applications to App Engine or Cloud Functions

For various serverless products, the gcloud CLI is the primary interface by which you upload code to run and generally support your development workflow. For example, for Cloud Function, you can use the CLI to describe or trigger a function, display its log entries, or deploy updates to it.

Embedded help text and comprehensive web documentation

Use the help flag to access inline documentation or view quickstarts and how-to guides on the web. The CLI is also backed by detailed reference documentation. For some services such as Cloud Compute, the Cloud Console provides equivalent gcloud CLI commands so you can use a UI interface to build up complex command and flag combinations.

View all features

Documentation

Documentation

Tutorial

Install Google Cloud CLI

Download and initialize the latest version of Google Cloud CLI.

Tutorial

Install additional components

Download additional command-line components like bq, gsutil, kubectl, preview gcloud commands, or necessary dependencies.

Google Cloud Basics

Overview of the Google Cloud CLI

A comprehensive, high-level look at the gcloud CLI, including its release levels, command structure, and important concepts.

Tutorial

Scripting gcloud commands

Run gcloud commands from a script by utilizing features like prompt disabling and output filtering and formatting.

Quickstart

Hands-on labs: Using the gcloud CLI

Learn how to install and configure gcloud CLI, then use it to perform some basic operations like creating VMs, networks, and using gsutil to perform operations.

Not seeing what you’re looking for?

Use cases

Use cases

Use case
Script gcloud CLI commands

When you script with gcloud CLI, you can run gcloud commands using scripts or other automations—for example, by using Bash scripts, or when using Jenkins to drive automation of Google Cloud tasks. Additionally, the gcloud command-line tool comes with the ability to filter and format command output to easily structure and extract information as well as combine multiple commands to manage your Google Cloud resources non-interactively.

All features

All features

gsutil

The gsutil tool provides access to Cloud Storage, including a wide range of bucket and object management tasks, directly from the command line.

bq

The bq tool enables running queries and manipulating datasets, tables, and entities in BigQuery through the command line.

kubectl

The kubectl tool provides commands for greater control over Kubernetes clusters. With kubectl, you can deploy applications, inspect and manage cluster resources, and view logs, among a wide set of operations.

Emulators

Google Cloud CLI comes with emulators for products like Bigtable, Datastore, Firestore, Spanner, and Pub/Sub, for local development, testing, and validation.

Interactive mode

The gcloud interactive shell produces suggestions and auto-completion for commands, sub-commands, flags, and file and resource arguments. Inline help is displayed in the lower section.

Cloud Console command construction

For Cloud Compute, Cloud Storage, and several other popular services, you can use the Cloud Console web-UI to manipulate drop-down menus and the point-and-click interface to build up the precise equivalent gcloud command.

Refineable output verbosity

Command response verbosity, list page sizes, and other filters are available to refine output sizes and other usage characteristics.

Export to Terraform (Preview)

Export the current state of your cloud resources and configurations into a Terraform compatible text file. You can use this to later reapply the configuration to create a duplicate environment, revert to a good known configuration, or for other DevOps style management purposes.

Pricing

Pricing

As part of the Google Cloud SDK, the Google Cloud CLI is available at no charge for users with a Google Cloud account.

Take the next step

Start building on Google Cloud with $300 in free credits and 20+ always free products.

Google Cloud
  • ‪English‬
  • ‪Deutsch‬
  • ‪Español‬
  • ‪Español (Latinoamérica)‬
  • ‪Français‬
  • ‪Indonesia‬
  • ‪Italiano‬
  • ‪Português (Brasil)‬
  • ‪简体中文‬
  • ‪繁體中文‬
  • ‪日本語‬
  • ‪한국어‬
Console
Google Cloud