Friday, May 15, 2026

Getting staryted with GitHub Copilot CLI

GitHub Copilot CLI is a terminal-native AI coding assistant that brings the capabilities of GitHub Copilot directly into your command line.

In order to proceed, you will need the following:

  1. GitHub account
  2. .NET 10
  3. SQLite
  4. GitHub Copilot CLI
  5. If your operating system is Windows, you will need the latest version of Poweshell.

GitHub account

If you do not already have a GitHub account, create one at https://github.com.

.NET 10

The current release version of .NET is version 10.0. To find out which version of .NET you have, type the following command in any terminal window on your computer:

dotnet --version
        

If you do not have .NET on your computere, or your version is older than 10.0, then visit https://dotnet.microsoft.com/en-us/download to download and install .NET 10.0 on your computer.

SQLite

SQLite is a lightweight database engine that we will use later in our tutorials. To determine whether or not you have SQLite installed, type the following command in any terminal window on your computer:

sqlite3 --version
        

If you do not have SQLite, then:

  1. Visit https://dotnet.microsoft.com/en-us/download to download and install it.
  2. Download sqlite-tools-win-x64-3530100.zip
  3. Extract the zip to somewhere on your computer.
  4. Add the folder where to extracted the ZIP file to the path.
  5. Run:
    sqlite3 --version
            

GitHub Copilot CLI

You can find out whether or not you have the GitHub Copilot CLI by typing the following command in a terminal window:

copilot --version
        

If you do not have GitHub Copilot CLI, then visit the 'Installing GitHub Copilot CLI' site and follow the instructions for your operating system.

PowerShell (only for Windows)

If you are using macOS or Linux, you can skip this section. Otherwise, if you are on Windows, you must ensure that you have PowerShell version 7 (or later) installed on your computer.

To determine the version of PowerShell on your Windows computer, start PowerShell, then enter the following command in the window:

$PSVersionTable.PSVersion
        

If your version is older than 7.0, then update PowerShell to the latest version by typing this command in a PowerShell terminal window:

winget install Microsoft.Powershell
        

To ensure that you have the version 7 (or later) of PowerShell, type the following in a terminal window:

pwsh
        

Once you have installed all the above, you're all set and ready to go.

Using GitHub Copilot CLI

To start a GitHub Copilot CLI session, type the following command in a terminal window:

copilot
        

If asked to trust files in current folder, select Yes and press ENTER.

Confirm Trust

If this is the first time using GitHub Copilot CLI, you must login into GitHub by typing in the /login command followed by ENTER:
              login

Select GitHub.com by hitting ENTER on 1.

select github

A one-time code will displayed and your browser will be used for authentication once you press any key.
              one-time code

Your default browser will open to the Device Activation page.

Enter the one-time code that was given to you in the GitHub Copilot CLI, then click on Continue. Note that it will be different from the code in the image below.

  

Click on Authorize github. 

Once you are fully authenticated, you should received the message in your browser:

  enter code

Go back to the copilot CLI andyou will be asked to sign up for Copilot Free if you havent already. Select 1. Yes, sign up for Copilot Free and hit 'Enter'


enter code

Once you have completed everything, you can enter any prompt into the CLI. For example, enter the following:

What are the top five spoken languages?
        

You might be asked some question and choose whichever option you prefer.

enter code

This is the response I received:

enter code

NOTE: The AI model that you are using in the bottom right corner of the tool.

To change the AI model, type /model followed by ENTER:
              enter code

You can switch to another AI model by using the up and down arrows on your keyboard. But for now we will stick with GPT-5 mini (default)
              enter code

Medium for the reasoning effort for GPT-5 mini

enter code

To quit GitHub Copilot CLI and return to the host operating system, type /exit followed by ENTER.