cmdxray / commands / gcloud

What does gcloud do?

the Google Cloud CLI.

▸ Explain your own gcloud command →

gcloud examples, explained

$ gcloud compute instances list --project my-proj --zone us-central1-a

  • gcloudthe Google Cloud CLI
  • computemanage Compute Engine resources
  • instancesan argument passed to the command
  • listan argument passed to the command
  • --projectthe Cloud project ID to operate on
  • my-projvalue for --project
  • --zonethe zone to operate in
  • us-central1-avalue for --zone

$ gcloud storage cp ./dist gs://my-bucket --recursive

  • gcloudthe Google Cloud CLI
  • storagemanage Cloud Storage buckets and objects
  • cpan argument passed to the command
  • ./distan argument passed to the command
  • gs://my-bucketan argument passed to the command
  • --recursiverecurse into directories (e.g. storage copies)

gcloud subcommands

compute — manage Compute Engine resourcesstorage — manage Cloud Storage buckets and objectsauth — manage credentials and authorizationconfig — manage the local gcloud configurationprojects — manage Cloud projectscontainer — manage Kubernetes Engine (GKE) clustersfunctions — manage Cloud Functionsrun — manage Cloud Run servicesiam — manage identity and access managementapp — manage App Engine applications

gcloud flags & options

--projectthe Cloud project ID to operate on
--regionthe region to operate in
--zonethe zone to operate in
--accountthe account to run the command as
--formatoutput format (json, yaml, table, value, …)
--quietdisable interactive prompts, use defaults
--recursiverecurse into directories (e.g. storage copies)
--impersonate-service-accountrun the command as this service account

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.