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 with npm
npm install -g @github/copilot

# Install Copilot CLI globally with npm.

Install with npm when ignore-scripts is enabled
npm_config_ignore_scripts=false npm install -g @github/copilot

# Force npm to run install scripts.

Install the prerelease build with npm
npm install -g @github/copilot@prerelease

# Install the prerelease channel.

Install with Homebrew
brew install copilot-cli

# Install Copilot CLI on macOS or Linux via Homebrew.

Install prerelease with Homebrew
brew install copilot-cli@prerelease

# Install the prerelease formula.

Install with WinGet
winget install GitHub.Copilot

# Install Copilot CLI on Windows.

Install prerelease with WinGet
winget install GitHub.Copilot.Prerelease

# Install the prerelease package on Windows.

## Install with script or via gh
Install using the official curl script
curl -fsSL https://gh.io/copilot-install | bash

# Download and install Copilot CLI with curl.

Install using the official wget script
wget -qO- https://gh.io/copilot-install | bash

# Download and install Copilot CLI with wget.

Install a specific version to a custom prefix
curl -fsSL https://gh.io/copilot-install | VERSION="v0.0.369" PREFIX="$HOME/custom" bash

# Pin a version and custom install directory.

Launch Copilot CLI through gh
gh copilot

# Use the GitHub CLI wrapper to run Copilot.

Run a one-off prompt through gh
gh copilot -p "Summarize this week's commits" --allow-tool "shell(git)"

# Pass a prompt through the GitHub CLI wrapper.

Pass through Copilot help flags from gh
gh copilot -- --help

# Forward flags after `--`.

Remove the gh-downloaded Copilot CLI
gh copilot --remove

# Delete the Copilot binary that gh downloaded.

## First-run and lifecycle commands
Start the interactive UI
copilot

# Launch Copilot CLI in interactive mode.

Authenticate with OAuth device flow
copilot login

# Log in from the terminal.

Authenticate against a specific GitHub host
copilot login --host https://github.com

# Target a GitHub host explicitly during login.

Sign out of Copilot CLI
copilot logout

# Remove stored credentials.

Show version information
copilot version

# Print version details and check for updates.

Update Copilot CLI
copilot update

# Download and install the latest version.

Open help topics
copilot help commands

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

Recommended next

No recommendations yet.