Skip to content
Open
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
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"cSpell.words": [
"agentic",
"Caldova",
"frontmatter",
"geektrainer",
"subfolders",
"winget"
],
"typescript.tsdk": "website/node_modules/typescript/lib"
Expand Down
Binary file removed docs/_images/cli-5-agent-skill.png
Binary file not shown.
Binary file modified docs/_images/ex0-repository-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/cli-caldova/0-prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: "Exercise 0: Prerequisites"
authors:
- geektrainer
lastUpdated: 2026-06-30
---

Before you start the Copilot CLI exercises, you need to get everything ready. You'll create your own copy of the Caldova Careers repository and spin up a [codespace][codespaces], whose integrated terminal you'll use to install and run Copilot CLI in the next exercise.

## Setting up the lab repository

To create a copy of the repository for the code you'll create, you'll make an instance from the [template][template-repository]. The new instance will contain all of the necessary files for the lab, and you'll use it as you work through the exercises.

1. In a new browser window, navigate to the GitHub repository for this lab: `https://github.com/geektrainer/caldova-careers`.
2. Create your own copy of the repository by selecting the **Use this template** button on the lab repository page. Then select **Create a new repository**.

![Use this template button](../_images/ex0-use-template.png)

3. If you are completing the workshop as part of an event being led by GitHub or Microsoft, follow the instructions provided by the mentors. Otherwise, you can create the new repository in an organization where you have access to GitHub Copilot.

![Input the repository template settings](../_images/ex0-repository-settings.png)

4. Make a note of the repository path you created (**organization-or-user-name/repository-name**), as you will be referring to this later in the lab.

> [!NOTE]
> **Your backlog is ready**
>
> When you create your repository from the template, a short setup workflow runs automatically and files a backlog of GitHub issues for you — including the feature work you'll pick up in later exercises. You'll work from these issues throughout the workshop; there's nothing to file yourself. If the **Issues** tab looks empty immediately after creation, give the workflow a minute to finish and refresh.
## Creating a codespace

Next up, you'll use a codespace to complete the lab exercises.

[GitHub Codespaces][codespaces] are a cloud-based development environment that allows you to write, run, and debug code directly in your browser. It provides a fully-featured IDE with support for multiple programming languages, extensions, and tools.

1. Navigate to your newly created repository.
2. Select the green **Code** button.

![Select the Code button](../_images/ex0-code-button.png)

3. Select the **Codespaces** tab and select the **+** button to create a new Codespace.

![Create a new codespace](../_images/ex0-create-codespace.png)

The creation of the codespace will take several minutes, although it's still far quicker than having to manually install all the services! That said, you can use this time to explore other features of GitHub Copilot, which we'll turn your attention to next.

> [!CAUTION]
> You'll return to the codespace in a future exercise. For the time being, leave it open in a tab in your browser.

> [!NOTE]
> This workshop is built to run inside a codespace or local [dev container][dev-containers]. Both ensure the environment has all the necessary prerequisites installed for a smooth experience. If you'd prefer to run it locally, open the cloned repository in VS Code and select **Reopen in Container** when prompted — VS Code will build the same dev container the codespace uses.

> [!TIP]
> The setup workflow removes itself with a small commit after it files your backlog. If you created your codespace right away, run `git pull` in the codespace terminal once it's ready so you're on the latest commit before you start working.

## Summary

Congratulations, you have created a copy of the lab repository! You also began the creation process of your codespace, which you'll use when you begin working with Copilot CLI.

## Next step

Let's install Copilot CLI and authenticate it with your GitHub account. Continue to [Exercise 1 - Installing GitHub Copilot CLI][next-lesson].

## Resources

- [GitHub Codespaces overview][codespaces]
- [Creating a repository from a template][template-repository]
- [Getting started with Codespaces][codespaces-quickstart]

[template-repository]: https://docs.github.com/repositories/creating-and-managing-repositories/creating-a-template-repository
[codespaces-quickstart]: https://docs.github.com/codespaces/getting-started/quickstart
[next-lesson]: ../1-install-copilot-cli/
[codespaces]: https://github.com/features/codespaces
[dev-containers]: https://code.visualstudio.com/docs/devcontainers/containers
129 changes: 129 additions & 0 deletions docs/cli-caldova/1-install-copilot-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
title: "Exercise 1 - Installing GitHub Copilot CLI"
authors:
- geektrainer
lastUpdated: 2026-06-30
---

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

In this exercise, you will learn how to:

- install GitHub Copilot CLI using npm.
- authenticate with your GitHub account.
- verify the installation.

## Scenario

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.

## Open a terminal in your codespace

Before installing Copilot CLI, you need to open a terminal window in your codespace.

1. Return to your codespace if you're not already there.
2. Open a terminal window by pressing <kbd>Ctrl</kbd>+<kbd>\`</kbd>.
3. You should see a terminal panel appear at the bottom of your VS Code window.

## Install Copilot CLI

You can install Copilot CLI through [npm][install-npm], [WinGet][install-winget], and [Homebrew][install-homebrew]. Since GitHub Codespaces come with Node.js pre-installed you'll use npm to install Copilot CLI.

1. In the terminal, verify Node.js is installed and meets the version requirement:

```bash
node --version
```

You should see version 22 or higher (e.g., `v22.x.x`).

2. Install Copilot CLI globally in the codespace using npm:

```bash
npm install -g @github/copilot
```

3. Verify the installation by checking the version:

```bash
copilot --version
```

You should see the version number displayed (e.g., `v1.0.XX`).

> [!TIP]
> 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.

## Authenticate with GitHub

On first launch, Copilot CLI will prompt you to authenticate with your GitHub account.

1. Start Copilot CLI:

```bash
copilot
```

2. If you're not currently logged in, you'll see a prompt to authenticate. Copilot CLI will display a device code and ask you to visit a URL.
3. Follow the on-screen instructions:
- Open the provided URL in your browser
- Enter the device code when prompted
- Authorize Copilot CLI to access your GitHub account
4. Once authenticated, you'll see the Copilot CLI prompt, ready to accept your questions and commands.

> [!NOTE]
> In a codespace, you may already be authenticated through your GitHub session. If Copilot CLI starts without prompting for authentication, you're good to go!

## Trust the directory and verify everything is working

Now that you're at the Copilot CLI prompt for the first time, let's trust this workshop repository and make sure Copilot CLI is properly installed and connected.

1. When Copilot CLI asks you to confirm that you trust the files in this folder, you'll see three options:
- **Yes, proceed**: Trust for this session only
- **Yes, and remember this folder for future sessions**: Trust permanently
- **No, exit (Esc)**: Don't allow file access
2. For this workshop, select **Yes, and remember this folder for future sessions** since you'll be working in this repository throughout.
3. Ask Copilot a simple question to verify it's working:

```
What files are in this project?
```

4. Copilot should explore the repository and provide a summary of the project structure.
5. Try the `/help` command to see available slash commands:

```
/help
```

6. Exit Copilot CLI by entering the following command in the terminal. We will return back to Copilot CLI in a future exercise!

```
exit
```

## Summary and next steps

Congratulations! You've successfully installed and authenticated GitHub Copilot CLI. You learned how to:

- install Copilot CLI using npm.
- authenticate with your GitHub account.
- trust a directory for Copilot CLI to work with.
- verify the installation is working correctly.

Now that Copilot CLI is installed, let's give Copilot some project context. Continue to [Exercise 2 - Custom instructions with CLI][next-lesson].

## Resources

- [Installing GitHub Copilot CLI][install-copilot-cli]
- [About Copilot CLI][about-copilot-cli]
- [Using Copilot CLI][using-copilot-cli]

[previous-lesson]: ../0-prerequisites/
[next-lesson]: ../2-custom-instructions/
[install-copilot-cli]: https://docs.github.com/copilot/how-tos/set-up/install-copilot-cli
[install-npm]: https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli#installing-with-npm-all-platforms
[install-winget]: https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli#installing-with-winget-windows
[install-homebrew]: https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli#installing-with-homebrew-macos-and-linux
[about-copilot-cli]: https://docs.github.com/copilot/concepts/agents/about-copilot-cli
[using-copilot-cli]: https://docs.github.com/copilot/how-tos/use-copilot-agents/use-copilot-cli
Loading
Loading