GitHub Codespaces?

1. What is GitHub Codespaces?

GitHub Codespaces is a cloud-based development environment that lets you code directly in your browser or Visual Studio Code, without needing to set up a local development environment.

2. Steps to Use GitHub Codespaces

Using GitHub Codespaces in a Browser

  1. Navigate to your repository on GitHub.

  2. Click the Code button, then switch to the Codespaces tab.

  3. Click Create codespace on main (or the branch you want to work on).

  4. The codespace will open in your browser, where you can start coding.

Using GitHub Codespaces in Visual Studio Code

  1. Install the GitHub Codespaces extension in Visual Studio Code.

  2. Open Visual Studio Code and go to the Remote Explorer panel in the Activity Bar.

  3. Select GitHub Codespaces from the dropdown.

  4. Sign in to GitHub and authorize the extension.

  5. Create or open a codespace:

    • To create: Click the "+" icon in Remote Explorer and select a repository.

    • To open: Select an existing codespace from the list.

Using GitHub CLI

  1. Install and authenticate the GitHub CLI.

  2. Use the following commands:

    • To list codespaces: gh codespace list

    • To create a new codespace: gh codespace create -r <OWNER/REPO>

    • To open a codespace in VS Code: gh codespace code -c <CODESPACE_NAME>

3. Customizing and Personalizing

  • Dev Containers: You can configure your codespace with a devcontainer.json file for a consistent development environment.

  • Dotfiles: Use a dotfiles repository to personalize your settings like shell preferences and tools.

For more detailed instructions, visit:

Choose a template

Start a codespace from a template and get to developing with the power of a virtual machine in the cloud.

  • Blank

    By github

    Start with a blank canvas or import any packages you need.

    Use this template

  • React

    By github

    A popular JavaScript library for building user interfaces based on UI components.

    Use this template

  • .NET

    By github

    A full-stack web application template written in C# leveraging the power of .NET 8.

    Use this template

  • Ruby on Rails

    By github

    A full-stack web framework for building dynamic websites that deliver a rich user experience.

    Use this template

  • .Jupyter Notebook

    By github

    JupyterLab is the latest web-based interactive development environment for notebooks, code, and data.

    Use this template

  • Express

    By github

    Express is a minimal and flexible Node.js web application framework.

    Use this template

  • Next.js

    By github

    Next.js is a React framework that gives you building blocks to create web applications.

    Use this template

  • Django

    By github

    Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design.

    Use this template

  • Flask

    By github

    Flask is a lightweight web application framework.

    Use this template

  • Preact

    By github

    A fast 3kB alternative to React with the same modern API.

    Use this template