Get the agent running in your terminal.
Note: GitHub Copilot CLI is in public preview and subject to change.
The easiest way for Windows users.
winget install GitHub.Copilot
For the prerelease version:
winget install GitHub.Copilot.Prerelease
brew install copilot-cli
For the prerelease version:
brew install copilot-cli@prerelease
Requires Node.js 22+.
npm install -g @github/copilot
For macOS and Linux users who prefer a direct script:
curl -fsSL https://gh.io/copilot-install | bash
To install to a specific location (e.g., custom directory):
curl -fsSL https://gh.io/copilot-install | PREFIX="$HOME/custom" bash
Once installed, you need to link it to your GitHub account.
Run the copilot command in your terminal. If not logged in, it will prompt you:
copilot /login
Follow the on-screen browser flow to authorize the CLI.
You can also use a Fine-grained Personal Access Token:
GH_TOKEN or GITHUB_TOKEN.