π± Scan to open this repo Β· github.com/jeffrey-groneberg/ghcli_demo
Based on the official course github/copilot-cli-for-beginners.
π Heads up about the dedicated site: The old
github.github.io/copilot-cli-for-beginners/GitHub Pages site is gone (404). The course has been republished on the Awesome Copilot Learning Hub: https://awesome-copilot.github.com/learning-hub/cli-for-beginners/ Use that URL when you point the audience to the web version. Source of truth (and where this demo script comes from) is still the repo.
In 45 minutes, take an audience from "never used Copilot CLI" to "I understand the modes, slash commands, hotkeys, custom agents, skills, and MCP β and I know what to use when."
The whole demo runs against the sample app samples/book-app-project in the course repo (Python).
# 1. Clone the course repo
git clone https://github.com/github/copilot-cli-for-beginners
cd copilot-cli-for-beginners
# 2. Confirm install + auth
copilot --version
copilot # then: /login (only if not signed in)
# 3. Confirm sample app runs
cd samples/book-app-project && python book_app.py list && cd ../..
# 4. Pre-warm one Copilot session so the first response is snappy
copilot -p "Say hello in one sentence."If you only have time for one prep step: make sure copilot starts and the book app's list command works.
| Time | Segment | Course Chapter |
|---|---|---|
| 00:00β03:00 | Intro + what Copilot CLI is | 00 |
| 03:00β10:00 | First Steps: 3 demos + 3 modes | 01 |
| 10:00β18:00 | Context & Conversations | 02 |
| 18:00β26:00 | Development Workflows | 03 |
| 26:00β32:00 | Custom Agents & Instructions | 04 |
| 32:00β37:00 | Skills | 05 |
| 37:00β42:00 | MCP Servers | 06 |
| 42:00β45:00 | Putting it together + wrap | 07 |
Talking points (no commands):
- Copilot CLI = AI pair programmer in your terminal. No IDE switch.
- Family map (show the README table): Copilot CLI (terminal), Copilot in editors, Copilot on github.com, Copilot cloud/coding agent.
- One sentence: "Anything you'd open a chat panel or a browser for, you can now do without leaving the prompt."
One-liner to project on screen:
copilot --versionGoal: 3 quick wins, then introduce the 3 interaction modes.
copilotShow the trust prompt β "Trust this folder."
At the > prompt:
> Review @samples/book-app-project/book_app.py for any security or code quality issues
Narrate as findings stream in: input validation, eval, file handling, etc.
> Explain @samples/book-app-project/books.py in plain English. What's the data model?
> Write a bash script that backs up books.json with a timestamped filename and keeps the 5 most recent backups
Accept the suggestion β run it β show the file appeared.
Show all three explicitly. Hotkey: Shift+Tab cycles modes (Standard β Plan β Autopilot).
| Mode | How to enter | When to use |
|---|---|---|
| Interactive | Default when you run copilot |
Exploration, Q&A, iterative work |
| Plan | /plan or Shift+Tab once |
Multi-step work β review the plan, then go |
| Autopilot | Shift+Tab again, or copilot --autopilot |
Hands-off execution after a good plan |
| Programmatic | copilot -p "prompt" from shell |
CI, scripts, one-shot pipelines |
Live demo of -p:
copilot -p "List the functions defined in @samples/book-app-project/book_app.py with one-line descriptions"Exit with:
> /exit
Goal: show how Copilot CLI sees your project. Files, issues, sessions, sharing.
Restart Copilot:
copilot> Compare @samples/book-app-project/book_app.py and @samples/book-app-project/books.py β where is responsibility split, and where is it leaky?
Hotkey: type @ to trigger the file picker (Tab completes paths).
> Summarize #1 from this repo and list any acceptance criteria
> !ls samples/book-app-project
> /add-dir samples/book-app-project-js
| Command | What it does |
|---|---|
/clear or /new |
Start a fresh conversation (drop context) |
/compact |
Summarize history to free context window |
/context |
Show token usage gauge |
/rewind (or Esc Esc) |
Open the timeline picker, jump back to any earlier point |
/session |
Manage saved sessions |
/share |
Get a link + QR code to follow the live session on phone |
Live:
> /context
> /share
(Open the QR on your phone for "wow" factor.)
Say one line: "Cmd+V (Mac) / Ctrl+V pastes a screenshot β Copilot reads the image."
Goal: review, debug, generate tests, ship a PR.
> /review @samples/book-app-project/book_app.py focus on security
Or:
> Review @samples/book-app-project/books.py and group findings as: π΄ critical, π‘ should-fix, π’ nice-to-have
> @samples/book-app-project/book_app.py β when I run `python book_app.py find author "Tolkien"` it returns 0 results even though "The Hobbit" by J.R.R. Tolkien exists. Find the root cause and propose a fix.
> Generate pytest tests for @samples/book-app-project/books.py β cover happy paths, edge cases (empty collection, duplicates), and use @pytest.mark.parametrize where it makes sense. Place them under samples/book-app-project/tests/
Run them:
> !cd samples/book-app-project && pytest -q
| Command | Purpose |
|---|---|
/diff |
Summarize current uncommitted changes |
/pr |
Operate on the PR for the current branch (create / summarize) |
/delegate (or prefix &) |
Hand off a self-contained task to the GitHub Copilot cloud agent β it runs in the background and opens a PR |
Live (only if branch is ready):
> /diff
> Write a conventional commit message for these changes
> /pr
Delegate example to mention (don't necessarily run live):
> & Add a --json flag to `python book_app.py list` and update the README accordingly
Goal: show how to make Copilot behave like your team.
copilot init # scaffolds .github/copilot-instructions.md (and/or AGENTS.md)Open the file, point out:
- Project description
- Coding standards
- Things to never do
Show the file structure (.github/agents/<name>.md with frontmatter), then live:
> /agent
Select an agent (e.g. python-reviewer) β Copilot is now wearing that hat.
Then:
> Review @samples/book-app-project/books.py
Same prompt as before, noticeably different output because the agent has its own persona, model, and tool allow-list.
Other useful commands here:
| Command | Purpose |
|---|---|
/agent |
Pick / switch active agent |
/model |
Switch the LLM |
/memory |
Inspect / edit long-term memory the agent has captured |
/env |
Show loaded instructions, agents, skills, MCP servers |
Goal: skills = modular capabilities that auto-activate based on your prompt.
> /skills
Skills are matched by their description. So a prompt like the following will automatically engage a testing skill if one is registered:
> Following our team's testing conventions, add a test for the add_book function in @samples/book-app-project/books.py
Narrate: "Notice it picked up the testing skill from ~/.copilot/skills/ β I never had to name it."
- Custom instructions = always-on rules (every prompt)
- Agents = personas you explicitly switch into (
/agent) - Skills = modular capabilities that auto-activate when relevant
Goal: extend Copilot CLI to talk to GitHub, the filesystem, docs sites, databases, etc.
> /mcp show
> Using the GitHub MCP, list the last 5 issues opened on this repo and their labels
> What did the most recent commit on main change, and why?
Show the config file path: ~/.copilot/mcp-config.json, then list common ones:
| Server | What it gives you |
|---|---|
github |
Repos, issues, PRs, code search (built-in) |
filesystem |
Broader file access beyond the cwd |
context7 |
Up-to-date library/docs lookup |
microsoft-learn |
Official Microsoft docs |
From a shell (NOT inside Copilot):
copilot mcp list
copilot mcp enable github> Use the filesystem MCP to find every place we touch books.json, then use the GitHub MCP to check if any open PR is already changing those files, then recommend whether I should start a new branch.
One idea-to-PR flow in a single session:
copilot
> /plan
> Add a `list-unread` command to @samples/book-app-project/book_app.py that prints books where read=False, with --json support
# Review plan, hit Shift+Tab to autopilot OR accept and continue interactively
> /agent # switch to python-reviewer
> Implement the plan
> /agent # switch to pytest-helper
> Generate tests
> !cd samples/book-app-project && pytest -q
> /diff
> /pr
Close with the same slide you opened on: family map β emphasize CLI is now a peer of the editor and cloud agent.
| Keys | Action |
|---|---|
Shift+Tab |
Cycle mode: Standard β Plan β Autopilot |
Tab |
Tab-complete slash commands, file paths, suggestions |
@ |
Insert a file reference (with picker) |
# |
Reference a GitHub issue or PR |
! |
Run a local shell command without leaving Copilot |
? |
Quick help (on an empty prompt) |
Esc |
Cancel current operation |
Esc Esc (double) |
Cancel in-flight work / open /rewind timeline picker |
Ctrl+C |
Cancel / clear input (twice = exit) |
Ctrl+D |
Shut down |
Ctrl+L |
Clear the screen |
Ctrl+G or Ctrl+X e |
Edit prompt in $EDITOR |
Ctrl+V |
Paste image from clipboard as attachment |
Ctrl+R |
Reverse-search history |
Ctrl+Enter / Ctrl+Q |
Queue a message while agent is busy |
Shift+Enter / Option+Enter / Alt+Enter |
Newline in input |
Ctrl+X then / |
Run a slash command without retyping your prompt |
Ctrl+X then b |
Send the running task to the background |
Ctrl+X then o |
Open the most recent link from the timeline |
Ctrl+Z |
Suspend Copilot to background (Unix) |
| Keys | Action |
|---|---|
Ctrl+F |
Search the timeline |
Ctrl+O |
Expand recent timeline items (empty prompt) |
Ctrl+E |
Expand all timeline items (empty prompt) |
Ctrl+T |
Toggle reasoning display |
PgUp/PgDn |
Scroll timeline |
| Keys | Action |
|---|---|
β/β |
Move selection |
Enter |
Open session |
Tab |
Switch local β remote |
s |
Cycle sort order |
d |
Delete selected session |
Esc |
Close picker |
| Command | Purpose |
|---|---|
/login |
Sign in via device flow |
/help |
Built-in help |
/exit /quit |
Leave the CLI |
/clear /new |
Start a fresh conversation |
/compact |
Summarize history to save context window tokens |
/context |
Visualize token usage |
/rewind |
Open timeline picker to jump back (or press Esc Esc) |
/plan |
Enter Plan mode |
/agent |
Browse / switch active agent |
/model |
Switch the LLM |
/memory |
Inspect / edit Copilot's long-term memory |
/skills |
List available skills |
/mcp /mcp show |
Manage / view MCP servers |
/env |
Show loaded instructions, agents, skills, MCP, plugins |
/init |
Scaffold project-level custom instructions |
/add-dir PATH |
Allow Copilot to read files in another directory |
/cwd /cd PATH |
Show or change the working directory |
/review |
Code review |
/diff |
Summarize current changes |
/pr |
Work with the PR for the current branch |
/delegate (or & prefix) |
Hand off a task to the GitHub Copilot cloud agent |
/research |
Deep research with web + GitHub sources |
/share |
Get a link/QR to follow the session on another device |
/session |
Manage saved sessions |
/feedback /bug |
File feedback |
/copy |
Copy the last response to clipboard |
/ask QUESTION |
Quick "off the record" question (experimental) |
/yolo /allow-all |
Grant full permissions for this session |
/terminal-setup |
Enable multiline (Shift+Enter / Ctrl+Enter) in your terminal |
| Symptom | Fix |
|---|---|
| Copilot is running too long / hallucinating | Press Esc Esc β pick an earlier turn |
| Output is huge and noisy | /compact |
| Wrong mental model / drifted off-topic | /clear and restart with tighter prompt |
| Permissions dialog blocking flow | /allow-all on (only for demos!) |
| Forgot the slash command name | Just type / and press Tab |
| Need to edit a long prompt | Ctrl+G (opens $EDITOR) |
| Want to keep typing while it works | Ctrl+Enter to queue the next message |
- Course (web): https://awesome-copilot.github.com/learning-hub/cli-for-beginners/
- Course (repo): https://github.com/github/copilot-cli-for-beginners
- Official docs: https://docs.github.com/copilot/how-tos/copilot-cli
- Full command + hotkey reference: https://docs.github.com/en/copilot/reference/cli-command-reference