To install Copilot CLI on Windows 11, run winget install GitHub.Copilot in PowerShell 7, then start it with copilot and sign in with /login.
This guide covers the WinGet and npm routes, the PowerShell and Node.js requirements, token sign-in, updates, removal and the errors people hit most.

Install Copilot CLI on Windows 11
WinGet ships with Windows 11 as part of App Installer, so this route needs no extra tools. GitHub publishes the package under the ID GitHub.Copilot.
- Open Start, type PowerShell 7, and open it.
- Run
winget install GitHub.Copilotand wait for the install to finish. - Close the window and open a new PowerShell 7 window.
- Use
cdto move into a folder that holds the code you want to work on. - Type
copilotand press Enter. - At the trust prompt, choose 1. Yes to trust the folder for this session only.
- Type
/login, press Enter, and finish the sign-in in the browser window that opens.
Copilot CLI is ready once the prompt accepts a question. To try new features early, install GitHub.Copilot.Prerelease instead of GitHub.Copilot.

What’s GitHub Copilot CLI?
GitHub Copilot CLI brings Copilot into your terminal. It answers questions, writes and debugs code, and works with GitHub.com, for example by making changes to a project and opening a pull request.
On Windows it runs from PowerShell or from Windows Subsystem for Linux (WSL). It can read, change and run files in the folder you start it from, so it asks before it does anything risky.
| Feature | What it does | How to use it |
|---|---|---|
| Interactive mode | A chat session in the terminal that can plan and carry out tasks | Run copilot |
| Plan mode | Copilot drafts an implementation plan before it writes code | Press Shift + Tab to switch in and out |
| Programmatic mode | Runs one prompt, completes the task and exits | Run copilot -p "your prompt" |
| File context | Adds a file's contents to your prompt | Type @ followed by the relative path |
| Shell commands | Runs a command directly without calling the model | Start the line with ! |
| Tool approval | Asks before running commands that change or execute files | Pick 1. Yes, the session option, or 3. No |
If you also use Google's terminal agent, you can install Antigravity CLI on Windows 11 in a similar way, with its own command.
GitHub Copilot CLI requirements for Windows 11
GitHub lists three requirements. Node.js matters only if you install through npm.
| Requirement | Details | How to meet it |
|---|---|---|
| Copilot plan | Copilot CLI is included in every Copilot plan, including Copilot Free and Copilot Student | Sign up for a plan on GitHub, or get a seat from your organization |
| PowerShell v6 or higher | Windows 11 includes Windows PowerShell 5.1, which is too old | Install PowerShell 7 with WinGet |
| Node.js 22 or later | Needed for the npm install method only | Install a current LTS release from nodejs.org |
| Organization policy | If Copilot comes from an organization or enterprise, the Copilot CLI policy must be enabled | Ask the organization owner or enterprise administrator |
PowerShell 7 installs side by side with Windows PowerShell 5.1 and does not replace it. Both stay in the Start menu.
How to install PowerShell 7 for Copilot CLI
Microsoft's recommended route is WinGet. You can run this from Windows PowerShell 5.1 or Command Prompt, the same way you would install PowerShell 7 on Windows 11 for any other purpose.
winget install --id Microsoft.PowerShell --source winget
--id Microsoft.PowerShell picks the stable PowerShell 7 package, and --source winget skips the Microsoft Store source. From PowerShell 7.6.0 onward the package installs as MSIX by default.
You should see: A PowerShell 7 entry appears in the Start menu, and running pwsh starts it.
If you need the older MSI-based installer, add --installer-type wix to the same command.

How to install Copilot CLI with npm on Windows
Use npm if you already manage developer tools through Node.js. The npm package is @github/copilot, and it needs Node.js 22 or later.
- Install Node.js 22 or later from nodejs.org if it is not already on the PC. The Windows Installer (
.msi) is the recommended system-wide option. - Open a new PowerShell 7 window.
- Run
npm --versionto confirm that npm responds. - Run
npm install -g @github/copilotto install the stable release. - For the prerelease build, run
npm install -g @github/copilot@prereleaseinstead. - Run
copilotfrom your project folder and sign in with/login.
If npm install stops with a scripts error, check your .npmrc file for ignore-scripts=true and use the fix in the troubleshooting section below.

How to log in to Copilot CLI
On a local Windows desktop, Copilot CLI uses a browser sign-in by default. You can sign in with a GitHub account or a Microsoft Entra account.
- Start Copilot CLI with
copilotin PowerShell 7. - Type
/loginand press Enter. Outside a session,copilot logindoes the same job. - Approve the request in the browser window that opens.
- Return to PowerShell and wait for the CLI to confirm the sign-in.
- On a remote terminal or when the browser cannot reach the PC, run
copilot login --device-codeand enter the code it shows.
After sign-in, the token is saved in the system credential store. If no credential store is available, it goes into a plain text file under the .copilot folder in your user profile.
Copilot CLI personal access token on Windows
A token suits scripts and automation where no browser sign-in is possible. It must be a fine-grained personal access token owned by your personal account. Classic tokens that start with ghp_ are not supported.
- Open github.com/settings/personal-access-tokens/new in your browser.
- Under Resource owner, select your personal account, not an organization.
- Under Repository access, choose Public repositories, All repositories or Only select repositories.
- Under Permissions, select the Account tab, click Add permissions and select Copilot Requests.
- Click Generate token and copy it.
- For the current PowerShell session, run
$Env:COPILOT_GITHUB_TOKEN = 'your-token'. - To keep it for future sessions, run
[Environment]::SetEnvironmentVariable('COPILOT_GITHUB_TOKEN', 'your-token', 'User')and open a new window.
Copilot CLI checks COPILOT_GITHUB_TOKEN first, then GH_TOKEN, then GITHUB_TOKEN. A stale value in a higher variable wins over a fresh one lower down.
How to check if Copilot CLI is installed
- Open a new PowerShell 7 window.
- Run
copilot --version. A version number means the command is on your PATH. - Run
copilot versionto see the version and check whether an update is available. - Start
copilotand type a short question. A reply means sign-in and your plan both work. - Type
/usageto see the session's usage and per-model token totals.
How to update Copilot CLI on Windows
Copilot CLI can update itself, whichever way you installed it. Inside a session, /update does the same thing, and /update stable or /update prerelease also saves the channel for future updates.
copilot update
Downloads and installs the latest Copilot CLI release.
You should see: copilot --version reports the newer version number in a new window.
Copilot CLI slash commands list
Slash commands control the session itself. Type them at the Copilot prompt, not at the PowerShell prompt.
| Command | What it does |
|---|---|
/login, /logout |
Sign in to or out of Copilot |
/model |
Pick the AI model, or choose Auto |
/help |
Show help for interactive commands |
/cwd or /cd |
Change or show the working directory |
/add-dir |
Trust another directory for file access |
/clear or /new |
Start a new conversation |
/usage |
Show session usage and token totals |
/update |
Update the CLI to the latest version |
/feedback |
Send feedback about the CLI |
/exit or /quit |
Close the current session |
Press Esc twice within half a second to stop a task that is still thinking. Press Ctrl + C twice to exit.
How to change the model in Copilot CLI
Copilot Free and Copilot Student use auto model selection only. Paid plans can pick a model from a list.
- Start
copilotand type/model. - Select a model in the picker, or choose Auto.
- Press Enter to switch the current session to that model.
- To make it the default for future sessions, run
/model --globaland pick the model again. - For a single run, start the CLI with
copilot --modelfollowed by the model ID.

Uninstall Copilot CLI on Windows 11
Remove Copilot CLI with the same tool you used to install it.
- Open PowerShell 7.
- If you used WinGet, run
winget uninstall --id GitHub.Copilot --source winget. For the prerelease, useGitHub.Copilot.Prerelease. - If you used npm, run
npm uninstall -g @github/copilot. - Open a new window and run
copilot --version. An error that the command is not recognised confirms removal. - Delete the
.copilotfolder in your user profile if you also want to remove saved settings and session data. - Revoke any personal access token you created at github.com/settings/personal-access-tokens.
Adding --source winget to the uninstall command avoids a Microsoft Store agreement prompt.
Copilot CLI not working on Windows 11
"Error: No authentication information found"
No sign-in or token is stored anywhere the CLI checks.
- Run
copilot login, or startcopilotand type/login. - If you rely on a token, run
$Env:COPILOT_GITHUB_TOKENand check that it prints a value. - Set the variable again if it prints nothing, then open a new window.
"Error: Authentication failed" or 401 Unauthorized
The token was revoked, has expired or lacks the Copilot Requests permission.
- Open your fine-grained tokens on GitHub and check the token's expiry date.
- Create a new token owned by your personal account with Copilot Requests added.
- Replace the old value in
COPILOT_GITHUB_TOKEN,GH_TOKENorGITHUB_TOKEN.
Classic token (ghp_) rejected
Copilot CLI does not accept classic personal access tokens.
- Remove the
ghp_token from your environment variables. - Sign in with
/login, or create a fine-grained token instead.
403 Forbidden or policy denied
Your account has no Copilot plan, or an organization or enterprise policy blocks Copilot CLI.
- Check your Copilot plan in your GitHub account settings.
- If Copilot comes from your employer, ask the organization owner to enable the Copilot CLI policy.
Copilot CLI signs in with the wrong account
Several accounts are signed in, or a token variable overrides your sign-in.
- Check
COPILOT_GITHUB_TOKEN,GH_TOKENandGITHUB_TOKENfor an old token. - Use
/userinside the CLI to switch accounts.
npm install of Copilot CLI fails with ignore-scripts
Your .npmrc file sets ignore-scripts=true, which blocks the package's install scripts.
- Run
$Env:npm_config_ignore_scripts = 'false'in PowerShell 7. - Run
npm install -g @github/copilotagain in the same window.
Copilot CLI on Windows FAQ
Is Copilot CLI free?
Yes, with limits. GitHub includes Copilot CLI in every Copilot plan, including Copilot Free and Copilot Student. Free plans get an allowance of AI credits and auto model selection only, while paid plans add larger allowances and model choice.
Does Copilot CLI work in Windows PowerShell 5.1?
No. GitHub requires PowerShell v6 or higher on Windows, and Windows 11 ships with Windows PowerShell 5.1. Install PowerShell 7 with winget install --id Microsoft.PowerShell --source winget and run Copilot CLI from it.
Do I need Node.js to install Copilot CLI?
Only for the npm method, which needs Node.js 22 or later. The WinGet package GitHub.Copilot installs Copilot CLI without Node.js, so most Windows 11 users can skip Node entirely.
Can I use Copilot CLI in WSL?
Yes. GitHub supports Copilot CLI on Windows from PowerShell or from Windows Subsystem for Linux. Inside a WSL distribution, install it with npm or the Linux install script rather than WinGet.
Where does Copilot CLI store its settings on Windows?
Copilot CLI keeps settings and state in the .copilot folder in your user profile. Its user settings file is settings.json in that folder. Set the COPILOT_HOME environment variable to use a different folder.
How do I install the Copilot CLI prerelease?
Run winget install GitHub.Copilot.Prerelease, or npm install -g @github/copilot@prerelease if you use npm. Inside a session, /update prerelease switches the update channel and saves it for later updates.
Can my organization block Copilot CLI?
Yes. If you get Copilot through an organization or enterprise, the owner or administrator can disable Copilot CLI in its settings. You then cannot use the CLI with that seat, even though other Copilot features still work.
![Among Us with friends: How to play online and local [step-by-step guides]](https://techdows.com/wp-content/uploads/2026/12/Among-Us-with-friends-How-to-play-online-and-local-step-by-step-guides-1-600x338.jpg)




