Setup · ~15–30 min

Get your AI operator running

Install Copilot CLI on your laptop, sign in, and run your first prompt. No coding required.

⏱️
15–30 min
Estimated time
🔧
4 tools, 1 login
What you'll set up
💡
No coding needed
Just follow the steps

You'll install a terminal tool, sign in to GitHub, and run your first prompt. Copy-paste commands. That's it.

☁️

Locked-down laptop? Read this first

If your work machine blocks installs, skip everything below and run Copilot CLI in your browser instead.

If winget is blocked, npm registries are firewalled, or you just don't want to install on a corporate machine, use GitHub Codespaces. Free 60 hours per month on a personal account. No install, no IT ticket, same Copilot CLI.

Run it in your browser →
Why bother with a CLI at all? Don't I already have M365 Copilot?

Quick analogy: M365 Copilot is the librarian. You ask, it finds, it reads back. CLI Copilot is the contractor. You give it a job, it goes off and does it.

M365 Copilot is great at what it sees. Your email, your calendar, your Office files. Ask it about a thread, it summarizes. Ask it to draft a reply, it does. It lives inside the M365 surface and stays there.

CLI Copilot is a different shape. It runs on your machine, in your terminal, and it actually does things. Runs commands. Edits files. Calls APIs. Ties tools together.

What the CLI gives you that M365 Copilot doesn't:

  1. Reach beyond M365. Through MCP connectors you can plug in anything that exposes one. GitHub, your filesystem, Notion, Atlassian, your own internal services. M365 Copilot is fixed to what Microsoft ships. The CLI is open.
  2. Execute, don't just retrieve. "Read the three customer-meeting transcripts in this folder, build a one-pager per customer, save them next to the originals." Ask once, it runs the whole chain.
  3. Live where your real work happens. Your files, your folders, your terminal. No tab-switching, no re-uploading.

Set up once. Use it for real work after.

A taste of what's possible: "Read this RFP. Pull our service capability docs. Build me a draft response with the strongest three offerings up front and a 'further investigation needed' list at the bottom." One prompt. Real work. That's the CLI.

Already comfortable with CLI tools? Skim the steps and jump to Step 4: Verify everything. If all three checks pass, you're done.

Never opened a terminal before? That's exactly who this is for. Every step explains what's happening and why. Follow along and copy-paste the commands.

Step 0

Get a GitHub account with Copilot

Copilot CLI runs on GitHub. You need a personal GitHub account with Copilot turned on. Both are free.

If you don't have a GitHub account yet

Sign up at github.com/signup. Use any email you like. Pick a short username you can remember.

Turn on GitHub Copilot Free

Once signed in, open github.com/settings/copilot. If you've never used Copilot before, GitHub will offer to start your Copilot Free plan. Accept it.

💡 Copilot Free is enough for this whole course. It includes Copilot CLI, MCP connectors, and a generous monthly request limit. Pro / Pro+ / Business / Enterprise also work if your company gives you one of those. Don't pay for anything to follow along here.
What are all those Copilot plan names? Which one do I have?

GitHub currently offers five Copilot plans: Free, Pro, Pro+, Business, and Enterprise. The old "Copilot Individual" plan is gone.

For this course, Free is everything you need. The other plans add more requests per month, more model options, and admin features for teams.

If your employer already gives you Copilot Business or Enterprise on a different GitHub account, you can use that account instead. Just sign in with it in the steps below.

Step 1

Install command-line tools

First: open PowerShell

PowerShell is a text-based tool for talking to your computer. Like File Explorer, but you type commands instead of clicking. It comes pre-installed on Windows.

Press the Windows key, type PowerShell, and open the one that says "PowerShell 7" or "pwsh". Avoid the one called "Windows PowerShell". It's an older version.

⚠️ Don't see PowerShell 7? Open "Windows PowerShell" instead. It will work for the install commands. We'll upgrade later.
What's the difference between PowerShell 7 and Windows PowerShell?

Both are command-line tools that come with Windows. "Windows PowerShell" is the older version (5.x) that has shipped with the OS for years. "PowerShell 7" (sometimes called "pwsh") is the newer cross-platform version Microsoft ships separately.

They look almost identical. PowerShell 7 has better tab completion, better error messages, and supports modern command patterns. Either one works for this course. If you have 7, use it.

On macOS or Linux?

Use Terminal (macOS) or your distro's terminal (Linux). The commands below use winget, which is Windows-only. The official GitHub install guide covers macOS (Homebrew) and Linux (apt / yum). Everything after install is identical.

Then: install four small tools

Copilot CLI doesn't work alone. It calls three other tools behind the scenes. Node.js (its runtime), Git (for source control), and GitHub CLI (for sign-in). None of them have buttons or windows of their own. They sit underneath, ready to be called from your command line.

Run these one at a time, waiting for each to finish before pasting the next. Pasting them all in one go can break. PowerShell handles single-line pastes most reliably. Each takes 30–60 seconds.

winget install OpenJS.NodeJS.LTS
winget install Git.Git
winget install GitHub.cli
winget install GitHub.Copilot
💡 Pop-ups are normal. Windows will ask "Do you want to allow this app to make changes?". Click Yes. Git's installer also opens a wizard with several screens. Click Next through all defaults. This is expected.
What is winget, anyway?

It's Windows' built-in app installer. Like the Microsoft Store, but you control it from PowerShell. Type winget install <tool> and it downloads and installs the official version straight from the publisher.

It ships pre-installed on Windows 11. Same idea as apt on Ubuntu or brew on macOS if those names mean anything to you.

When all four are done, close and reopen PowerShell. This is important. The new commands won't be available until you do.

Verify they all worked

In the fresh PowerShell window, run these one at a time:

node --version
git --version
gh --version
copilot --version
✅ Pass: Each command prints a version number. The exact numbers don't matter. What matters is that none of them say "not recognized".
⚠️ winget not found? Open the Microsoft Store, search for "App Installer", and install it. Then restart PowerShell and try again.
⚠️ Something says "not recognized" after the verify step? Make sure you closed and reopened PowerShell. If still missing, restart your computer and try the verify commands again.
Can't install at all? Run it in a browser tab instead.

If winget is blocked, npm is firewalled, or IT just won't let you install: skip the rest of this page and follow the Codespaces fallback instead.

Run Copilot CLI in your browser →

Step 2

Sign in

You'll sign in to two things: GitHub CLI (so commands like gh work), and Copilot CLI (so it knows it's you).

2a. GitHub CLI

Start the login flow:

gh auth login

It asks four questions, one at a time. Use the arrow keys to highlight the right answer, then press Enter:

It shows a one-time code and offers to open a browser. Press Enter. Your browser opens. If GitHub asks you to sign in first, do so. Then paste the code and authorize.

What just happened

1 💻

Terminal

You ran gh auth login. PowerShell prints an 8-character code.

2 🌐

Browser

A browser tab opens at github.com/login/device.

3 🔢

Code

Paste the 8-character code from your terminal into the page.

4

Authorize

Click the green Authorize button. The page confirms.

5 🎉

Signed in

Back in PowerShell, you see ✓ Logged in as <you>.

This is the device authorization flow. The terminal and the browser talk through GitHub. The code is the handshake.

When the page says "Congratulations, you're all set," come back to PowerShell.

⚠️ Don't re-run gh auth login if you hit a snag. Every new run invalidates all previous codes. If the browser is stuck, just go to github.com/login/device and paste the code from your terminal. The existing one is still valid. Only the most recent code in your terminal works. Older ones are dead.
✅ Pass: PowerShell prints ✓ Logged in as <your-username>. Confirm anytime with gh auth status.
Why HTTPS and not SSH?

Both are ways for your computer to talk securely to GitHub. HTTPS uses your username and the token you just authenticated with. Simple, works through corporate proxies, no setup needed.

SSH uses cryptographic keys you'd have to generate and add to your GitHub account first. More powerful, more steps. For this course, HTTPS is the easy answer. You can switch later if you ever want to.

2b. Copilot CLI

Run this in PowerShell to launch Copilot CLI:

copilot

You'll see an animated banner. You're now inside Copilot CLI, not PowerShell. The next two prompts run here:

/login

A browser window opens. Sign in with your GitHub account. Once logged in, test with a simple prompt:

What day is it today?
✅ Pass: You get an answer back.

Then leave Copilot CLI back to PowerShell:

/exit
⚠️ Login fails or times out? Check that your Copilot plan is active at github.com/settings/copilot. If you're behind a corporate proxy, that can also block the browser flow. Try on a personal network.
Why am I logging in twice? gh AND copilot?

They're two separate tools that both need to know who you are. GitHub CLI (gh) talks to GitHub from PowerShell. Switching accounts, cloning repos, opening pull requests. Copilot CLI (copilot) is the AI assistant.

Same GitHub account, but each tool keeps its own login session. Once both are signed in, the rest of the course works without any extra account juggling.

Step 3

Connect a tool (optional)

MCP servers are connectors that let Copilot CLI talk to other systems. Like Power Automate connectors, but for the terminal. The GitHub MCP is built in, so you can already ask Copilot about your repos, issues, and pull requests with no setup.

This step is optional for the course. If you want to add one connector to get a feel for it, the filesystem MCP is the safest first pick. It lets Copilot read and write files in folders you choose. No external accounts, no tenant approval.

What is MCP, in plain language?

MCP stands for "Model Context Protocol". Ignore the name. Think of it as adapters that plug Copilot CLI into your other tools. Each adapter lets Copilot read and act on a specific system. GitHub for repos. Filesystem for local files. Outlook for email. And many more.

Without adapters, Copilot is a smart chatbot that can only talk. With adapters, it can actually look up your projects, read your files, send emails. Same Copilot. With hands.

3a. Add the filesystem MCP (recommended)

Launch Copilot CLI:

copilot

Inside Copilot CLI, paste this prompt:

Add the official filesystem MCP server to my Copilot CLI config so it can read files in my home directory. Use the standard `@modelcontextprotocol/server-filesystem` package via npx. Allowed root: my home folder.

When you're done, tell me to run `/restart` so the new tool registers.

When Copilot tells you the install is done, restart so the new tool registers:

/restart
✅ Pass: No errors during install. After restart, /mcp lists filesystem among your active servers.

3b. M365 connector (optional, for Microsoft partner work)

If you work for a Microsoft partner that uses M365 and you want Copilot to reach your Outlook, Teams, Calendar, and SharePoint, you can install the M365 MCP server. Lesson 4 of the course covers this in detail.

⚠️ Tenant approval may be required. Some Microsoft 365 tenants block third-party app consent by default. The first install attempt may show a "needs admin approval" message. If that happens, ask your IT admin to approve the app, or skip M365 and rely on the filesystem MCP for now.

If you want to try it now, launch Copilot CLI and paste:

Install the M365 MCP server for me so I can access Outlook, Teams, Calendar, and SharePoint from Copilot CLI. Use the Microsoft-published package. Walk me through any consent prompts that appear.

If the install fails or needs admin approval, stop and tell me what happened. Don't try alternate paths or hand-edit config.
💡 Not a Microsoft partner? Skip 3b. The course works fine on filesystem + GitHub MCP alone. M365 is the example we use, but the patterns transfer to any MCP you have access to.
Step 4

Verify everything

Three checks. All should pass before you start the course.

⚠️ Something not working? Check the troubleshooting reference first. Most issues are setup issues and have a known fix. If you're stuck, open an issue at github.com/JW-Sthlm/ai-operator-intro/issues.
🎉

You're ready

Setup is done. Here's what to do next:

What's next

Pick one (or all)

Setup is the runway, not the flight. The fastest way to make Copilot CLI stick is to actually use it.

Troubleshooting

Common issues

ProblemFix
winget not foundInstall "App Installer" from the Microsoft Store. Or use Codespaces (Step 1, "Can't install at all").
copilot not found after installClose and reopen PowerShell. Still missing? Restart your computer.
/login fails or times outConfirm your Copilot plan at github.com/settings/copilot. Corporate proxies sometimes block the device-code flow. Try on a personal network.
/login/device/failure?reason=not_foundYou pasted a stale code. Each gh auth login invalidates older codes. Use the most recent code from your terminal at github.com/login/device. Don't re-run gh auth login.
MCP servers missing in /mcpDid you run /restart after the install? If yes, check mcp-config.json in ~\.copilot\ is valid JSON.
M365 MCP install says "needs admin approval"Your M365 tenant blocks third-party app consent. Ask your IT admin to approve the app, or skip M365 for now.
Community and partner enablement material. Not an official Microsoft or GitHub product. Adapted from GitHub's Copilot CLI for Beginners (MIT).