I\'m looking for a one-liner to get the default project id
with gcloud config list core/project give me
gcloud config list core/project
Your active configuration is: [defau
Not exactly the gcloud command you specified, but will return you the currently configured project:
gcloud info |tr -d '[]' | awk '/project:/ {print $2}'
Works for account, zone and region as well.