Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Google Cloud CLI

$ gcloud Official High Risk
Google Cloud · Cloud & Infra · Apache-2.0 · macos / linux / windows

Google Cloud CLI (gcloud) provides uniform access to GCP compute, IAM, GKE, and storage services with --format=json, server/client --filter and --format projections, --quiet (-q) prompt suppression, and --impersonate-service-account privilege scoping.

FCRS-1.0 Score
90 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install --cask google-cloud-sdk
CLI vs MCP Decision CLI Preferred vs MCP

gcloud combines universal --format=json and --filter projection across every GCP API with zero MCP schema bloat.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Universal --format=json, built-in --filter and field projection (json(a,b)), plus --quiet make gcloud highly predictable for agents.

  • Global --format=json, --filter, and --quiet flags across subcommands
Trust & Safety 20 / 25

Supports named configurations (gcloud config configurations), --project pinning, and --impersonate-service-account, though cloud billing and destructive blast radius remain high.

  • Supports --impersonate-service-account and named config profiles
Setup & Portability 12 / 15

Available on macOS, Linux, and Windows, though the Python-bundled SDK has a larger install footprint and slower cold startup than Go binaries.

  • Cross-platform installers and Homebrew cask google-cloud-sdk
Utility & Efficiency 15 / 15

Field projection via --format="json(field1,field2)" trims huge GCP responses directly at the CLI layer.

  • Native client-side projection reduces token usage
Maintenance & Lineage 10 / 10

First-party Google Cloud SDK updated weekly alongside GCP service releases.

  • Official Google Cloud distribution under Apache-2.0
Docs & Verifiability 10 / 10

Complete built-in --help trees and exhaustive online command reference.

  • Consistent offline gcloud <group> --help documentation

Security, Auth & Guardrails

Auth Modes
OAuth Browser Service Account Config File
Credential Storage

Stores OAuth credentials and named configurations in ~/.config/gcloud/, or honors CLOUDSDK_CORE_PROJECT and GOOGLE_APPLICATION_CREDENTIALS.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI is free (Apache-2.0); GCP API calls can provision billable cloud infrastructure.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# gcloud Agent Rules
- ALWAYS pass `--format=json` and `--quiet` (`-q`) and pin `--project` explicitly.
- Run `gcloud config list --format=json` first to confirm account and project boundaries.
- Prefer `--impersonate-service-account` with least-privilege roles over personal owner credentials.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect active account and project configuration
gcloud config list --format=json

Verifies the active GCP account, project ID, and default region before running any command.

List Compute Engine instances with filtered JSON
gcloud compute instances list --format="json(name,zone,status)" --quiet

Uses --format="json(...)" field projection to avoid dumping oversized instance metadata.

Controlled Writes & Previews

Run an IAM policy change under service-account impersonation
gcloud projects add-iam-policy-binding my-proj --member=serviceAccount:[email protected] --role=roles/viewer --impersonate-service-account=deployer@my-proj.iam.gserviceaccount.com --quiet

Scopes mutations via --impersonate-service-account and suppresses prompts with --quiet.

Strengths for Agents

  • + Every command honors --format=json with inline field projection.
  • + --quiet cleanly disables interactive confirmation prompts in scripts.
  • + --impersonate-service-account enables auditable short-lived privilege elevation.

Caveats & Pitfalls

  • ! Python runtime startup is noticeably slower than single-binary Go CLIs.
  • ! Lacks a universal --dry-run flag across GCP resource creation commands.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI