Skip to content

Install and Configure GitHub Copilot CLI

GitHub Copilot CLI is GitHub’s terminal-native AI assistant, allowing you to use Copilot directly from the command line.

Note: GitHub Copilot CLI is currently in Public Preview and may change over time.

  • Target: GitHub Copilot CLI (command-line version, not IDE plugin)
  • Last Verified: 2026-03-09
  • Official install guide: Installing GitHub Copilot CLI
Check ItemMinimum RequirementHow to Verify
Copilot accessActive Copilot subscription or assigned org seatSign in to GitHub and confirm Copilot availability
Windows environmentPowerShell 6+ (if on Windows)pwsh --version
Node.js (npm method)Node.js 22+node --version
npm (npm method)npm 10+npm --version
Network accessReachable GitHub and Copilot servicesOpen github.com in browser

If you use Copilot through an organization/enterprise, admins may disable Copilot CLI by policy.

Use any one method below.

Section titled “Method A: npm (Cross-platform, recommended)”
Terminal window
npm install -g @github/copilot

Verify installation:

Terminal window
copilot --version
Terminal window
winget install GitHub.Copilot
Terminal window
brew install copilot-cli
Terminal window
curl -fsSL https://gh.io/copilot-install | bash

Start the CLI:

Terminal window
copilot

In your first session, run /login and complete authentication in your browser.

You can also use a fine-grained token with Copilot Requests permission via:

  • GH_TOKEN
  • GITHUB_TOKEN
Terminal window
copilot

Ask a simple prompt (for example, “explain this project’s structure”) to verify end-to-end functionality.

SymptomPossible CauseResolution
copilot command not foundGlobal install path missing from PATHRestart terminal; verify npm global bin is in PATH
Login fails or hangsBrowser session issue or restricted networkRun /login again; check proxy/network; retry on stable network
Copilot CLI not availableSubscription missing or org policy disabledVerify plan status; ask org admin to enable Copilot CLI
npm install script errorignore-scripts=true in npm configRun npm_config_ignore_scripts=false npm install -g @github/copilot
  1. Run copilot --version.
  2. Run copilot and retry /login.
  3. Retry from a network that can reach GitHub services.
  4. If needed, reinstall using another method (npm vs brew/winget).

See official docs: Installing GitHub Copilot CLI