CLI 트리란 CLI의 모든 그룹, 명령어, 플래그, 위치 인수, 도움말 텍스트, 자동 완성 모듈 경로를 설명하는 정적 중첩 사전입니다. 정적 CLI 트리는 활성 CLI에서 런타임에 생성된 CLI 트리보다 로드하고 액세스하는 속도가 훨씬 빠른 경우가 많습니다. 또한 더 간결한 표현입니다. 올바르게 구성된 CLI 트리를 사용하면 전체 CLI의 도움말 문서를 재현할 수 있습니다.
CLI-Trees 데이터 파일
CLI 트리는 JSON 파일에 저장된 사전입니다. 일반적으로 파일 기본 이름은 해당 CLI 이름입니다. 예를 들어 gdcloud CLI의 CLI 트리 파일 이름은 gdcloud.json입니다.
gdcloud CLI 모듈과 연결된 CLI 트리는 압축 해제된 gdcloud CLI 번들 디렉터리의 루트에 있는 data/cli 하위 디렉터리에 설치됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCLI trees are static, nested dictionaries that define a CLI's structure, including commands, flags, and help text.\u003c/p\u003e\n"],["\u003cp\u003eThey are faster to load and access compared to runtime-generated CLI trees and represent the information in a more compact format.\u003c/p\u003e\n"],["\u003cp\u003eCLI trees are stored as JSON files, with the filename typically matching the corresponding CLI name (e.g., \u003ccode\u003egdcloud.json\u003c/code\u003e for the gdcloud CLI).\u003c/p\u003e\n"],["\u003cp\u003eThe gdcloud CLI tree is located in the \u003ccode\u003edata/cli\u003c/code\u003e subdirectory within the unzipped gdcloud CLI bundle, yet the gdcloud CLI does not require this file to run.\u003c/p\u003e\n"]]],[],null,["# gdcloud topic cli-trees\n\nNAME\n----\n\ngdcloud topic cli-trees - Supplementary help for CLI trees.\n\nDESCRIPTION\n-----------\n\nCLI trees are static nested dictionaries that describe all groups, commands, flags, positionals, help text, and completer module paths for a CLI. A static CLI tree is often much faster to load and access than a CLI tree generated at runtime from an active CLI. It is also a more compact representation. A properly formed CLI tree can be used to reproduce the help documentation for an entire CLI.\n\nCLI-Trees Data Files\n--------------------\n\nA CLI tree is a dictionary stored in a JSON file. By convention, the file base name is the corresponding CLI name. For example, the CLI tree file name for the gdcloud CLI is `gdcloud.json`.\nCLI trees associated with gdcloud CLI modules are installed in the `data/cli` subdirectory of the root of the unzipped gdcloud CLI bundle directory. \n\n \u003cUNZIPPED_CLI_DIR_PATH\u003e/google-distributed-cloud-hosted-cli/data/cli/gdcloud.json\n\nThis file contains tree data for the gdcloud CLI. Note that the gdcloud CLI does not require this CLI tree to run."]]