GH-CODESPAC...S-VISIBILITY(1)

πŸ‘‘ gh-codespace-ports-visibility β€” the girlies' guide ✨

Okay so bestie, welcome to gh-codespace-ports-visibility β€” a page straight out of the GitHub CLI manual (that's the GH-CODESPAC...S-VISIBILITY(1) header up top, we're not copying it, we're referencing it πŸ’…). This is the little command that changes the visibility of the forwarded port on your codespace. That's it. That's the whole job. And honestly? Iconic.


πŸ’– NAME πŸ’–

gh-codespace-ports-visibility β€” change the visibility of the forwarded port. No cap, that's literally what it does. πŸ¦‹


✨ SYNOPSIS ✨

gh codespace ports visibility <port>:{public|private|org}... [flags]

Read it slow, bestie: you give it a <port>, a colon :, and then one of public, private, or org. And you can stack more than one of those <port>:{public|private|org} pairs β€” see the ...? That's the ellipsis of do it again, queen 🌈. Plus [flags] at the end if you're feeling extra.


πŸŽ€ OPTIONS INHERITED FROM PARENT COMMANDS πŸŽ€

These aren't even hers, she inherited them from her parent command and we respect the lineage πŸ‘‘

  • -c, --codespace <string> β€” the Name of the codespace. Tell her which one, bestie, she's not a mind reader πŸ™ˆ.
  • -R, --repo <string> β€” Filter codespace selection by repository name (user/repo). That's the user/repo format, not just the repo, okurrr πŸ’….
  • --repo-owner <string> β€” Filter codespace selection by repository owner (username or org). You can drop a username or an org name in here, whichever you've got 🫢.

πŸ”₯ EXIT CODES πŸ”₯

Vibe check on how it left the building πŸšͺ✨

  • 0 β€” Successful execution. She ate. πŸ’€πŸŽ‰
  • 1 β€” Error. Something went sideways, we move. 😭
  • 2 β€” Command canceled. You (or the universe) hit the brakes πŸ›‘.
  • 4 β€” Authentication required. Bestie. Log in. πŸ”
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. So like, these are the base game codes β€” some commands got DLC πŸ‘€

🌸 EXAMPLE 🌸

Here's the moment, the main character energy, the demonstration:

$ gh codespace ports visibility 80:org 3000:private 8000:public

Look at her go 🧚 β€” port 80 set to org, port 3000 set to private, port 8000 set to public. Three ports, one line, zero notes πŸ’œ.


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! πŸŽ€πŸ’–βœ¨ This lore drop was brought to you by GitHub CLI v2.102.0, dated Oct 2026 β€” yes, from the future, we don't ask questions πŸ’…. Love you, go forth and set your ports to whatever visibility your heart desires πŸŒˆπŸ‘‘πŸ“

πŸ“¦ where this page comes from