gh Verified current stable Not installed? Cloud Infrastructure

Gh / Create Codespace Github Interactively

Create Codespace Github Interactively

Easily provision a new codespace environment on GitHub for your development needs.

$
Terminal
gh cs create

When To Use

Provisioning a development environment for a new feature or bug fix.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
? Select a repository to create a codespace for:
  1. my-repo
  2. another-repo

? Choose a branch:
  1. main
  2. feature-branch

Creating your codespace...

Power User Variants

Optimized versions

gh cs create --repo my-repo

Create a codespace for a specific repository.

gh cs create --branch feature-branch

Create a codespace for a specific branch.

Command Breakdown

What each part is doing

gh
Base Command
The executable that performs this operation. Here it runs Gh before the shell applies any redirect operators.
cs
cs|codespace
The value supplied for cs|codespace.

How To Run

Execution path

  1. Step 1

    Run the command `gh cs create` in your terminal.

  2. Step 2

    Follow the prompts to select a repository and branch.

  3. Step 3

    Wait for the codespace to be provisioned.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.