1
0
mirror of synced 2026-01-01 18:05:46 -05:00
Files
docs/content/copilot/quickstart.md

6.5 KiB

title, intro, product, allowTitleToDifferFromFilename, versions, shortTitle, topics
title intro product allowTitleToDifferFromFilename versions shortTitle topics
Quickstart for GitHub Copilot {% data variables.product.prodname_copilot %} can help you work, by offering inline suggestions as you code. {% data reusables.gated-features.copilot %} true
feature
copilot
Quickstart
Copilot

Introduction

{% data variables.product.prodname_copilot %} is an AI pair programmer. You can use {% data variables.product.prodname_copilot %} to get suggestions for whole lines or entire functions right inside your editor.

This guide will show you how to sign up for {% data variables.product.prodname_copilot %}, install the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %}, and get your first suggestion. For more information on {% data variables.product.prodname_copilot %}, see "About {% data variables.product.prodname_copilot %}." For more in-depth information on how to use {% data variables.product.prodname_copilot %} in a variety of environments, see "Getting Started."

Prerequisites

{% data reusables.copilot.copilot-prerequisites %}

  • To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the {% data variables.product.prodname_vscode %} documentation.

Signing up for {% data variables.product.prodname_copilot %}

Before you can start using {% data variables.product.prodname_copilot %}, you will need to set up a free trial or subscription.

{% data reusables.user-settings.access_settings %}

  1. In the "Code, planning, and automation" section of the sidebar, click GitHub Copilot.
  2. On the {% data variables.product.prodname_copilot %} settings page, click Start your free trial. Screenshot of GitHub Copilot settings with start your free trial button emphasized
  3. Choose whether you want to pay monthly or yearly, and click Continue to get access to Copilot.
    • If your personal account meets the criteria for a free {% data variables.product.prodname_copilot %} subscription instead of a trial, you will automatically be taken to step 6. Screenshot of trial setup with Continue to get access to Copilot button emphasized
  4. Confirm your payment details.
  5. Select your preferences, then click Save and get started.

Installing the {% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vscode %}

To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vscode %} extension.

  1. In the {% data variables.product.prodname_vscode %} Marketplace, go to the {% data variables.product.prodname_copilot %} extension page and click Install. Install {% data variables.product.prodname_copilot %} extension {% data variables.product.prodname_vscode %}
  2. A popup will appear, asking to open {% data variables.product.prodname_vscode %}. Click Open {% data variables.product.prodname_vscode %}.
  3. In the "Extension: {% data variables.product.prodname_copilot %}" tab in {% data variables.product.prodname_vscode %}, click Install. Install button in {% data variables.product.prodname_vscode %}
  4. If you have not previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, you will be prompted to sign in to {% data variables.product.prodname_dotcom %} in {% data variables.product.prodname_vscode %}.
    • If you have previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, {% data variables.product.prodname_copilot %} will be automatically authorized. Screen shot of {% data variables.product.prodname_vscode %} authorization screen
  5. In your browser, {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click Authorize {% data variables.product.prodname_vscode %}.
  6. In {% data variables.product.prodname_vscode %}, in the "{% data variables.product.prodname_vscode %}" dialogue box, to confirm the authentication, click Open.

Getting your first suggestion

{% data reusables.copilot.supported-languages %} The following samples are in JavaScript, but other languages will work similarly.

  1. Open {% data variables.product.prodname_vscode %}. {% data reusables.copilot.create-js-file %} {% data reusables.copilot.type-function-header %} {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. First suggestion {% data variables.product.prodname_vscode %} {% data reusables.copilot.accept-suggestion %}

Next Steps

You successfully installed {% data variables.product.prodname_copilot %} and received your first suggestion, but that's just the beginning! Here are some helpful resources for taking your next steps with {% data variables.product.prodname_copilot %}.

  • Getting Started: You've learned how to get your first suggestion in {% data variables.product.prodname_vscode %}. These guides show you how to set up and navigate the various functions of {% data variables.product.prodname_copilot %} across all of the supported environments.
  • {% data variables.product.prodname_copilot %}: See practical examples of how {% data variables.product.prodname_copilot %} can help you work.
  • Configuring {% data variables.product.prodname_copilot %}: These guides provide details on how to configure {% data variables.product.prodname_copilot %} to your personal preferences.

Further reading