Note
GitHub Codespaces is not available on subdomains of GHE.com, such as octocorp.ghe.com
.
You can reopen any of your active or stopped codespaces on GitHub, in Visual Studio Code, or by using GitHub CLI. You can't reopen a codespace that has been deleted. See Understanding the codespace lifecycle.
You can view all your codespaces on the "Your codespaces" page at github.com/codespaces. From this page, you can:
- Open, stop, or delete your codespaces.
- See who owns (and may be billed for) your codespaces: your personal account, or organizations you belong to. See About billing for GitHub Codespaces.
- See the machine type, size, and status of your codespaces.
- Create a new codespace, either by choosing one of GitHub's templates or by clicking New codespace. See Creating a codespace from a template and Creating a codespace for a repository.
- Prevent automatic deletion of a codespace. See Configuring automatic deletion of your codespaces.
Reopening an existing codespace
If you have installed GitHub CLI, you can use it to work with GitHub Codespaces. For installation instructions for GitHub CLI, see the GitHub CLI repository.
-
In a terminal, enter one of the following GitHub CLI commands.
-
To open a codespace in VS Code, enter:
Shell gh codespace code
gh codespace code
Note
You must have VS Code installed on your local machine. See Setting up Visual Studio Code in the VS Code documentation.
-
To open a codespace in the browser, enter:
Shell gh codespace code --web
gh codespace code --web
-
To open a codespace in JupyterLab, enter:
Shell gh codespace jupyter
gh codespace jupyter
Note
The JupyterLab application must be installed in the codespace you are opening. The default dev container image includes JupyterLab, so codespaces created from the default image will always have JupyterLab installed. For more information about the default image, see Introduction to dev containers and the
devcontainers/images
repository. If you're not using the default image in your dev container configuration, you can install JupyterLab by adding theghcr.io/devcontainers/features/python
feature to yourdevcontainer.json
file. You should include the option"installJupyterlab": true
. For more information, see the README for thepython
feature, in thedevcontainers/features
repository. -
To access a codespace from the command line, over SSH, enter:
Shell gh codespace ssh
gh codespace ssh
-
-
Using the arrow keys, navigate to the codespace that you want to open.
-
To open the codespace, press Enter.
See gh codespace code
in the GitHub CLI manual.