Which two are documented ways to install GitHub Copilot CLI? (Select TWO.)
- Exam domain
- Use GitHub Copilot features25–30% of the exam
- Difficulty
- Medium
- In this mock
- 20 questions on this domainPractise this domain
Why the exam asks this
Use GitHub Copilot features: Use GitHub Copilot CLI.
Objective in the exam guide: Identify the steps for installing GitHub Copilot CLI.
Setup questions are easy points. The exam checks the install methods.
Why C and D are the answers
A multiple-response question. Choose two. There is no credit for picking only some of them.
npm install -g @github/copilot
Homebrew on macOS or Linux
GitHub documents installing Copilot CLI with npm on all platforms, Homebrew on macOS and Linux, WinGet on Windows, or an install script.
How it works
Copilot CLI can be installed with WinGet on Windows, Homebrew on macOS and Linux, npm on all platforms, or an install script.
The npm package is @github/copilot and needs Node.js 22 or later.
After installing, you authenticate with GitHub.
Clues in the question
The words that point to the answer, and what each one tells you.
- Documented ways to install
- Package managers.
In detail
- The npm install needs Node.js 22 or later.
- Sign in with a GitHub account that has Copilot access after installing.
Side by side with look-alikes
| Method | Platforms |
|---|---|
| npm install -g @github/copilot | All, with Node.js 22+ |
| Homebrew | macOS and Linux |
| WinGet | Windows |
| Install script | macOS and Linux |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Enabling it in repository settingsWrong
Repository settings do not install tools.
B. pip install copilotWrong
The CLI is not distributed through pip.
C. npm install -g @github/copilotRight
GitHub documents installing Copilot CLI with npm on all platforms, Homebrew on macOS and Linux, WinGet on Windows, or an install script.
D. Homebrew on macOS or LinuxRight
GitHub documents installing Copilot CLI with npm on all platforms, Homebrew on macOS and Linux, WinGet on Windows, or an install script.
E. Downloading it from the VS Code extensions marketplaceWrongMost tempting
The VS Code marketplace provides the IDE extension, not the CLI.
Why it tempts: That is where the Copilot IDE extension comes from. But the CLI is a separate tool installed with a package manager.
In practice
- Pin the CLI version in team setup scripts so everyone gets the same behavior.