Session M2-01: GitHub Copilot in the CLI¶
Module: Copilot in Practice Difficulty: Intermediate Prerequisites: Sessions M1-01 to M1-03 Duration: 3 hours (1 hr trainer content + 2 hr lab)
Overview¶
Use the standalone copilot CLI to take over one small Node.js project. Inspect
commands, revise an implementation plan, then fix the project. You will also
inspect live fleet results and automate a project health report before comparing
terminal and IDE workflows. Work in agent-tasks from the first command through
the final handoff.
Learning outcomes¶
- Install and configure the standalone
copilotCLI and shell workflows. - Use interactive
copilotandcopilot -p "..."for command-line help. - Use Standard, Plan, and Autopilot modes for multi-step tasks.
- Revise a
/planbefore approval and trace it to the implementation diff. - Check a
/rubber-duckcritique and inspect its persistent proactive-invocation setting. - Inspect permissions, sandbox policy, and the installed version's soft-limit scope.
- Queue a follow-up, background a command, and inspect its actual result.
- Recover a disposable edit and distinguish fork, worktree, move, and resume.
- Use
/fleetand/tasksfor independent analysis, then check results and usage. - Distinguish JSONL events from an answer payload in programmatic output.
- Compare CLI, IDE Chat, IDE Agent Mode, and Copilot App workflows.
- Identify CLI-specific features and when the CLI fits better than the IDE.
- Check Copilot App and cross-IDE support in the training environment.
- Save test output, the health report, and your CLI-versus-IDE comparison at review checkpoints.
Session materials¶
| Resource | Location |
|---|---|
| Lab exercises | lab/ |
| Lab starter files | lab/starter/ |
| Lab solution files | lab/solution/ |
Key topics¶
- Standalone
copilotbinary: installation, authentication, configuration - Interactive
copilotprompts for natural-language command explanations copilot -p "..."for command generation from intent descriptions- Shell integrations: aliases, shell completion, inline invocation
- CLI agent mode: autonomous multi-step terminal tasks
- Terminal automation and shared CLI/app commands
- Copilot App orientation and handoff to Session M3-01 for plugins and canvas extensions
- Cross-IDE comparison: VS Code, Visual Studio, JetBrains, Eclipse, Xcode, and others
- When to use CLI, IDE Chat, IDE Agent Mode, or Copilot App
- SSH and remote workflows where CLI is the only option
- Scripting with Copilot: generating and debugging shell scripts
- Security considerations: what context the CLI sends, privacy implications
- Recovery and session controls without broadening permissions