You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: reorder VS Code path with MCP first and split cloud agent into its own path
VS Code now leads with MCP, then custom instructions, then agent mode,
matching how authors recommend learners experience the tooling.
- vscode/1-mcp.mdx + vscode/2-custom-instructions.mdx replace the
previous 1-custom-instructions / 2-mcp ordering
- Renumber 5-custom-agents → 4, 6-managing-agents → 5, 7-iterating → 6
- Drop vscode/4-cloud-agent.mdx and the shared/cloud-agent/* stubs;
cloud agent now lives exclusively in the cloud/ path
- Update prose nav strips, ref-link labels, sidebar in astro.config.mjs,
landing page exercise tables, and shared/0-prereqs.mdx next-vscode
- Update vscode/3-agent-mode.mdx and cloud/2-cloud-agent.mdx to use
npm install / npm run dev instead of the retired start-app.sh
- Replace the agent-mode-dropdown screenshot with a chat-mode-selector
image to match current VS Code UI
- Refresh per-lesson body content across cli/, cloud/, and vscode/
to align with the new structure and partials
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[GitHub Copilot CLI][about-copilot-cli] is a powerful agentic coding assistant that runs in your terminal, enabling you to explore codebases, generate code, run commands, and interact with external tools - all from the command line.
8
-
9
-
## Scenario
10
-
11
-
Tailspin Toys is a nascent organization with a website that's lacking in many features. Their backlog is continuing to grow, and there's a strong demand to grow. To aid the developers, they want to begin utilizing AI agents through Copilot CLI. This will allow developers to be more productive, as they can focus on the bigger picture while moving faster. The first step to doing this is, of course, to install Copilot CLI!
7
+
[GitHub Copilot CLI][about-copilot-cli] is a powerful agentic coding assistant that runs in your terminal, enabling you to explore codebases, generate code, run commands, and interact with external tools - all from the command line. It allows you to offload tasks, request changes, and stay in the zone. The first step, as you might imagine, is to install the tool! Fortunately this can be done using tools you're already familiar with.
12
8
13
9
In this exercise, you will learn how to:
14
10
15
11
- install GitHub Copilot CLI using npm.
16
12
- authenticate with your GitHub account.
17
13
- verify the installation.
18
14
15
+
## Scenario
16
+
17
+
Your team is starting to use AI agents to work through a growing backlog. Copilot CLI brings that capability into the terminal, where many developers already live. This exercise gets you installed, authenticated, and ready to use it for the rest of the workshop.
18
+
19
19
## Open a terminal in your codespace
20
20
21
-
Before installing Copilot CLI, you need to open a terminal window in VS Code.
21
+
Before installing Copilot CLI, you need to open a terminal window in your codespace.
22
22
23
23
1. Return to your codespace if you're not already there.
24
24
2. Open a terminal window by pressing <kbd>Ctrl</kbd>+<kbd>\`</kbd>.
25
25
3. You should see a terminal panel appear at the bottom of your VS Code window.
26
26
27
27
## Install Copilot CLI
28
28
29
-
GitHub Codespaces come with Node.js pre-installed, so you can use npm to install Copilot CLI globally.
29
+
You can install Copilot CLI through [npm][install-npm], [WinGet][install-winget], and [Homebrew][install-homebrew]. Since GitHub Codespaces come with Node.js pre-installedyou'll use npm to install Copilot CLI.
30
30
31
31
1. In the terminal, verify Node.js is installed and meets the version requirement:
32
32
@@ -36,7 +36,7 @@ GitHub Codespaces come with Node.js pre-installed, so you can use npm to install
36
36
37
37
You should see version 22 or higher (e.g., `v22.x.x`).
38
38
39
-
2. Install Copilot CLI globally using npm:
39
+
2. Install Copilot CLI globally in the codespace using npm:
40
40
41
41
```bash
42
42
npm install -g @github/copilot
@@ -48,7 +48,7 @@ GitHub Codespaces come with Node.js pre-installed, so you can use npm to install
48
48
copilot --version
49
49
```
50
50
51
-
You should see the version number displayed (e.g., `v0.0.393`).
51
+
You should see the version number displayed (e.g., `v1.0.XX`).
52
52
53
53
<Asidetype="tip">
54
54
If you encounter permission errors, you may need to use `sudo npm install -g @github/copilot` on some systems. However, this shouldn't be necessary in GitHub Codespaces.
@@ -97,6 +97,12 @@ Now that you're at the Copilot CLI prompt for the first time, let's trust this w
97
97
/help
98
98
```
99
99
100
+
6. Exit Copilot CLI by entering the following command in the terminal. We will return back to Copilot CLI in a future exercise!
101
+
102
+
```
103
+
exit
104
+
```
105
+
100
106
## Summary and next steps
101
107
102
108
Congratulations! You've successfully installed and authenticated GitHub Copilot CLI. You learned how to:
@@ -117,5 +123,8 @@ Now that Copilot CLI is installed, let's see how it picks up your repository's c
Context is key when working with generative AI. If a task needs to be done a particular way — or there's background information Copilot should know — you want to make sure that context is reachable. [Instruction files][instruction-files] are how you provide that guidance, so Copilot understands not just *what* you want it to do but *how* you want it done.
13
-
14
-
Now that Copilot CLI is installed, you'll see those instruction files in action.
13
+
Context is key when working with generative AI. If a task needs to be done a particular way — or there's background information Copilot should know — you want to make sure that context is available. There are several tools available to you to help Copilot, which we'll explore throughout this workshop. We're going to start with [instruction files][instruction-files], which are typically focused on how the code itself should be structured. This helps Copilot understand not just *what* code you want but *how* it should be structured.
15
14
16
15
In this exercise, you will:
17
16
18
17
- explore how project-specific context, coding guidelines, and documentation standards reach Copilot through repository custom instructions and path-scoped instruction files,
19
18
- send a code-generation prompt to Copilot CLI with the *current* instructions in place,
20
-
- add a new repository-wide standard to **`.github/copilot-instructions.md`**,
19
+
- add a new repository-wide standard to `.github/copilot-instructions.md`,
21
20
- re-run the same prompt and watch the regenerated code adopt the new standard.
22
21
23
22
<Asidetype="caution">
24
23
Generated code may diverge from some of the standards you set. Copilot is non-deterministic. The goal is to see the *trend* in behavior change after updating the instructions, not to match output character-for-character.
25
24
</Aside>
26
25
27
-
<InstructionsOverview />
26
+
## Instruction files
27
+
28
+
<SectionInstructionsOverview />
29
+
30
+
## Explore the custom instructions files in this project
31
+
32
+
<ExerciseExploreInstructionsFiles />
28
33
29
-
## Before you begin the hands-on
34
+
## Create a branch
30
35
31
36
You'll be making code changes, so create a branch to work in.
32
37
33
38
1. From your codespace terminal, create and switch to a new branch:
34
39
35
40
```bash
36
-
git checkout -b custom-instructions-cli
41
+
git checkout -b update-custom-instructions
37
42
```
38
43
39
44
2. Confirm Copilot CLI is installed and authenticated:
@@ -46,20 +51,20 @@ You'll be making code changes, so create a branch to work in.
46
51
47
52
## Use Copilot CLI *before* updating the instructions
48
53
49
-
<StartCopilotCli />
50
-
51
54
To see the impact of custom instructions, start by generating code with the current instructions in place. Later, you'll update the file and re-run the same prompt.
52
55
53
-
1. Make sure your Copilot CLI session is running from the **repository root** so it picks up **`.github/copilot-instructions.md`** automatically.
56
+
<CalloutStartCopilotCli />
57
+
58
+
1. Make sure your Copilot CLI session is running from the **repository root** so it picks up `.github/copilot-instructions.md` automatically.
54
59
2. At the Copilot CLI prompt, ask it to generate the publishers endpoint:
55
60
56
61
```plaintext
57
62
Create a new endpoint at server/routes/publishers.py to return a list of all publishers. It should return the name and id for all publishers. Do not run the tests yet.
58
63
```
59
64
60
65
3. Copilot CLI will explore the project, propose a plan, and (with your approval) write the file. Approve the file write when prompted.
61
-
4. Open the generated **`server/routes/publishers.py`** in your editor.
62
-
5. Notice the function signatures use [type hints][python-type-hints] — that's coming from a directive already in **`.github/copilot-instructions.md`**.
66
+
4. Open the generated `server/routes/publishers.py` in your editor.
67
+
5. Notice the function signatures use [type hints][python-type-hints] — that's coming from a directive already in `.github/copilot-instructions.md`.
63
68
6. Notice the generated code **is missing** docstrings and a file-level comment header.
64
69
65
70
<Asidetype="caution">
@@ -68,7 +73,7 @@ To see the impact of custom instructions, start by generating code with the curr
68
73
69
74
## Add a new repository standard
70
75
71
-
<AddDocstringInstructions />
76
+
<ExerciseInstructionsAddDocstring />
72
77
73
78
## Re-run the prompt and observe the change
74
79
@@ -81,7 +86,7 @@ Now that the instructions have a docstring rule, ask Copilot CLI to update the p
81
86
Update server/routes/publishers.py to follow the latest documentation conventions in .github/copilot-instructions.md.
82
87
```
83
88
84
-
3. Approve the file edit when prompted, then reopen **`server/routes/publishers.py`**.
89
+
3. Approve the file edit when prompted, then reopen `server/routes/publishers.py`.
85
90
4. Notice that the file now opens with a comment block similar to:
86
91
87
92
```python
@@ -102,16 +107,14 @@ Now that the instructions have a docstring rule, ask Copilot CLI to update the p
102
107
"""
103
108
```
104
109
105
-
6. Leave the generated file in place — there's no harm in keeping it, and you'll build on this work in a later exercise.
106
-
107
-
You just steered Copilot CLI to follow a new project standard with a single line of markdown — no flags, no plugins, no MCP servers. That's the power of repository custom instructions.
110
+
6. Leave the generated file in place — you'll build on this work in a later exercise.
108
111
109
112
## Summary and next steps
110
113
111
114
You explored how Copilot picks up context from instruction files in this project, then used Copilot CLI to:
112
115
113
116
- generate a Flask endpoint with the *existing* instructions,
114
-
- add a new repository-wide standard to **`.github/copilot-instructions.md`**,
117
+
- add a new repository-wide standard to `.github/copilot-instructions.md`,
115
118
- re-run the same prompt and watch the regenerated code adopt the new standard.
116
119
117
120
Next, you'll extend Copilot CLI's reach beyond the repo by [connecting to MCP servers][next-lesson] so it can talk to GitHub and other external systems.
@@ -125,7 +128,7 @@ Next, you'll extend Copilot CLI's reach beyond the repo by [connecting to MCP se
There's more to writing code than just writing code. Issues need to be filed, external services need to be called, and information needs to be gathered. Typically this involves interacting with external tools, which can break a developer's flow. Through the power of Model Context Protocol (MCP), you can access all of this functionality right from Copilot CLI!
10
10
11
-
## Scenario
12
-
13
-
You are a part-time developer for Tailspin Toys - a crowdfunding platform for board games with a developer theme. You've been assigned various tasks to introduce new functionality to the website. Being a good team member, you want to file issues to track your work. To help future you, you've decided to enlist the help of Copilot. You will set up your backlog of work for the rest of the lab, using GitHub Copilot CLI and the GitHub Model Context Protocol (MCP) server to create the issues for you.
14
-
15
11
In this exercise, you will:
16
12
17
13
- understand what Model Context Protocol (MCP) is and how it works with Copilot CLI.
18
14
- set up the GitHub MCP server in your repository.
19
15
- use GitHub Copilot CLI to create issues in your repository.
20
16
21
-
By the end of this exercise, you will have created a backlog of GitHub issues for use throughout the remainder of the lab.
17
+
## Scenario
18
+
19
+
You've been assigned various tasks to introduce new functionality to the website. Being a good team member, you want to file issues to track your work. To help future you, you've decided to enlist the help of Copilot. You will set up your backlog of work for the rest of the lab, using GitHub Copilot CLI and the GitHub Model Context Protocol (MCP) server to create the issues for you.
22
20
23
21
## What is Model Context Protocol (MCP)?
24
22
25
-
<McpOverview />
23
+
<SectionMcpOverview />
24
+
25
+
26
+
You can register MCP servers for Copilot CLI to use in a couple of locations. These allow you to both ensure the right MCP servers are available for a project, and to always have access to the ones you use frequently across all projects.
27
+
28
+
| Location | Access | Editing |
29
+
| --- | --- | --- |
30
+
|`<project-root>/.mcp.json`| Available to the current project. Becomes an asset in the project. | Manually update the file |
31
+
|`~/.copilot/mcp.json`| Always available when you're using Copilot CLI on that system. | Manually update the file or through Copilot CLI directly by using `--mcp` or `/mcp`|
32
+
33
+
<Asidetype="note">
34
+
Copilot CLI always includes a readonly instance of the GitHub MCP server. In the next exercise you will register the full version to be able to create issues for your project.
35
+
</Aside>
26
36
27
37
## Setting up the GitHub MCP server in Copilot CLI
28
38
29
-
<StartCopilotCli />
39
+
Let's register the read/write GitHub MCP server for Copilot CLI.
30
40
31
-
Copilot CLI supports MCP servers via a configuration file at **~/.copilot/mcp.json**. Additionally, in your project the **.vscode/mcp.json** file can configure MCP servers for VS Code-based workflows, and Copilot CLI also reads from this file.
41
+
<CalloutStartCopilotCli />
32
42
33
43
1. Register the GitHub MCP server in Copilot CLI using the `/mcp` command:
34
44
@@ -47,7 +57,7 @@ You should see the GitHub MCP server listed and marked as active.
47
57
48
58
## Creating a backlog of tasks
49
59
50
-
Now that you have set up the GitHub MCP server, you can use Copilot CLI to create a backlog of tasks for use in the rest of the lab.
60
+
Now that you have set up the full GitHub MCP server, you can use Copilot CLI to create a backlog of tasks for use in the rest of the workshop.
51
61
52
62
1. In the Copilot CLI prompt, type or paste the following prompt to create the issues you'll be working on in the lab:
0 commit comments