gcloud config get-value project

Category: Google Cloud & Workspace

gcloud config get-value project

Print the currently configured project ID

Outputs just the project ID string, making it easy to embed in scripts or verify which project you are about to touch. Run it before destructive commands to confirm you are working in the right project. Related: gcloud config list shows every setting at once.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.