gh codespace view
查看有关 codespace 的详细信息
gh codespace view [flags]
选项
-c,--codespace <string>- codespace 的名称
-q,--jq <expression>- 使用 jq 表达式过滤 JSON 输出
-
--json <fields> - 使用指定的字段输出 JSON
-R,--repo <string>- 按仓库名称(user/repo)过滤 codespace 选择
-
--repo-owner <string> - 按仓库所有者(用户名或组织)过滤 codespace 选择
-t,--template <string>- 使用 Go 模板格式化 JSON 输出;请参阅“gh help formatting”
JSON 字段
billableOwner, createdAt, devcontainerPath, displayName, environmentId, gitStatus, idleTimeoutMinutes, lastUsedAt, location, machineDisplayName, machineName, name, owner, prebuild, recentFolders, repository, retentionExpiresAt, retentionPeriodDays, state, vscsTarget
示例
# select a codespace from a list of all codespaces you own
$ gh cs view
# view the details of a specific codespace
$ gh cs view -c codespace-name-12345
# view the list of all available fields for a codespace
$ gh cs view --json
# view specific fields for a codespace
$ gh cs view --json displayName,machineDisplayName,state