GH-CODESPACE-CREATE(1)
β¨ gh-codespace-create, the GitHub CLI manual β¨
okay bestie, welcome to the gh-codespace-create page β it's the part of the GitHub CLI manual that teaches you how to literally summon a codespace out of thin air π«Ά
πΈ NAME πΈ
gh-codespace-create β create a codespace π
(yes that's the whole job and she does it gorgeously)
π¦ SYNOPSIS π¦
gh codespace create [flags]
that's it. that's the whole vibe. just you, the command, and whatever flags you feel like sprinkling on top β¨
π OPTIONS π
okay so here's the full menu, no skips, no cuts, all of it π
-b,--branch <string>β which repository branch you want, like literally pick a branch bestie πΏ--default-permissionsβ do not prompt you to accept the extra permissions the codespace is asking for, just go with the defaults and keep it moving π--devcontainer-path <string>β the path to thedevcontainer.jsonfile to use when creating the codespace, iykyk π§-d,--display-name <string>β a display name for your codespace, and it's gotta be 48 characters or less (the limit is real, don't fight it) β--idle-timeout <duration>β how long it can sit there doing nothing before the codespace gets stopped, e.g."10m","1h"π€-l,--location <string>β the location:{EastUs|SouthEastAsia|WestEurope|WestUs2}β and no worries, it's determined automatically if you don't provide it π-m,--machine <string>β the hardware specifications for the VM, aka how much machine your machine gets π₯-R,--repo <string>β repository name with owner:user/repoπ--retention-period <duration>β allowed time after shutting down before the codespace is automatically deleted (maximum 30 days), e.g."1h","72h"β like a lil grace period before it's gone gone π-s,--statusβ show status of post-create command and dotfiles π-w,--webβ create the codespace from the browser, but heads up: cannot be used with--display-name,--idle-timeout, or--retention-periodπ
ngl the --web one is the picky icon of the group β she does not share the stage with those three flags, periodt.
π EXIT CODES π
so when the command wraps up, here's what the numbers mean:
0: Successful execution β slay, it worked π1: Error β okay we have a problem π2: Command canceled β you (or something) bailed π4: Authentication required β you gotta prove who you are first π
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. (basically, check the receipts, there might be more π)
π SEE ALSO π
gh-codespace(1)β go hang out with the rest of the codespace family, they're iconic π«Ά
and that's the whole page, bestie π no cap, you're now a gh-codespace-create expert.
made with love by the GitHub CLI, v2.102.0, dated Oct 2026 π
π¦ 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