How to install Copilot CLI on Windows 11

Run AI from your terminal. GitHub Copilot CLI brings coding help directly to Command Prompt and PowerShell on Windows 11.

Install Copilot CLI
Install Copilot CLI / Image: Mauro Huculak & AI
  • GitHub Copilot CLI lets you use AI directly inside Command Prompt or PowerShell on Windows 11.
  • The tool helps generate, debug, and explain commands and code using natural language.

On Windows 11, you can now install the GitHub Copilot CLI to access the chatbot from Command Prompt or PowerShell in Windows Terminal. In this guide, I’ll outline the steps to complete the process.

What’s GitHub Copilot CLI?

GitHub Copilot CLI is an AI coding assistant you can use to get help while using one of the available command-line shells, such as Command Prompt or PowerShell. You can use it to get assistance with running commands or coding, as it can help you build, debug, and understand code in natural language.

Although this chatbot is powered by OpenAI GPT-5, this isn’t your traditional Copilot. This is GitHub Copilot, a paid coding agent, but there’s a free tier that offers limited access to the chatbot to help you get started.

In this guide, you’ll learn the steps to install and uninstall the GitHub version of Copilot that you can use through the Command Prompt or PowerShell.

Install Copilot CLI on Windows 11

To install the GitHub version of Copilot on Windows 11, follow these steps:

  1. Open Start.

  2. Search for Command Prompt (or Terminal), right-click the top result, and choose the Run as administrator option.

  3. Type this command to install Copilot in the Windows Terminal and press Enter:

    winget install GitHub.Copilot

    Install Copilot CLI winget

  4. Type this command to start the Copilot command-line tool and press Enter:

    Copilot

    Run Copilot CLI on Windows 11

  5. Choose the option to trust Copilot access to the system drive.

    Copilot CLI confirm folder trust

    Quick note: If you choose 1, then the chatbot will only have access during the current session. If you choose 2, the chatbot will have access during the current and future sessions.
  6. Select the GitHub.com option to sign in and access the chatbot.

  7. Open your GitHub account on the website and confirm the one-time code.

Once you complete the steps, you can proceed to use the CLI version of Copilot to perform tasks with AI.

Get the Pureinfotech Newsletter

All the latest guides and news delivered in your inbox

Uninstall Copilot CLI on Windows 11

To uninstall the GitHub version of Copilot on Windows 11, follow these steps:

  1. Open Start.

  2. Search for Command Prompt (or Terminal), right-click the top result, and choose the Run as administrator option.

  3. Type this command to install Copilot in the Windows Terminal and press Enter:

    winget uninstall GitHub.Copilot

    Uninstall Copilot CLI winget

  4. (Optional) Open File Explorer.

  5. Open this path:

    C:\Users\YourUsername
  6. Select and delete the .copilot folder that contains your “config.json” and the session state.

    Delete .copilot folder

  7. (Optional) Open Credential Manager.

  8. Click on Windows Credentials

  9. Select the copilot-cli entry under the “Generic Credentials” section and click the Remove button.

    Credential Manager remove GitHub login

After you complete the steps, the CLI version of Copilot will be uninstalled from your computer.

Thank you for your feedback!
About the author

Mauro Huculak is a Windows How-To Expert and founder of Pureinfotech in 2010. With over 22 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications: Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at [email protected].