Copilot CLI: Install, Update, Authenticate, and Launch

Commands for installing GitHub Copilot CLI, authenticating, updating, and starting interactive or wrapped sessions.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Install Copilot CLI

Install the current CLI on major platforms and channels.

Install with npm

Install Copilot CLI globally with npm.

bashANYcopilotinstallnpm
bash
npm install -g @github/copilot

Use this on any platform when Node.js 22 or later is available.

Install with npm when ignore-scripts is enabled

Force npm to run install scripts.

bashANYcopilotinstallnpm
bash
npm_config_ignore_scripts=false npm install -g @github/copilot

Useful when your `~/.npmrc` sets `ignore-scripts=true`.

Install the prerelease build with npm

Install the prerelease channel.

bashANYcopilotinstallnpmprerelease
bash
npm install -g @github/copilot@prerelease

Good for testing features before they reach the stable channel.

Install with Homebrew

Install Copilot CLI on macOS or Linux via Homebrew.

bashANYcopilotinstallbrew
bash
brew install copilot-cli

A clean option for developer machines that already use Homebrew.

Install prerelease with Homebrew

Install the prerelease formula.

bashANYcopilotinstallbrewprerelease
bash
brew install copilot-cli@prerelease

Lets you try upcoming releases from the Homebrew ecosystem.

Install with WinGet

Install Copilot CLI on Windows.

powershellANYcopilotinstallwingetwindows
powershell
winget install GitHub.Copilot

Use this on Windows PowerShell v6 or later.

Install prerelease with WinGet

Install the prerelease package on Windows.

powershellANYcopilotinstallwingetprerelease
powershell
winget install GitHub.Copilot.Prerelease

Useful when validating new features on Windows runners or laptops.

Install with script or via gh

Bootstrap the CLI with the install script or invoke it through GitHub CLI.

Install using the official curl script

Download and install Copilot CLI with curl.

bashANYcopilotinstallcurl
bash
curl -fsSL https://gh.io/copilot-install | bash

Best for macOS and Linux when you want a fast bootstrap without npm or Homebrew.

Install using the official wget script

Download and install Copilot CLI with wget.

bashANYcopilotinstallwget
bash
wget -qO- https://gh.io/copilot-install | bash

Equivalent to the curl installer when wget is your standard tool.

Install a specific version to a custom prefix

Pin a version and custom install directory.

bashANYcopilotinstallversionprefix
bash
curl -fsSL https://gh.io/copilot-install | VERSION="v0.0.369" PREFIX="$HOME/custom" bash

Useful in CI, sandboxes, or when testing a specific historical build.

Launch Copilot CLI through gh

Use the GitHub CLI wrapper to run Copilot.

bashANYghcopilotwrapper
bash
gh copilot

If Copilot CLI is not already installed, `gh` can download and run it on supported platforms.

Run a one-off prompt through gh

Pass a prompt through the GitHub CLI wrapper.

bashANYghcopilotprompt
bash
gh copilot -p "Summarize this week's commits" --allow-tool "shell(git)"

Good when you want GitHub CLI to handle installation and execution for you.

Pass through Copilot help flags from gh

Forward flags after `--`.

bashANYghcopilothelp
bash
gh copilot -- --help

Use `--` so `gh` does not interpret flags intended for Copilot CLI itself.

Remove the gh-downloaded Copilot CLI

Delete the Copilot binary that gh downloaded.

bashANYghcopilotremove
bash
gh copilot --remove

Helpful when troubleshooting wrapper installs or forcing a clean download.

First-run and lifecycle commands

Authenticate, inspect version state, and update safely.

Start the interactive UI

Launch Copilot CLI in interactive mode.

bashANYcopilotinteractive
bash
copilot

This is the default entry point for terminal-native Copilot sessions.

Authenticate with OAuth device flow

Log in from the terminal.

bashANYcopilotloginauth
bash
copilot login

Use this outside the interactive slash-command flow when you want an explicit login step.

Authenticate against a specific GitHub host

Target a GitHub host explicitly during login.

bashANYcopilotloginenterprise
bash
copilot login --host https://github.com

Useful when switching between GitHub.com and a supported enterprise host.

Sign out of Copilot CLI

Remove stored credentials.

bashANYcopilotlogoutauth
bash
copilot logout

A clean reset when you need to swap users or re-run authentication.

Show version information

Print version details and check for updates.

bashANYcopilotversion
bash
copilot version

Useful in support tickets, CI logs, and bug reports.

Update Copilot CLI

Download and install the latest version.

bashANYcopilotupdate
bash
copilot update

A common first fix when behavior differs from the latest docs or release notes.

Open help topics

Show help for commands, config, environment, logging, or permissions.

bashANYcopilothelp
bash
copilot help commands

Replace `commands` with another help topic such as `config` or `permissions`.

Recommended next

No recommendations yet.