OS Manuals

gh-codespace-create(1)

gh-codespace-create - Create a codespace

GH-CODESPACE-CREATE(1) GitHub CLI manual GH-CODESPACE-CREATE(1)

gh-codespace-create - Create a codespace

gh codespace create [flags]

Repository branch

Do not prompt to accept additional permissions requested by the codespace

Path to the devcontainer.json file to use when creating codespace

Display name for the codespace (48 characters or less)

Allowed inactivity before codespace is stopped, e.g. "10m", "1h"

Location: {EastUs|SouthEastAsia|WestEurope|WestUs2} (determined automatically if not provided)

Hardware specifications for the VM

Repository name with owner: user/repo

Allowed time after shutting down before the codespace is automatically deleted (maximum 30 days), e.g. "1h", "72h"

Show status of post-create command and dotfiles

Create codespace from browser, cannot be used with --display-name, --idle-timeout, or --retention-period

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

gh-codespace(1)

Oct 2026

gh 2.103.3-r1 · os · ingested 2026-10-31