Set up GitHub Copilot in VS Code
This guide walks you through setting up GitHub Copilot in Visual Studio Code. To use Copilot in VS Code, you need to have access to GitHub Copilot with your GitHub account and have the Copilot extensions installed in VS Code.
If you don't yet have a Copilot subscription, you can use Copilot for free by signing up for the Copilot Free plan and get a monthly limit of completions and chat interactions.
Get access to GitHub Copilot
There are different ways to get access to GitHub Copilot:
-
As an individual, you can sign up to use Copilot for free, without the need for a credit card. You are entitled to a limited number of completions and chat interactions per month with the free plan, which reset each month. Learn more about the Copilot Free plan details and conditions.
-
As an individual, sign up for a paid subscription to get unlimited completions and chat interactions. You can try GitHub Copilot for free with a one-time 30-day trial.
-
If you are a member of an organization or enterprise that has a subscription to GitHub Copilot, you can request access to Copilot by going to https://github.com/settings/copilot and requesting access under "Get Copilot from an organization."
Learn more about billing for GitHub Copilot.
Set up Copilot in VS Code
-
Open the Copilot menu in the VS Code title bar and select Use AI Features with Copilot for Free... to open the Chat view
TipYou can also open the Chat view directly by using the keyboard shortcut โโI (Windows, Linux Ctrl+Alt+I) or with the Chat: Focus on Chat View command.
-
Select Sign in to Use Copilot to sign in to your GitHub account and get started. This also installs the GitHub Copilot extensions in VS Code.
-
If you don't yet have a Copilot subscription, follow the steps in the browser to sign up for the Copilot Free plan
ImportantTelemetry in your free version of GitHub Copilot is currently enabled. By default, code suggestions that match public code, including code references in the VS Code and <github.com> experience, are allowed. You can opt out of telemetry data collection by disabling telemetry in VS Code by setting telemetry.telemetryLevel to
off
, or you can adjust both telemetry and code suggestion settings in Copilot Settings.
Get started with Copilot in VS Code
After you've signed in to your GitHub account and have access to Copilot, start to explore AI-powered coding in VS Code.
-
Verify that the Chat view (โโI (Windows, Linux Ctrl+Alt+I)) shows, and that you can enter a prompt in the chat input box.
Notice that you can choose from multiple language models to use with Copilot.
-
Continue with the Copilot Quickstart to discover the key features of Copilot in VS Code.
Install Copilot extensions in VS Code
To manually install the GitHub Copilot extensions:
You can also open the Extensions view and search for GitHub Copilot to install the extension.
When you install the GitHub Copilot extension, the GitHub Copilot Chat extension is also installed.
Sign in to Copilot
Sign in to your GitHub account by entering GitHub Copilot: Sign in in the Command Palette (โงโP (Windows, Linux Ctrl+Shift+P))
Use a different GitHub account with 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.
-
Select the Accounts menu in the Activity Bar, and then select Sign out for the account you're currently signed in with for Copilot.
-
Sign in to your GitHub account by entering GitHub Copilot: Sign in in the Command Palette (โงโP (Windows, Linux Ctrl+Shift+P))
Alternatively, 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.
Next steps
-
Continue with the Copilot Quickstart to discover the key features of Copilot in VS Code.
-
Check our Copilot cheat sheet for an overview of the key Copilot commands and shortcuts.