Time: ~5 minutes
Goal: Install GitHub Copilot CLI, authenticate, and run your first prompt
GitHub Copilot CLI is an AI assistant that lives in your terminal. You type in plain English, and it responds with structured results — summaries, drafts, plans, analysis — without ever opening a browser.
❯ copilot
copilot> summarize my last 5 emails
📧 Here's what needs your attention today:
1. [URGENT] Budget approval needed from Finance — Sarah...
2. [ACTION] Engineering timeline review due Friday...
...
It's included with all GitHub Copilot subscriptions.
Choose the installation method for your platform:
winget install GitHub.CopilotOr via npm (requires Node.js 22+):
npm install -g @github/copilotbrew install copilot-cliOr via npm:
npm install -g @github/copilotnpm install -g @github/copilot💡 Not sure if you have Node.js? Run
node --versionin your terminal. You need v22 or later for the npm install method. If not installed, download from nodejs.org (get the LTS version), or use Winget/Homebrew instead.
copilot --versionYou should see a version number printed. If you get "command not found", try closing and reopening your terminal, then run it again.
Launch Copilot CLI:
copilotOn first launch, Copilot CLI may ask you to confirm that you trust the current folder. Choose the option that matches your comfort level. If you're not signed in, it will then prompt you to use the /login command.
/login
A browser window will open — sign in with your GitHub account. Once authenticated, return to the terminal.
✅ You'll see:
Signed in as @yourusername
Now that you're in, try a few things:
/help
This shows all available slash commands — your navigation menu inside Copilot CLI.
/model
Shows which AI models are available to you (GPT, Claude, Gemini, etc.).
What can you help me with today?
No special syntax needed — just type like you're sending a message.
You type a prompt
↓
Copilot CLI interprets and plans
↓
Fetches from your files, connected services, or knowledge
↓
Returns a structured response
On its own, Copilot CLI can see:
- Files in your current folder
- Content you paste or reference directly
With the built-in GitHub MCP server and extra MCP connectors (Part 3), it can also reach:
- Your Microsoft 365 email, calendar, Teams
- GitHub issues and pull requests
- Databases, APIs, and more
Time to put it to work! Make sure you're inside the copilot-workshop folder you created in Part 1 (or any folder with a few files in it). Then run:
copilotTry each of these tasks — just type them naturally, like sending a message:
Ask Copilot to look around and tell you what's here:
look at the files in this folder and tell me what this project seems to be about
Copilot will list your files and give you a summary. Try a follow-up:
which of these files is most recently modified?
Ask Copilot to create something for you:
create a file called action-items.txt with 5 example action items from a fictional project kickoff meeting — use a team working on a new Microsoft 365 integration
Then verify it was created:
show me what you wrote in action-items.txt
Ask Copilot a knowledge question — no files needed, just curiosity:
what's the difference between GitHub Copilot in VS Code and GitHub Copilot CLI? when would I use each one?
Then go deeper:
which one is better for someone who doesn't write code?
Ask Copilot to improve what it just created:
read action-items.txt and add two more items to it — one about scheduling a follow-up meeting and one about sharing the meeting notes with stakeholders
Confirm the changes:
read back the full updated file
💡 Pro tip: You don't need special commands. Copilot understands plain English — just describe what you want, like you're asking a colleague.
| Command | What It Does |
|---|---|
/help |
Show all available commands |
/model |
Switch between AI models |
/plan |
Enter planning mode before executing |
/diff |
Review file changes before approving |
/context |
See what Copilot knows about your session |
/reset-allowed-tools |
Clear any auto-approved tool permissions |
Ctrl+C |
Exit the current session |
You now have:
- Copilot CLI installed and authenticated
- Asked Copilot to explore your folder
- Asked Copilot to create a file
- Asked Copilot to research a topic
- A feel for the interactive interface and key slash commands