Cloud Command Line Tools — Tricks & Automation
1 min readJan 14, 2020
cloud shell ask for help
gcloud beta builds triggers create --help
gcloud services list --help
Get current project_id and store it into environment variable.
PROJECT_ID=$(gcloud config get-value project)
cloud get structured value
$ gcloud services list --available \
--format="table[box,margin=3,title='✨ Enabled Services ✨'](config.title,state)"
┌───────────────────────────────────────────────────────────────┐
│ ✨ Enabled Services ✨ │
├────────────────────────────────────────────────────┬──────────┤
│ TITLE │ STATE │
├────────────────────────────────────────────────────┼──────────┤
│ Abusive Experience Report API │ DISABLED │
│ Accelerated Mobile Pages (AMP) URL API │ DISABLED │
...
│ BigQuery API │ ENABLED │
...
│ Zync Render API │ DISABLED │
└────────────────────────────────────────────────────┴──────────┘