Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM mcr.microsoft.com/devcontainers/python:3.11-bookworm

ARG NPM_CONFIG_REGISTRY
ARG PIP_INDEX_URL
ARG RestoreSources

ENV NPM_CONFIG_REGISTRY="${NPM_CONFIG_REGISTRY:-https://registry.npmjs.org/}" \
PIP_INDEX_URL="${PIP_INDEX_URL:-https://pypi.org/simple/}" \
RestoreSources="${RestoreSources:-https://api.nuget.org/v3/index.json}"
52 changes: 0 additions & 52 deletions .devcontainer/Dockerfile.opt

This file was deleted.

59 changes: 59 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {
"version": "1.3.0",
"resolved": "ghcr.io/devcontainers/features/azure-cli@sha256:d98f1066c077be0fa9d115b718f458bd803e415181b4a96f82a6f5d9f77241ac",
"integrity": "sha256:d98f1066c077be0fa9d115b718f458bd803e415181b4a96f82a6f5d9f77241ac"
},
"ghcr.io/devcontainers/features/common-utils:2": {
"version": "2.5.9",
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a",
"integrity": "sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a"
},
"ghcr.io/devcontainers/features/copilot-cli": {
"version": "1.1.3",
"resolved": "ghcr.io/devcontainers/features/copilot-cli@sha256:e10d091ae7ef9b8d2ed5f601d75f5a090bc04acbac1a26d4cd3c0d5edde4ea10",
"integrity": "sha256:e10d091ae7ef9b8d2ed5f601d75f5a090bc04acbac1a26d4cd3c0d5edde4ea10"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker": {
"version": "1.10.0",
"resolved": "ghcr.io/devcontainers/features/docker-outside-of-docker@sha256:c2c2cf829505ead8e4892c88c31b6594ae94a2bbb209e16e1fac456c1a3a624e",
"integrity": "sha256:c2c2cf829505ead8e4892c88c31b6594ae94a2bbb209e16e1fac456c1a3a624e"
},
"ghcr.io/devcontainers/features/github-cli": {
"version": "1.1.0",
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671",
"integrity": "sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671"
},
"ghcr.io/devcontainers/features/node:2.1.0": {
"version": "2.1.0",
"resolved": "ghcr.io/devcontainers/features/node@sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857",
"integrity": "sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857"
},
"ghcr.io/jsburckhardt/devcontainer-features/glow": {
"version": "1.0.0",
"resolved": "ghcr.io/jsburckhardt/devcontainer-features/glow@sha256:62ff23e23b936c28ad32300151a33cacaa552d10a29b8991a33797d42d0e0ec0",
"integrity": "sha256:62ff23e23b936c28ad32300151a33cacaa552d10a29b8991a33797d42d0e0ec0"
},
"ghcr.io/jsburckhardt/devcontainer-features/tmux": {
"version": "2.0.0",
"resolved": "ghcr.io/jsburckhardt/devcontainer-features/tmux@sha256:65d1809a7e1b03b3a5d272443b5ab1832ed795439aec0ed3c655c73856bc6c8a",
"integrity": "sha256:65d1809a7e1b03b3a5d272443b5ab1832ed795439aec0ed3c655c73856bc6c8a"
},
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {
"version": "1.0.0",
"resolved": "ghcr.io/jsburckhardt/devcontainer-features/uv@sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7",
"integrity": "sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7"
},
"ghcr.io/rosstaco/devcontainer-features/copilot-persistence": {
"version": "1.1.0",
"resolved": "ghcr.io/rosstaco/devcontainer-features/copilot-persistence@sha256:6dd5cd9b007544b542d8aa71c09e5076ac0b81cae293ba59a8fb78c26119a610",
"integrity": "sha256:6dd5cd9b007544b542d8aa71c09e5076ac0b81cae293ba59a8fb78c26119a610"
},
"ghcr.io/stuartleeks/dev-container-features/shell-history": {
"version": "0.0.6",
"resolved": "ghcr.io/stuartleeks/dev-container-features/shell-history@sha256:f266af2d093e0611921ccf510046e53affeccb353405ee05d2b91fcc4f69c1c9",
"integrity": "sha256:f266af2d093e0611921ccf510046e53affeccb353405ee05d2b91fcc4f69c1c9"
}
}
}
16 changes: 13 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"name": "copilot-cli-deep-dive-workshop",
"image": "mcr.microsoft.com/devcontainers/python:3.11-bookworm",
"build": {
"dockerfile": "Dockerfile",
"args": {
"NPM_CONFIG_REGISTRY": "${localEnv:NPM_CONFIG_REGISTRY}",
"PIP_INDEX_URL": "${localEnv:PIP_INDEX_URL}",
"RestoreSources": "${localEnv:RestoreSources}"
}
},
"runArgs": [
"--name",
"ccddw"
Expand All @@ -12,7 +19,7 @@
"installOhMyZshConfig": true
},
"ghcr.io/devcontainers/features/docker-outside-of-docker": {},
"ghcr.io/devcontainers/features/node": {
"ghcr.io/devcontainers/features/node:2.1.0": {
"version": "lts"
},
"ghcr.io/devcontainers/features/azure-cli:1": {},
Expand All @@ -22,7 +29,10 @@
},
"ghcr.io/stuartleeks/dev-container-features/shell-history": {},
"ghcr.io/devcontainers/features/github-cli": {},
"ghcr.io/devcontainers/features/copilot-cli": {}
"ghcr.io/devcontainers/features/copilot-cli": {},
"ghcr.io/rosstaco/devcontainer-features/copilot-persistence": {},
"ghcr.io/jsburckhardt/devcontainer-features/tmux": {},
"ghcr.io/jsburckhardt/devcontainer-features/glow": {}
},
"customizations": {
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ WORKSHOP_FLOW: "Installation (01) -> Core Concepts (02-05) -> Advanced (06-13)"
WORKSHOP_DURATION: "~4.5 hours"
MODULE_COUNT: 13
SLIDE_SYNC_RULE: "When modifying docs/workshop/NN-*.md, always check and update docs/slides/NN-*.md"
VALIDATED_CLI_VERSION: "1.0.69-1"
VALIDATED_CLI_VERSION: "1.0.79-5"

DOCKER_SETUP: TEXT
docker run -it --name copilot-workshop \
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GitHub Copilot CLI — Deep-Dive Workshop

[![Copilot CLI version](https://img.shields.io/badge/Copilot%20CLI-v1.0.69--1-blue?logo=github)](https://github.com/github/copilot-cli/releases/tag/v1.0.69-1)
[![Copilot CLI version](https://img.shields.io/badge/Copilot%20CLI-v1.0.79--5-blue?logo=github)](https://github.com/github/copilot-cli/releases/tag/v1.0.79-5)
[![APS version](https://img.shields.io/badge/APS-v1.2.1-blue?logo=github)](https://github.com/chris-buckley/agnostic-prompt-standard/releases/tag/v1.2.1)

A **half-day, instructor-led** workshop that takes teams from first install to advanced automation with GitHub Copilot CLI. Covers operating modes, custom instructions, MCP servers, agent skills, plugins, custom agents, hooks, context management, and more — all through hands-on exercises validated against **Copilot CLI v1.0.69-1**.
A **half-day, instructor-led** workshop that takes teams from first install to advanced automation with GitHub Copilot CLI. Covers operating modes, custom instructions, MCP servers, agent skills, plugins, custom agents, hooks, context management, and more — all through hands-on exercises validated against **Copilot CLI v1.0.79-5**.

## What's Inside

Expand Down Expand Up @@ -46,6 +46,12 @@ This repo includes a `.devcontainer` configuration for a fully isolated workshop
2. Click **"Reopen in Container"** when prompted (or run `Dev Containers: Reopen in Container` from the command palette)
3. All prerequisites (Node.js, npm, git, gh) are pre-installed

The Dev Container passes `NPM_CONFIG_REGISTRY`, `PIP_INDEX_URL`, and `RestoreSources`
from the environment that launches VS Code into the image build and the resulting
container. Export these variables before starting VS Code, then rebuild the container
after changing them. If a variable is not set, the Dev Container uses the corresponding
public npm, PyPI, or NuGet registry.

> This is the recommended approach — it avoids polluting your host machine and ensures a consistent environment for all participants.

### Alternative: Run Directly on Host
Expand Down
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1>GitHub Copilot CLI<br>Deep-Dive Workshop</h1>
<div class="stat-label">Modules</div>
</div>
<div class="stat">
<div class="stat-value">v1.0.69-1</div>
<div class="stat-value">v1.0.79-5</div>
<div class="stat-label">Copilot CLI</div>
</div>
</div>
Expand All @@ -57,12 +57,12 @@ <h3>Custom Instructions</h3>
<div class="feature-card">
<div class="feature-icon">🔌</div>
<h3>MCP Servers & Tools</h3>
<p>Connect to GitHub MCP, configure local/remote servers, and manage tool permissions effectively.</p>
<p>Connect to GitHub MCP, configure local/remote servers, and control access with permission modes and command sandboxing.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🤖</div>
<h3>Agents & Skills</h3>
<p>Build custom agents, create reusable skills, and leverage the plugin ecosystem.</p>
<p>Build custom agents, create reusable skills alongside the built-in ones, and leverage the plugin ecosystem.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🪝</div>
Expand All @@ -72,7 +72,7 @@ <h3>Hooks & Automation</h3>
<div class="feature-card">
<div class="feature-icon">⚙️</div>
<h3>Configuration</h3>
<p>Context management, session handling, IDE integration, accessibility, and team standardization.</p>
<p>User settings, session limits and AI credits, context management, IDE integration, accessibility, and team standardization.</p>
</div>
</div>
</div>
Expand Down
51 changes: 48 additions & 3 deletions docs/slides/01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ style: |
|--------|---------|----------|
| **Script** | `curl -fsSL https://gh.io/copilot-install \| bash` | Quick setup |
| npm | `npm install -g @github/copilot` | Node.js devs |
| Homebrew | `brew install copilot-cli` | macOS/Linux |
| Homebrew | `brew install --cask copilot-cli` | macOS |
| WinGet | `winget install GitHub.Copilot` | Windows |
| Dev Container | Built-in | Codespaces |

Expand All @@ -85,15 +85,56 @@ style: |
## Authentication

```bash
# Start Copilot — browser opens for OAuth
# Start Copilot — OAuth flow begins
copilot

# Force a specific OAuth mode
copilot login --web-flow # browser (default on desktops)
copilot login --device-code # default when remote/headless

# Or use a token (CI/CD, containers)
export COPILOT_GITHUB_TOKEN="github_pat_your_token"
copilot
```

For containers/CI: create a **fine-grained PAT** with **"Copilot Requests"** permission
For containers/CI: create a **fine-grained PAT** with **"Copilot Requests"** permission — classic PATs (`ghp_`) are **not** supported

---

## Enterprise Cloud & Signing Out

**GHEC data residency** — authenticate against your enterprise host:

```bash
copilot login --host https://example.ghe.com
```

Credentials are stored separately from github.com, so you connect to your
enterprise's dedicated environment.

**Signing out:** when you signed in via the **gh CLI, a PAT, an API key, or an
env var**, `/logout` displays a warning — that credential source must be
removed separately.

---

## Shell Completion

Tab completion for `copilot` subcommands and flags:

```bash
# Bash (current session)
source <(copilot completion bash)

# Bash (persistent, Linux)
copilot completion bash | sudo tee /etc/bash_completion.d/copilot

# Zsh — write to a directory on your $fpath, then restart the shell
copilot completion zsh > "${fpath[1]}/_copilot"

# Fish
copilot completion fish > ~/.config/fish/completions/copilot.fish
```

---

Expand Down Expand Up @@ -127,6 +168,10 @@ copilot --version
# Check for updates
copilot version

# Update on a specific channel
copilot update stable
copilot update prerelease

# Inside a session:
/version
```
Expand Down
60 changes: 54 additions & 6 deletions docs/slides/02-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,23 @@ Perfect for: automation, CI/CD, scripting

---

## Programmatic Mode: Machine-Readable Output

```bash
# JSON output for scripting
copilot -p "list all TODO comments" --output-format json
```

```bash
# Silent mode — agent response only, no stats
copilot -p "What is 2+2?" -s
```

Pair `--output-format json` with a parser like `jq`; use `-s` when you want
the response text alone, with no session statistics around it.

---

## Delegate Mode

**Hand off to a cloud agent** — it creates a branch and PR
Expand All @@ -138,18 +155,22 @@ Type **`/help`** to see them all

| Category | Key commands |
|----------|-------------|
| **Review** | `/plan`, `/review`, `/rubber-duck`, `/security-review`, `/diff`, `/research`, `/undo` |
| **Session** | `/clear`, `/resume`, `/rename`, `/session`, `/usage` |
| **Review** | `/plan`, `/review`, `/rubber-duck`, `/security-review`, `/diff`, `/research`, `/rewind` |
| **Session** | `/clear`, `/resume`, `/rename`, `/fork`, `/session`, `/usage` |
| **Navigation** | `/cwd`, `/add-dir`, `/list-dirs` |
| **Context** | `/context`, `/compact` |
| **Config** | `/model`, `/mcp`, `/plugin`, `/settings`, `/subagents`, `/instructions` |
| **Tools** | `/allow-all`, `/reset-allowed-tools` |
| **Config** | `/model`, `/mcp`, `/plugin`, `/theme`, `/settings`, `/statusline`, `/subagents`, `/instructions` |
| **Tools** | `/permissions`, `/allow-all`, `/reset-allowed-tools` |
| **Extensibility** | `/skills`, `/plugin`, `/agent`, `/fleet` |
| **Scheduling** | `/after`, `/every` |
| **Sharing** | `/share`, `/feedback`, `/copy` |
| **Account** | `/login`, `/logout`, `/user` |
| **IDE** | `/ide` |
| **System** | `/help`, `/exit`, `/init`, `/tasks`, `/lsp`, `/update`, `/restart`, `/version`, `/chronicle`, `/limits` |
| **System** | `/help`, `/changelog`, `/exit`, `/init`, `/tasks`, `/lsp`, `/update`, `/restart`, `/version`, `/chronicle`, `/limits` |

> Most commands have aliases — `/yolo` → `/allow-all`, `/cd` → `/cwd`, `/undo` → `/rewind`
> `/theme` with no argument opens the theme picker; `/settings theme dim` sets it directly
> (themes: `default`, `github`, `dim`, `high-contrast`, `colorblind`)

---

Expand All @@ -162,7 +183,7 @@ Type **`/help`** to see them all
| `!` | Run shell commands directly (only way to access shell) |
| `Shift+Tab` | Cycle between chat → plan → autopilot mode |
| `Esc` | Cancel current operation |
| `Double-Esc` | Clear input or trigger undo |
| `Double-Esc` | Clear input, or rewind the last turn |
| `ctrl+t` | Toggle reasoning display |
| `ctrl+x → /` | Quick slash command |
| `ctrl+c` | Cancel / clear input / exit |
Expand Down Expand Up @@ -243,6 +264,33 @@ When Copilot wants to run a command, you choose:

---

## Permission Modes & Session Limits

Switch how much the agent may do on its own:

```
/permissions manual # approve every request
/permissions assisted # auto-approve what a safety check deems safe
/permissions allow-all # auto-approve tools, paths, and URLs
/permissions show # show current status
```

Cap what a session may spend (opt-in, minimum **30** AI credits):

```bash
copilot --max-ai-credits 30
```

```
/limits # interactive limits dialog
/limits set max-ai-credits 50
/limits unset all
```

> The AI credit limit is a **soft cap** — usage is known only after a response returns

---

## Your Turn! 🚀

Open **Module 2** in `docs/workshop/02-modes.md`
Expand Down
Loading