This Visual Studio Code extension allows you to seamlessly connect to your GitHub Codespaces directly from the editor. It uses the gh command-line interface to fetch your active codespaces and establish an SSH connection.
Features
Lists all your active GitHub Codespaces.
Allows you to select a codespace to connect to.
Automatically configures your SSH settings.
Uses the repository name as the SSH host for easy identification.
Opens a new VS Code window connected to the selected codespace via Remote-SSH.
Requirements
Visual Studio Code: Version 1.72.0 or higher.
GitHub CLI (gh): You must have the GitHub CLI installed and authenticated. You can install it from the official website and authenticate by running gh auth login.
Remote - SSH Extension: This extension depends on the official Remote - SSH extension from Microsoft.
How to Use
Install the "GitHub Codespaces Connector" extension from the Visual Studio Code Marketplace.
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Run the "Connect to GitHub Codespaces" command.
A quick pick menu will appear, listing your available codespaces.
Select the codespace you want to connect to.
A new VS Code window will open, connected to your selected codespace.