Duration: 10 minutes | Feature: GitHub CLI | Goal: Install the GitHub CLI, authenticate with your GitHub account, and install the GitHub Copilot CLI extension so every subsequent exercise can use the
copilotcommand.
The GitHub CLI (gh) is the foundation of this workshop. Every Copilot CLI command, repository operation, and workflow query runs through it. This exercise gets it installed, authenticated, and extended with Copilot before any application code is touched.
- Python 3.11+ on
PATH - Git installed
- Active GitHub account with GitHub Copilot access
Windows (winget)
winget install --id GitHub.cli
gh --versionmacOS (Homebrew)
brew install gh
gh --versionAlready installed? Run
winget upgrade --id GitHub.cli(Windows) orbrew upgrade gh(macOS) to update.
gh auth loginFollow the prompts:
- Select GitHub.com
- Choose HTTPS as the protocol
- Authenticate via browser — paste the one-time code shown at
github.com/login/device - Authorise GitHub CLI when prompted
Verify:
gh auth statusExpected: ✓ Logged in to github.com as <your-username>
gh extension install github/gh-copilot
gh copilot --versionTest with a quick session:
copilotType Hello and press Enter — you should receive an AI response. Type exit to close.
Note: If
copilotis not recognised as a standalone command, usegh copilot chatwherever this workshop writescopilot.
gh auth loginauthenticates all subsequentghandcopilotcommands.gh extension install github/gh-copilotadds thecopilotcommand to your shell.- Run
gh auth statusany time you suspect your session has expired.
Next: Exercise 02 — Clone Repository & Set Up the Python Environment