Use GitHub Copilot CLI
Unlock the complete study guide.
Bundled into the existing GitHub Copilot premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- A coding agent that works from your terminal
- Access: plan, policy and installation
- First launch: from copilot to your first prompt
- Scoping what Copilot CLI can reach
- Permission layers: what the agent may do
- Sandboxing: limiting what an approved action can reach
- Interactive modes: default, plan and autopilot
- Steering Copilot while it works
- Slash commands control the CLI, not your shell
- Context over time: sessions, compaction and memory
- Reviewing and undoing CLI changes
- Delegating work to other agents
- The programmatic interface: one prompt, then exit
- Generating scripts and managing files
- Practice scenarios for Copilot CLI
Ways to run a Copilot CLI task: where the work runs and who approves each step
| Question | Default mode | Plan mode | Autopilot mode | Programmatic interface (-p) | /delegate |
|---|---|---|---|---|---|
| Where the work runs | Your machine, in an interactive session started locally | Your machine, in an interactive session started locally | Your machine, in an interactive session started locally | Your machine, one prompt then exit | GitHub, in Copilot cloud agent |
| Who approves file changes and commands | You, for actions not already approved | Direct project-file edits wait for plan approval; some shell commands and MCP tool calls can still run during planning (see Plan mode) | Nobody per step, after you grant full permissions | Read-only operations and previously approved tools run without a new prompt; to modify or execute files, pass an approval option such as --allow-tool, because no one is present to answer a prompt | You review the draft pull request |
| What you get | A conversation you steer turn by turn | An implementation plan to review first | A task completed end to end | A single result a script can consume | A branch and draft pull request |
| Choose it when | You want to answer the approval prompt for actions not already approved | The approach must be agreed before coding | The task is trusted and the environment is isolated | Automation needs one answer without a person | Work should continue with your machine off |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
Also tested in
References
- https://docs.github.com/en/copilot/concepts/agents/copilot-cli/about-copilot-cli
- https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/gh-300
- https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/overview
- https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started
- https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli
- https://github.com/github/copilot-cli/releases
- https://github.blog/changelog/2025-09-25-upcoming-deprecation-of-gh-copilot-cli-extension/
- https://github.blog/changelog/2026-01-21-install-and-use-github-copilot-cli-directly-from-the-github-cli/
- https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools
- https://github.blog/changelog/2026-09-02-content-exclusions-generally-available-in-copilot-app-and-cli/
- https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-programmatic-reference
- https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference
- https://docs.github.com/en/copilot/concepts/about-cloud-and-local-sandboxes
- https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/delegate-tasks-to-cca
- https://docs.github.com/en/copilot/how-tos/chat-with-copilot/chat-in-ide
- https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-best-practices
- https://docs.github.com/en/copilot/concepts/agents/copilot-cli/autopilot
- https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/work-with-multiple-sessions
- https://docs.github.com/en/copilot/concepts/agents/copilot-cli/chronicle
- https://github.blog/changelog/2026-02-25-github-copilot-cli-is-now-generally-available/
- https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/chronicle
- https://docs.github.com/en/copilot/concepts/agents/copilot-memory
- https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/agentic-code-review
- https://docs.github.com/en/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically
- https://docs.github.com/en/get-started/using-git/about-git