Set up GitHub Copilot in VS Code

This tutorial walks you through setting up your GitHub Copilot subscription and installing the GitHub Copilot extension in Visual Studio Code. After you complete these steps, you can get started with GitHub Copilot in VS Code.

For an overview of what you can do with GitHub Copilot in VS Code, see the GitHub Copilot Overview.

Step 1: Set up your GitHub Copilot subscription

If you want to use GitHub Copilot, you either need an active subscription for GitHub Copilot in your personal account, or you need to be assigned a seat in a subscription managed by an organization or enterprise.

Account type Instructions
Personal account Set up a subscription to GitHub Copilot Individual with your personal GitHub account. You can activate a one-time 30-day trial to evaluate GitHub Copilot.

If you didn't yet activate your free trial for Copilot, the GitHub Copilot extension notifies you in VS Code.
Copilot sign up notification in VS Code
Member of an organization You need to be assigned a seat by an organization owner.

You can request access to GitHub Copilot Business from the GitHub Copilot settings for your personal account.
Screenshot of Copilot settings, showing how to request access from an organization.

Learn more about billing for GitHub Copilot.

Step 2: Install the GitHub Copilot extension

You use the GitHub Copilot extension to power your artificial intelligence (AI) suggestions in VS Code.

Install the GitHub Copilot extension

When you install the GitHub Copilot extension, the GitHub Copilot Chat extension is also installed.

Step 3: Sign in to GitHub

To use GitHub Copilot in Visual Studio Code, you must be signed into Visual Studio Code with the same GitHub account that has access to GitHub Copilot.

If you didn't previously authorize VS Code in your GitHub account, you're prompted to sign in to GitHub in VS Code:

VS Code notification to sign into the Copilot extension

In your browser, GitHub requests the necessary permissions for GitHub Copilot. To approve these permissions, select Authorize Visual Studio Code.

Note: If your Copilot subscription is associated with another GitHub account, sign out of your GitHub account in VS Code, and sign in with another account. Use the Accounts menu in the Activity bar for signing out of your current GitHub account.

Validation: Check the Copilot status

Now that you've signed up for GitHub Copilot and activated the extension, let's verify that it's actually active.

  1. Open Visual Studio Code.

  2. Notice the GitHub Copilot icon in the status bar, which indicates that GitHub Copilot is active.

    Screenshot showing the VS Code status bar, highlighting the Copilot icon that indicates Copilot is active.

  3. Select the GitHub Copilot icon to open the Copilot status.

    The GitHub Copilot status should show Ready.

    Screenshot showing the GitHub Copilot status menu in VS Code, indicating that the Copilot status is ready.

Next steps

You've successfully set up Copilot in VS Code with your GitHub Copilot subscription. Continue your journey and discover the key features of GitHub Copilot in VS Code with the Copilot Getting Started Tutorial.