is now available! Read about the new features and fixes from October.

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. Learn more about billing for GitHub Copilot.

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.

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 a 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

Alternatively, you can sign in to GitHub in VS Code by selecting the Accounts menu in the Activity Bar, and then Sign in with GitHub to use GitHub Copilot.

Accounts menu in VS Code, showing the option to sign in with GitHub to use GitHub Copilot.

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

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 next to the Command Center that gives you quick access to Copilot functionality in VS Code.

    Screenshot showing the GitHub Copilot icon in the Command Center in VS Code.

  3. Select the Copilot icon and select Open Chat to open the Chat view.

    The Copilot Chat view should open in the Secondary Side Bar, where you can chat with Copilot.

    Screenshot showing the Chat view in the Activity Bar in VS Code.

Sign out of GitHub Copilot

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.

To sign out of your GitHub account in VS Code, select the Accounts menu in the Activity Bar, and then select Sign out for the account you're currently signed in with for Copilot.

Accounts menu in VS Code, showing the option to sign out of the current GitHub account.

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.