一键导入
gcloud-components
Google Cloud CLI component manager via gcloud (`gcloud components`). List, install, update, or remove Google Cloud CLI components — repositories.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Google Cloud CLI component manager via gcloud (`gcloud components`). List, install, update, or remove Google Cloud CLI components — repositories.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
gcloud CLI reference: 128 GCP services, all GA commands with full flags, plus the standalone bq CLI. Use for any Google Cloud / GCP command-line task — managing resources, debugging gcloud commands, auth/config/scripting — or whenever a GCP product is named (GKE, Cloud Run, BigQuery, Cloud SQL, Pub/Sub...), even without 'gcloud'.
Access Approval via gcloud (`gcloud access-approval`). Manage Access Approval requests and settings — requests, service-account, settings.
Access Context Manager (VPC Service Controls) via gcloud (`gcloud access-context-manager`). Manage Access Context Manager resources — authorized-orgs, cloud-bindings, levels, perimeters, policies, supported-services.
Managed Service for Microsoft AD via gcloud (`gcloud active-directory`). Manage Managed Microsoft AD resources — domains, operations, peerings.
Agent Registry via gcloud (`gcloud agent-registry`). Manage Agent Registry resources — agents, bindings, endpoints, mcp-servers, operations, services.
AI Platform (legacy) via gcloud (`gcloud ai-platform`). Manage AI Platform jobs and models — jobs, local, models, operations, versions.
| name | gcloud-components |
| description | Google Cloud CLI component manager via gcloud (`gcloud components`). List, install, update, or remove Google Cloud CLI components — repositories. |
gcloud components manages the Google Cloud CLI's own component system — the installable parts of the CLI itself, such as the gcloud, bq, and gsutil tools, the alpha/beta command surfaces, and supporting packages like kubectl or local emulators. Reach for it to inspect what is installed, add tools, update or pin/downgrade the CLI version, remove components, or repair a corrupt installation. This is not a Google Cloud API-backed service: every command runs locally against the Cloud SDK component repository, with no project or API enablement required.
Note: the component manager is disabled when the CLI was installed via a package manager (APT, yum/dnf). In that case, manage components through the OS package manager instead (for example
apt-get install google-cloud-cli-kubectl). On Windows "All Users" installs, run install/update/remove from an Administrator terminal, and keep your working directory outside thegoogle-cloud-cliinstall directory.
# Status (not installed / installed / update available) of every component
gcloud components list
# Include installed and latest-available version numbers
gcloud components list --show-versions
# Only what is installed locally
gcloud components list --only-local-state
# See available component IDs first
gcloud components list
# Install one component (dependencies resolved automatically)
gcloud components install kubectl
# Install several at once
gcloud components install alpha beta
# Update all installed components to the latest version
gcloud components update
# Update (or downgrade) to a fixed Google Cloud CLI version
gcloud components update --version=1.2.3
# Remove a component and anything that depends on it
gcloud components remove kubectl
# Remove several at once
gcloud components remove alpha beta
# Downloads the latest CLI and reinstalls the same component set
gcloud components reinstall
# Register a Trusted Tester component repository
gcloud components repositories add http://repo.location.com
# List registered repositories
gcloud components repositories list
# Remove all registered repositories
gcloud components repositories remove --all
| Group | Reference file | Commands | Description |
|---|---|---|---|
components repositories | repositories.md | 3 | Manage additional component repositories for Trusted Tester programs |
Top-level commands (see _commands.md):
gcloud components install — install one or more componentsgcloud components list — list the status of all componentsgcloud components reinstall — reinstall the CLI with the components you have nowgcloud components remove — remove one or more installed componentsgcloud components update — update all installed components to the latest versionSee index.md for a one-line index of all 8 commands.
list. gcloud components list is the canonical source of installable IDs (kubectl, alpha, beta, gsutil, emulators, and so on); use those exact IDs as the positional args to install and remove.list is filterable like any gcloud list. It accepts --filter, --limit, and --sort-by in addition to the component-specific --only-local-state, --show-versions, and --show-platform.install also installs dependencies; remove also uninstalls anything that depends on the targets. Both list what they will change and prompt for confirmation.update, not install. install always installs at your current CLI version; to move the whole installation use gcloud components update --version=VERSION (a lower version downgrades the CLI).reinstall takes no arguments — it rebuilds the installation in place with the current component set.repositories remove can target specific URLs or use --all. With no URL and no flag it prompts you to pick a registered repository.