Skip to content

Commit b608c49

Browse files
sync: update CLI for Beginners Learning Hub from upstream (Apr 2026)
Sync with github/copilot-cli-for-beginners commits from Apr 12-15, 2026: Chapter 01 (01-setup-and-first-steps.md): - Add /ask command to Essential Slash Commands table with tip - Add /env command to Additional Commands (Agent Environment section) - Add /yolo alias and update /allow-all to [on|off|show] syntax - Add copilot --plan startup flag documentation in Plan mode section - Add copilot --autopilot reference in Autopilot mode note - Add copilot --remote tip section (remote sessions from web/mobile) - Update Essential Commands summary to include /ask, /research, /model - Move Shift+Tab tip to after plan demo code block (upstream structure) Chapter 05 (05-skills.md): - Update /skills list description to mention built-in skills - Add built-in skills tip (customizing-copilot-cloud-agents-environment) - Add copilot plugin marketplace update command Chapter 06 (06-mcp-servers.md): - Add 'Installing MCP Servers from the Registry' section (/mcp search) - Update project-level MCP config: .vscode/mcp.json -> .mcp.json - Add migration note for existing .vscode/mcp.json users - Expand Additional MCP Commands with Option 1/Option 2 structure - Add /mcp auth command and copilot mcp terminal commands - Update troubleshooting table for new config file path - Update summary point 5 to reflect two management methods Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8fbf6c4 commit b608c49

3 files changed

Lines changed: 103 additions & 22 deletions

File tree

website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: '01 · First Steps'
33
description: 'Experience your first GitHub Copilot CLI demos and learn the three main interaction modes.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-03-20
6+
lastUpdated: 2026-04-17
77
---
88

99
![Chapter 01: First Steps](/images/learning-hub/copilot-cli-for-beginners/01/chapter-header.png)
@@ -280,16 +280,22 @@ Notice how each prompt builds on the previous answer. You're having a conversati
280280

281281
**Best for**: Complex tasks where you want to review the approach before execution. Similar to planning a route before a trip using GPS.
282282

283-
Plan mode helps you create a step-by-step plan before writing any code. Use the `/plan` command or press **Shift+Tab** to cycle into Plan Mode:
284-
285-
> 💡 **Tip**: **Shift+Tab** cycles between modes: Interactive → Plan → Autopilot. Press it anytime during an interactive session to switch modes without typing a command.
283+
Plan mode helps you create a step-by-step plan before writing any code. Use the `/plan` command, press **Shift+Tab** to cycle into Plan Mode:
286284

287285
```bash
288286
copilot
289287

290288
> /plan Add a "mark as read" command to the book app
291289
```
292290

291+
> 💡 **Tip**: **Shift+Tab** cycles between modes: Interactive → Plan → Autopilot. Press it anytime during an interactive session to switch modes without typing a command.
292+
293+
You can also launch Copilot CLI directly in plan mode using the `--plan` flag:
294+
295+
```bash
296+
copilot --plan
297+
```
298+
293299
**Plan mode output:** (your output may differ)
294300

295301
```
@@ -320,7 +326,7 @@ Proceed with implementation? [Y/n]
320326

321327
> 💡 **Want something more complex?** Try: `/plan Add search and filter capabilities to the book app`. Plan mode scales from simple features to full applications.
322328
323-
> 📚 **Autopilot mode**: You may have noticed Shift+Tab cycles through a third mode called **Autopilot**. In autopilot mode, Copilot works through an entire plan without waiting for your input after each step — like handing a task to a colleague and saying "let me know when you're finished." The typical workflow is plan → accept → autopilot, which means you need to be good at writing plans first. Get comfortable with Interactive and Plan modes, then see the [official docs](https://docs.github.com/copilot/concepts/agents/copilot-cli/autopilot) when you're ready.
329+
> 📚 **Autopilot mode**: You may have noticed Shift+Tab cycles through a third mode called **Autopilot**. In autopilot mode, Copilot works through an entire plan without waiting for your input after each step — like handing a task to a colleague and saying "let me know when you're finished." The typical workflow is plan → accept → autopilot, which means you need to be good at writing plans first. You can also launch directly into autopilot with `copilot --autopilot`. Get comfortable with Interactive and Plan modes first, then see the [official docs](https://docs.github.com/copilot/concepts/agents/copilot-cli/autopilot) when you're ready.
324330
325331
---
326332

@@ -365,11 +371,12 @@ copilot --allow-all -p "Review @myfile.py for issues"
365371

366372
## Essential Slash Commands
367373

368-
These commands work in interactive mode. **Start with just these six** - they cover 90% of daily use:
374+
These commands are great to learn initially as you're getting started with Copilot CLI:
369375

370376
| Command | What It Does | When to Use |
371377
|---------|--------------|-------------|
372378
| `/help` | Show all available commands | When you forget a command |
379+
| `/ask` | Ask a quick question without it affecting your conversation history | When you want a quick answer without derailing your current task |
373380
| `/clear` | Clear conversation and start fresh | When switching topics |
374381
| `/plan` | Plan your work out before coding | For more complex features |
375382
| `/research` | Deep research using GitHub and web sources | When you need to investigate a topic before coding |
@@ -378,6 +385,8 @@ These commands work in interactive mode. **Start with just these six** - they co
378385

379386
That's it for getting started! As you become comfortable, you can explore additional commands.
380387

388+
> 💡 **`/ask` vs regular chat**: Normally every message you send becomes part of the ongoing conversation and affects future responses. `/ask` is an "off the record" shortcut — perfect for quick one-off questions like `/ask What does YAML mean?` without polluting your session context.
389+
381390
> 📚 **Official Documentation**: [CLI command reference](https://docs.github.com/copilot/reference/cli-command-reference) for the complete list of commands and flags.
382391
383392
<details>
@@ -391,6 +400,7 @@ That's it for getting started! As you become comfortable, you can explore additi
391400
|---------|--------------|
392401
| `/init` | Initialize Copilot instructions for your repository |
393402
| `/agent` | Browse and select from available agents |
403+
| `/env` | Show loaded environment details — what instructions, MCP servers, skills, agents, and plugins are active |
394404
| `/skills` | Manage skills for enhanced capabilities |
395405
| `/mcp` | Manage MCP server configuration |
396406

@@ -419,12 +429,13 @@ That's it for getting started! As you become comfortable, you can explore additi
419429

420430
| Command | What It Does |
421431
|---------|--------------|
422-
| `/allow-all` | Auto-approve all permission prompts for this session |
432+
| `/allow-all [on|off|show]` | Auto-approve all permission prompts; use `on` to enable, `off` to disable, `show` to check current status |
433+
| `/yolo` | Quick alias for `/allow-all on` — auto-approves all permission prompts. |
423434
| `/add-dir <directory>` | Add a directory to allowed list |
424435
| `/list-dirs` | Show all allowed directories |
425436
| `/cwd`, `/cd [directory]` | View or change working directory |
426437

427-
> ⚠️ **Use with caution**: `/allow-all` skips confirmation prompts. Great for trusted projects, but be careful with untrusted code.
438+
> ⚠️ **Use with caution**: `/allow-all` and `/yolo` skip confirmation prompts. Great for trusted projects, but be careful with untrusted code.
428439
429440
### Session
430441

@@ -553,6 +564,28 @@ After completing the demos, try these variations:
553564

554565
---
555566

567+
## 💡 Tip: Control Your CLI Session from Web or Mobile
568+
569+
GitHub Copilot CLI supports **remote sessions**, letting you monitor and interact with a running CLI session from a web browser (on desktop or mobile) or the GitHub Mobile app without being physically at your terminal.
570+
571+
Start a remote session with the `--remote` flag:
572+
573+
```bash
574+
copilot --remote
575+
```
576+
577+
Copilot CLI will display a link and provide access to a QR code. Open the link on your phone or in a desktop browser tab to watch the session in real time, send follow-up prompts, review plans, and steer the agent remotely. Sessions are user-specific so you can only access your own Copilot CLI sessions.
578+
579+
You can also enable remote access from inside an active session at any time:
580+
581+
```
582+
> /remote
583+
```
584+
585+
Additional details about remote sessions can be found in the [Copilot CLI docs](https://docs.github.com/copilot/how-tos/copilot-cli/steer-remotely).
586+
587+
---
588+
556589
## 📝 Assignment
557590

558591
### Main Challenge: Improve the Book App Utilities
@@ -629,7 +662,7 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t
629662
1. **Interactive mode** is for exploration and iteration - context carries forward. It's like having a conversation with someone who remembers what you've said up to that point.
630663
2. **Plan mode** is normally for more involved tasks. Review before implementation.
631664
3. **Programmatic mode** is for automation. No interaction needed.
632-
4. **Four essential commands** (`/help`, `/clear`, `/plan`, `/exit`) cover most daily use.
665+
4. **Essential commands** (`/ask`, `/help`, `/clear`, `/plan`, `/research`, `/model`, `/exit`) cover most daily use.
633666
634667
> 📋 **Quick Reference**: See the [GitHub Copilot CLI command reference](https://docs.github.com/en/copilot/reference/cli-command-reference) for a complete list of commands and shortcuts.
635668

website/src/content/docs/learning-hub/cli-for-beginners/05-skills.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: '05 · Automate Repetitive Tasks'
33
description: 'Mirror the source chapter on skills that load automatically for repeated GitHub Copilot CLI workflows.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-03-20
6+
lastUpdated: 2026-04-17
77
---
88

99
![Chapter 05: Skills System](/images/learning-hub/copilot-cli-for-beginners/05/chapter-header.png)
@@ -62,7 +62,9 @@ Learn what skills are, why they matter, and how they differ from agents and MCP.
6262
copilot
6363
> /skills list
6464
```
65-
This shows all skills Copilot can find in your project and personal folders.
65+
This shows all skills Copilot can find, including any **built-in skills** that ship with the CLI itself, plus skills from your project and personal folders.
66+
67+
> 💡 **Built-in skills**: The Copilot CLI comes with skills pre-installed out of the box. For example, the `customizing-copilot-cloud-agents-environment` skill provides a guide for customizing the Copilot cloud agent's environment. You don't need to create or install anything to use these. Run `/skills list` to see what's available.
6668
6769
2. **Look at a real skill file:** Check out our provided [code-checklist SKILL.md](https://github.com/github/copilot-cli-for-beginners/blob/main/.github/skills/code-checklist/SKILL.md) to see the pattern. It's just YAML frontmatter plus markdown instructions.
6870

@@ -552,6 +554,12 @@ copilot
552554
# Install a plugin from the marketplace
553555
```
554556

557+
To keep your local plugin catalog current, refresh it with:
558+
559+
```bash
560+
copilot plugin marketplace update
561+
```
562+
555563
Plugins can bundle multiple capabilities together - a single plugin might include related skills, agents, and MCP server configurations that work together.
556564

557565
### Community Skill Repositories

website/src/content/docs/learning-hub/cli-for-beginners/06-mcp-servers.md

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: '06 · Connect to GitHub, Databases & APIs'
33
description: 'Mirror the source chapter on MCP servers and external integrations for GitHub Copilot CLI.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-03-20
6+
lastUpdated: 2026-04-17
77
---
88

99
![Chapter 06: MCP Servers](/images/learning-hub/copilot-cli-for-beginners/06/chapter-header.png)
@@ -83,7 +83,7 @@ MCP Servers:
8383

8484
> 💡 **Only seeing the GitHub server?** That's expected! If you haven't added any additional MCP servers yet, GitHub is the only one listed. You'll add more in the next section.
8585
86-
> 📚 **Want to see all `/mcp` commands?** There are additional commands for adding, editing, enabling, and deleting servers. See the [full command reference](#-additional-mcp-commands) at the end of this chapter.
86+
> 📚 **Want to see all MCP management commands?** You can manage servers with `/mcp` slash commands inside chat, or with `copilot mcp` directly from your terminal. See the [full command reference](#-additional-mcp-commands) at the end of this chapter.
8787
8888
<details>
8989
<summary>🎬 See it in action!</summary>
@@ -127,13 +127,31 @@ MCP makes Copilot aware of your actual development environment.
127127

128128
<img src="/images/learning-hub/copilot-cli-for-beginners/06/configuring-mcp-servers.png" alt="Hands adjusting knobs and sliders on a professional audio mixing board representing MCP server configuration" width="800"/>
129129

130-
Now that you've seen MCP in action, let's set up additional servers. This section covers the configuration file format and how to add new servers.
130+
Now that you've seen MCP in action, let's set up additional servers. You can add servers in two ways: **from the built-in registry** (easiest — guided setup right in the CLI) or by **editing the config file** manually (more flexible). Start with the registry option if you're not sure which to choose.
131+
132+
---
133+
134+
## Installing MCP Servers from the Registry
135+
136+
The CLI has a built-in MCP server registry that lets you discover and install popular servers with a guided setup — no JSON editing required.
137+
138+
```bash
139+
copilot
140+
141+
> /mcp search
142+
```
143+
144+
Copilot opens an interactive picker showing available servers. Select one, and the CLI walks you through any required configuration (API keys, paths, etc.) and adds it to your config automatically.
145+
146+
> 💡 **Why use the registry?** It's the easiest way to get started — you don't need to know the npm package name, command arguments, or JSON structure. The CLI handles all of that for you.
131147
132148
---
133149

134150
## MCP Configuration File
135151

136-
MCP servers are configured in `~/.copilot/mcp-config.json` (user-level, applies to all projects) or `.vscode/mcp.json` (project-level, applies to just the current workspace).
152+
MCP servers are configured in `~/.copilot/mcp-config.json` (user-level, applies to all projects) or `.mcp.json` (project-level, placed in the root of your project). If you used `/mcp search` above, the CLI already created or updated this file for you, but it's useful to understand the format for customization.
153+
154+
> ⚠️ **Note**: `.vscode/mcp.json` is no longer supported as an MCP config source. If you have an existing `.vscode/mcp.json`, migrate it to `.mcp.json` in your project root. The CLI will show a migration hint if it detects an old config file.
137155
138156
```json
139157
{
@@ -341,7 +359,7 @@ Here's a full `mcp-config.json` with filesystem and Context7 servers:
341359
}
342360
```
343361
344-
Save this as `~/.copilot/mcp-config.json` for global access or `.vscode/mcp.json` for project-specific configuration.
362+
Save this as `~/.copilot/mcp-config.json` for global access or `.mcp.json` in the project root for project-specific configuration.
345363
346364
---
347365
@@ -848,7 +866,7 @@ Ready to go deeper? Follow the [Custom MCP Server Guide](https://github.com/gith
848866
| Mistake | What Happens | Fix |
849867
|---------|--------------|-----|
850868
| Not knowing GitHub MCP is built-in | Trying to install/configure it manually | GitHub MCP is included by default. Just try: "List the recent commits in this repo" |
851-
| Looking for config in wrong location | Can't find or edit MCP settings | User-level config is in `~/.copilot/mcp-config.json`, project-level is `.vscode/mcp.json` |
869+
| Looking for config in wrong location | Can't find or edit MCP settings | User-level config is in `~/.copilot/mcp-config.json`, project-level is `.mcp.json` in the project root |
852870
| Invalid JSON in config file | MCP servers fail to load | Use `/mcp show` to check configuration; validate JSON syntax |
853871
| Forgetting to authenticate MCP servers | "Authentication failed" errors | Some MCPs need separate auth. Check each server's requirements |
854872
@@ -891,19 +909,41 @@ If a server is disabled, see the [additional `/mcp` commands](#-additional-mcp-c
891909
---
892910
893911
<details>
894-
<summary>📚 <strong>Additional <code>/mcp</code> Commands</strong> (click to expand)</summary>
912+
<summary>📚 <strong>Additional MCP Commands</strong> (click to expand)</summary>
895913
<a id="-additional-mcp-commands"></a>
896914
897-
Beyond `/mcp show`, there are several other commands for managing your MCP servers:
915+
You can manage MCP servers in two ways: using **slash commands inside a chat session**, or using the **`copilot mcp` command directly in your terminal** (no chat session needed).
916+
917+
### Option 1: Slash commands (inside a chat session)
918+
919+
These work when you're already inside `copilot`:
898920
899921
| Command | What It Does |
900922
|---------|--------------|
901923
| `/mcp show` | Show all configured MCP servers and their status |
902924
| `/mcp add` | Interactive setup for adding a new server |
903925
| `/mcp edit <server-name>` | Edit an existing server configuration |
904-
| `/mcp enable <server-name>` | Enable a disabled server |
905-
| `/mcp disable <server-name>` | Temporarily disable a server |
926+
| `/mcp enable <server-name>` | Enable a disabled server (persists across sessions) |
927+
| `/mcp disable <server-name>` | Disable a server (persists across sessions) |
906928
| `/mcp delete <server-name>` | Remove a server permanently |
929+
| `/mcp auth <server-name>` | Re-authenticate with an MCP server that uses OAuth (e.g., after switching accounts) |
930+
931+
### Option 2: `copilot mcp` command (from your terminal)
932+
933+
You can also manage MCP servers directly from your terminal without starting a chat session first:
934+
935+
```bash
936+
# List all configured MCP servers
937+
copilot mcp list
938+
939+
# Enable a server
940+
copilot mcp enable filesystem
941+
942+
# Disable a server
943+
copilot mcp disable context7
944+
```
945+
946+
> 💡 **When to use which?** Use `/mcp` slash commands when you're already in a chat session. Use `copilot mcp` from the terminal when you want to quickly check or change your server settings before starting a session.
907947
908948
For most of this course, `/mcp show` is all you need. The other commands become useful as you manage more servers over time.
909949
@@ -919,7 +959,7 @@ For most of this course, `/mcp show` is all you need. The other commands become
919959
2. **GitHub MCP is built-in** - no configuration needed, just `/login`
920960
3. **Filesystem and Context7** are configured via `~/.copilot/mcp-config.json`
921961
4. **Multi-server workflows** combine data from multiple sources in a single session
922-
5. **Check server status** with `/mcp show` (additional commands available for managing servers)
962+
5. **Manage servers two ways**: use `/mcp` slash commands inside chat, or `copilot mcp` from the terminal
923963
6. **Custom servers** let you connect any API (optional, covered in the appendix guide)
924964
925965
> 📋 **Quick Reference**: See the [GitHub Copilot CLI command reference](https://docs.github.com/en/copilot/reference/cli-command-reference) for a complete list of commands and shortcuts.

0 commit comments

Comments
 (0)