GH-CODESPACE-VIEW(1)
π gh-codespace-view β bestie's guide to peeking at a codespace
okay so. this is gh-codespace-view, straight out of the GitHub CLI manual, and it's literally the command you run when you want the β¨detailsβ¨ about a codespace. not spawning one, not deleting one β just looking. it's giving "let me check on my baby" energy π.
πΈ NAME πΈ
gh-codespace-view β View details about a codespace π
like, all the deets. the tea. the whole vibe check on that one codespace. π«Ά
β¨ SYNOPSIS β¨
gh codespace view [flags]
that's it. that's the whole thing. no positional args, just vibes and flags π
π― OPTIONS π―
okay so here's where it gets juicy. every single flag, coming right up:
-c,--codespace <string>β Name of the codespace. this is how you point at which one you're obsessed with rn π-q,--jq <expression>β Filter JSON output using a jq expression. you get to say "no, bestie, only these fields" and jq does the slaying π₯--json <fields>β Output JSON with the specified fields. pick your faves from the list below, it's like a build-your-own output situation π-R,--repo <string>β Filter codespace selection by repository name (user/repo). narrowing it down by repo, iconic behavior π--repo-owner <string>β Filter codespace selection by repository owner (username or org). same energy but by whoever owns the thing π-t,--template <string>β Format JSON output using a Go template; seegh help formatting. custom output, main character formatting energy β¨
π¦ JSON FIELDS π¦
these are the fields you can ask for. all of them. every last one, no cap πβ¨
billableOwner, createdAt, devcontainerPath, displayName, environmentId, gitStatus, idleTimeoutMinutes, lastUsedAt, location, machineDisplayName, machineName, name, owner, prebuild, recentFolders, repository, retentionExpiresAt, retentionPeriodDays, state, vscsTarget
that's twenty fields, bestie. twenty. choose wisely π€
π EXIT CODES π
when the command finishes, it tells you how it went. this matters, fr fr:
0: Successful execution β slay, it worked π1: Error β something went sideways π2: Command canceled β u backed out, no judgment π«Ά4: Authentication required β u gotta log in first, bestie π
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. π like, check the specific command's help if you need more deets.
πΊ EXAMPLE πΊ
here are the literal examples, copied exactly, because I would never mess with your commands π
# 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
the first one? interactive picker energy. the second one? you already know which codespace. the third? lists every field for you. the fourth? cherry-picked fields, chef's kiss π
π§ SEE ALSO π§
gh-codespace(1)β the big one. go read it if you want the whole codespace cinematic universe πβ
π sign-off π
k bye bestie, this page was brought to you by GitHub CLI v2.102.0, dated Oct 2026 β go check on your codespaces, they miss you πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms