gcloud alpha topic cli-trees Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha topic cli-trees - CLI trees supplementary help
- DESCRIPTION
(ALPHA)CLI trees are static nested dictionaries that describe allof the groups, commands, flags, positionals, help text, and completer modulepaths for a CLI. A CLI tree is often much faster to load and access than onegenerated at runtime from an active CLI. It is also a more compactrepresentation. A properly formed CLI tree can be used to reproduce the helpdocumentation for an entire CLI.- CLI Tree Data Files
- A CLI tree is a dictionary in a JSON file. By convention, the file base name isthe corresponding CLI name. For example, the CLI tree file name for
gcloudisgcloud.json.CLI trees associated with Google Cloud CLI modules are installed in the
data/clisubdirectory of the Google Cloud CLI installation root:$(gcloudinfo--format="value(installation.sdk_root)")/data/cli
This includes tree data for
gcloud(core component),bq,gsutil, andkubectl. Note that thetree data is installed with the component. If the component is not installedthen neither is its CLI tree. An installed component does not require its CLItree to run. Only thegcloudCLI tree is required by$gcloud alphainteractive.By default, CLI trees for other commands are JSON files generated on demand fromtheir
man(1) orman7.orgman pages. They are cached intheclisubdirectory of the global config directory:$(gcloudinfo--format="value(config.paths.global_config_dir)")/cli
- The gcloud CLI Tree
- The
gcloudCLI tree is used forstatic TAB completion, the corpus for$gcloud alpha help-search, and thedata source for$gcloudalpha interactivecompletions and help text generation. - Other CLI Trees
$gcloud alphainteractiveuses CLI tree data files for typeahead, command linecompletion and active help. A few CLI trees are installed with their respectiveGoogle Cloud CLI components:gcloud(core component),bq,gsutil, andkubectl.The generated trees are a close approximation. You can construct your own,especially for hierarchical CLIs like
git(1) that are hard toextract from man pages.- CLI Tree Schema
- TBD (
gcloud interactiveis still in ALPHA). - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudtopiccli-treesgcloudbetatopiccli-trees
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.