2.2.1. What the CLI Is and When to Reach for It
💡 First Principle: Reach for the CLI when the work is command- or file-shaped and you want to stay in the terminal — scaffolding a project, fixing a build, wiring a script — rather than context-switching into the editor or browser.
The Copilot CLI is a terminal-native coding agent available to all paid Copilot subscribers (and, per current docs, supported on the Free plan as well). It benefits developers who live in the shell: it can take a plain-English goal, plan the steps, run commands, edit files, and create a pull request — then let you continue the same session on GitHub.com or mobile.
When to choose it over IDE Chat: the CLI shines for DevOps-flavored tasks (environment setup, scripting, repository chores) and for developers whose workflow is terminal-first. The IDE is still better when you're deep in source files and want rich in-editor context and diffs.
💡 Key Point: The CLI's headline benefit is removing context switches. A developer can go from "I need a deploy script" to a working, reviewed script without opening a separate app.
⚠️ Exam Trap: The CLI is a paid-plan capability for full agentic use; don't confuse it with simply piping output to a model. Its value is the agentic session — plan, execute, remember — not a single command translation.
Reflection Question: Why might a DevOps engineer prefer the Copilot CLI over IDE Chat for setting up a new project's tooling, and what does the CLI offer that a one-off command suggestion does not?