GH-CODESPACE-PORTS(1)

✨ gh-codespace-ports(1) ✨

okay so this is a page straight out of the GitHub CLI manual, bestie β€” like, gh-codespace-ports(1), the whole thing. it's the one that lists the ports in your codespace and honestly? it's giving networking but make it cute. πŸ¦‹


πŸ’… NAME

gh-codespace-ports β€” literally just: list ports in a codespace. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS

gh codespace ports [flags]

that's it, that's the whole summoning ritual. ✨


🧚 AVAILABLE COMMANDS

okay so this command has children and they're both icons in their own right:


πŸ”₯ OPTIONS

every single flag, no skips, no cap:

  • -c, --codespace <string> β€” the name of the codespace. be specific, bestie πŸ’…
  • -q, --jq <expression> β€” filter the JSON output using a jq expression. curly braces and vibes πŸŽ€
  • --json <fields> β€” output JSON with the specified fields. pick your faves 🌸
  • -R, --repo <string> β€” filter codespace selection by repository name, in user/repo form. slay πŸ”₯
  • --repo-owner <string> β€” filter codespace selection by repository owner β€” that's a username or an org, either one πŸ¦‹
  • -t, --template <string> β€” format the JSON output using a Go template; peep gh help formatting for the tea ✨

πŸŽ€ JSON FIELDS

these are the fields you can ask for, exactly and only these:

browseUrl, label, sourcePort, visibility

four little icons, no more no less πŸ‘‘


⭐ EXIT CODES

know the numbers, know yourself:

  • 0 β€” successful execution. we ate and left no crumbs πŸ’–
  • 1 β€” error. not the vibe 😭
  • 2 β€” command canceled. nvm bestie πŸ™ˆ
  • 4 β€” authentication required. log in, babes πŸ’€
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. iykyk πŸ“–

🫢 SEE ALSO

gh-codespace(1) β€” the parent, the icon, the moment. go say hi πŸ’œ


and that's the page!! closing credits real quick: this is from GitHub CLI v2.102.0, dated Oct 2026 β€” like, it's literally stamped and everything πŸŽ€πŸ’– keep it in your bookmarks, mwah πŸ’‹

πŸ“¦ where this page comes from