Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: '01 · First Steps'
description: 'Experience your first GitHub Copilot CLI demos and learn the three main interaction modes.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-03-20
lastUpdated: 2026-04-17
---

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

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

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:

> 💡 **Tip**: **Shift+Tab** cycles between modes: Interactive → Plan → Autopilot. Press it anytime during an interactive session to switch modes without typing a command.
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:

```bash
copilot

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

> 💡 **Tip**: **Shift+Tab** cycles between modes: Interactive → Plan → Autopilot. Press it anytime during an interactive session to switch modes without typing a command.

You can also launch Copilot CLI directly in plan mode using the `--plan` flag:

```bash
copilot --plan
```

**Plan mode output:** (your output may differ)

```
Expand Down Expand Up @@ -320,7 +326,7 @@ Proceed with implementation? [Y/n]

> 💡 **Want something more complex?** Try: `/plan Add search and filter capabilities to the book app`. Plan mode scales from simple features to full applications.

> 📚 **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.
> 📚 **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.

---

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

## Essential Slash Commands

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

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

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

> 💡 **`/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.

> 📚 **Official Documentation**: [CLI command reference](https://docs.github.com/copilot/reference/cli-command-reference) for the complete list of commands and flags.

<details>
Expand All @@ -391,6 +400,7 @@ That's it for getting started! As you become comfortable, you can explore additi
|---------|--------------|
| `/init` | Initialize Copilot instructions for your repository |
| `/agent` | Browse and select from available agents |
| `/env` | Show loaded environment details — what instructions, MCP servers, skills, agents, and plugins are active |
| `/skills` | Manage skills for enhanced capabilities |
| `/mcp` | Manage MCP server configuration |

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

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

> ⚠️ **Use with caution**: `/allow-all` skips confirmation prompts. Great for trusted projects, but be careful with untrusted code.
> ⚠️ **Use with caution**: `/allow-all` and `/yolo` skip confirmation prompts. Great for trusted projects, but be careful with untrusted code.

### Session

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

---

## 💡 Tip: Control Your CLI Session from Web or Mobile

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.

Start a remote session with the `--remote` flag:

```bash
copilot --remote
```

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.

You can also enable remote access from inside an active session at any time:

```
> /remote
```

Additional details about remote sessions can be found in the [Copilot CLI docs](https://docs.github.com/copilot/how-tos/copilot-cli/steer-remotely).

---

## 📝 Assignment

### Main Challenge: Improve the Book App Utilities
Expand Down Expand Up @@ -629,7 +662,7 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t
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.
2. **Plan mode** is normally for more involved tasks. Review before implementation.
3. **Programmatic mode** is for automation. No interaction needed.
4. **Four essential commands** (`/help`, `/clear`, `/plan`, `/exit`) cover most daily use.
4. **Essential commands** (`/ask`, `/help`, `/clear`, `/plan`, `/research`, `/model`, `/exit`) cover most daily use.

> 📋 **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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: '05 · Automate Repetitive Tasks'
description: 'Mirror the source chapter on skills that load automatically for repeated GitHub Copilot CLI workflows.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-03-20
lastUpdated: 2026-04-17
---

![Chapter 05: Skills System](/images/learning-hub/copilot-cli-for-beginners/05/chapter-header.png)
Expand Down Expand Up @@ -62,7 +62,9 @@ Learn what skills are, why they matter, and how they differ from agents and MCP.
copilot
> /skills list
```
This shows all skills Copilot can find in your project and personal folders.
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.

> 💡 **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.

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.

Expand Down Expand Up @@ -552,6 +554,12 @@ copilot
# Install a plugin from the marketplace
```

To keep your local plugin catalog current, refresh it with:

```bash
copilot plugin marketplace update
```

Plugins can bundle multiple capabilities together - a single plugin might include related skills, agents, and MCP server configurations that work together.

### Community Skill Repositories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: '06 · Connect to GitHub, Databases & APIs'
description: 'Mirror the source chapter on MCP servers and external integrations for GitHub Copilot CLI.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-03-20
lastUpdated: 2026-04-17
---

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

> 💡 **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.

> 📚 **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.
> 📚 **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.

<details>
<summary>🎬 See it in action!</summary>
Expand Down Expand Up @@ -127,13 +127,31 @@ MCP makes Copilot aware of your actual development environment.

<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"/>

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.
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.

---

## Installing MCP Servers from the Registry

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.

```bash
copilot

> /mcp search
```

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.

> 💡 **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.

---

## MCP Configuration File

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).
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.

> ⚠️ **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.

```json
{
Expand Down Expand Up @@ -341,7 +359,7 @@ Here's a full `mcp-config.json` with filesystem and Context7 servers:
}
```

Save this as `~/.copilot/mcp-config.json` for global access or `.vscode/mcp.json` for project-specific configuration.
Save this as `~/.copilot/mcp-config.json` for global access or `.mcp.json` in the project root for project-specific configuration.

---

Expand Down Expand Up @@ -848,7 +866,7 @@ Ready to go deeper? Follow the [Custom MCP Server Guide](https://github.com/gith
| Mistake | What Happens | Fix |
|---------|--------------|-----|
| 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" |
| 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` |
| 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 |
| Invalid JSON in config file | MCP servers fail to load | Use `/mcp show` to check configuration; validate JSON syntax |
| Forgetting to authenticate MCP servers | "Authentication failed" errors | Some MCPs need separate auth. Check each server's requirements |

Expand Down Expand Up @@ -891,19 +909,41 @@ If a server is disabled, see the [additional `/mcp` commands](#-additional-mcp-c
---

<details>
<summary>📚 <strong>Additional <code>/mcp</code> Commands</strong> (click to expand)</summary>
<summary>📚 <strong>Additional MCP Commands</strong> (click to expand)</summary>
<a id="-additional-mcp-commands"></a>

Beyond `/mcp show`, there are several other commands for managing your MCP servers:
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).

### Option 1: Slash commands (inside a chat session)

These work when you're already inside `copilot`:

| Command | What It Does |
|---------|--------------|
| `/mcp show` | Show all configured MCP servers and their status |
| `/mcp add` | Interactive setup for adding a new server |
| `/mcp edit <server-name>` | Edit an existing server configuration |
| `/mcp enable <server-name>` | Enable a disabled server |
| `/mcp disable <server-name>` | Temporarily disable a server |
| `/mcp enable <server-name>` | Enable a disabled server (persists across sessions) |
| `/mcp disable <server-name>` | Disable a server (persists across sessions) |
| `/mcp delete <server-name>` | Remove a server permanently |
| `/mcp auth <server-name>` | Re-authenticate with an MCP server that uses OAuth (e.g., after switching accounts) |

### Option 2: `copilot mcp` command (from your terminal)

You can also manage MCP servers directly from your terminal without starting a chat session first:

```bash
# List all configured MCP servers
copilot mcp list

# Enable a server
copilot mcp enable filesystem

# Disable a server
copilot mcp disable context7
```

> 💡 **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.

For most of this course, `/mcp show` is all you need. The other commands become useful as you manage more servers over time.

Expand All @@ -919,7 +959,7 @@ For most of this course, `/mcp show` is all you need. The other commands become
2. **GitHub MCP is built-in** - no configuration needed, just `/login`
3. **Filesystem and Context7** are configured via `~/.copilot/mcp-config.json`
4. **Multi-server workflows** combine data from multiple sources in a single session
5. **Check server status** with `/mcp show` (additional commands available for managing servers)
5. **Manage servers two ways**: use `/mcp` slash commands inside chat, or `copilot mcp` from the terminal
6. **Custom servers** let you connect any API (optional, covered in the appendix guide)

> 📋 **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.
Expand Down
Loading