GH-CODESPACE-LIST(1)

πŸ’… gh-codespace-list β€” the manual page, but make it make sense

okay so real quick β€” this is the gh-codespace-list page straight out of the GitHub CLI manual (we're on v2.102.0, don't @ me). Let's get into it bestie ✨


✨ NAME ✨

gh-codespace-list β€” literally just, like, list your codespaces πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

gh codespace list [flags]

that's it. that's the whole vibe. flags are optional, the codespaces are not πŸ’€


🌸 DESCRIPTION 🌸

It lists the codespaces that belong to the authenticated user β€” aka you, the main character πŸ‘‘.

Alternatively, if you're an organization administrator, you can list all the codespaces that are billed to the organization. like, all of them. the whole collection. slay for the admins fr fr πŸ’–

just clocking that "organization administrators may" β€” that's an admin-only situation, not a you-situation unless you're actually an admin.

πŸŽ€ OPTIONS πŸŽ€

  • -q, --jq <expression> β€” filter the JSON output using a jq expression. yes you can pipe-and-jq it, icon behavior honestly πŸ”₯
  • --json <fields> β€” output JSON with the fields you specify. you pick 'em, it prints 'em ✨
  • -L, --limit <int> β€” max number of codespaces to list. default is 30 β€” so yes, there's a cap by default, that's not a bug 🫢
  • -o, --org <login> β€” the login handle of the organization you want to list codespaces for. heads up: this one's admin-only πŸ‘‘
  • -R, --repo <string> β€” repository name with owner, formatted like user/repo. keep the slash, bestie πŸ’…
  • -t, --template <string> β€” format the JSON output using a Go template. for the details, see gh help formatting πŸ¦‹
  • -u, --user <username> β€” the username to list codespaces for. this is used with --org, so they're a duo, not a solo act 🫢
  • -w, --web β€” list codespaces in the web browser instead. cannot be used with --user or --org β€” pick a lane ngl 🚫

🌈 ALIASES 🌈

because typing the whole thing is so much effort:

  • gh codespace ls
  • gh cs ls

short, sweet, iconic ⭐


πŸ’œ JSON FIELDS πŸ’œ

these are the fields you can get out of --json, in the exact order the page gives 'em:

  • createdAt
  • displayName
  • gitStatus
  • lastUsedAt
  • machineName
  • name
  • owner
  • repository
  • state
  • vscsTarget

no cap, that's the whole list πŸ“


🧚 EXIT CODES 🧚

so you know what happened when it's done:

  • 0 β€” Successful execution πŸŽ‰
  • 1 β€” Error 😭
  • 2 β€” Command canceled πŸ™ˆ
  • 4 β€” Authentication required (go log in bestie) πŸ”‘
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. so like, don't come for me if there's a fifth one β€” check gh help πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole thing! sourced from the GitHub CLI manual, v2.102.0, dated Oct 2026 β€” and yep, that's genuinely what GH-CODESPACE-LIST(1) says at the bottom. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from