GitHub Copilot CLI
Read the two badges separately: the first is whether this page is backed by evidence, the second is whether the product is still maintained. An archived product can have complete evidence; complete evidence does not mean the product is active.
30-second check: should it make your shortlist?
The Copilot agent in your terminal, carried by your GitHub subscription: one terminal…
Local / self-hosted · CLI
Not checked
Read the original licence before commercial useDirect in mainland · Not in filing list
These four cards help you rule things out, not decide for you. The real differences are in the eight questions and sources below.
Information not confirmed
- The exact mapping between the CLI and each Copilot plan (does Free include the CLI) — official pages differ (both about-copilot-cli and cli-quickstart were checked; the two pages are inconsistent)
- Concurrency, duration and storage limits of the cloud sandbox (
copilot --cloud) (public preview) - Fine-grained differences in premium-request deduction between interactive and programmatic modes
- The full capability surface of ACP integration (the official concepts page lists the section but does not elaborate)
GitHub Copilot CLI is the Copilot coding agent that runs in your terminal, carried by the same GitHub subscription as the IDE form factor. The official README says it is "Powered by the same agentic harness as GitHub's Copilot coding agent." Three things differ from the IDE form. It has a programmatic entry point (copilot -p / --prompt) that can go into scripts and CI. Approval is terminal-level: three choices on first use of a writing or executing tool, plus --allow-all-tools / --allow-tool / --deny-tool for unattended runs, and some official docs say denial wins. Billing is per prompt too: "Each time you submit a prompt to Copilot CLI, your monthly quota of Copilot premium requests is reduced by one."
When to use it, when not to
People already in the GitHub ecosystem who want to walk the whole chain from reading a repo to opening a pull request in the terminal. The official use case gives tasks such as "create a pull request on GitHub.com".
People who need scripted or headless use: copilot -p with approval flags is CI-friendly. Anyone who wants the MCP / plugin / custom-agent surface.
Not a fit for people who don't want a Copilot subscription, because the CLI ships with the subscription and cannot be bought on its own. Nor for anyone who wants "fully autonomous and zero risk": auto-approval has to be paired with an isolated environment, and the official docs warn about that plainly.
China availability domestic / direct access / CAC filing · snapshot 2026-10-20
- Origin
- foreign-made foreign entity (no matching filing entity in the CAC registry).
- Direct access
- direct OK docs.github.com measured 200 direct.
- CAC filing
- not in filing list:not in the CAC public registry (13 batch attachments searched 2026-10-20, https://www.cac.gov.cn/2024-04/02/c_1713729983803145.htm); the product does not serve the mainland public, so filing does not apply.
Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
8 questions, one table
8 questions, each comparable item by item with its peers.
- Model & openness
Multi-vendor models, switchable inside the CLI.
Official README wording:
Official wording: "By default,
copilotutilizes Claude Sonnet 4.5. Run the/modelslash command to choose from other available models, including Claude Sonnet 4 and GPT-5"The official changelog's GA wording was:
Official wording: "Choose from the latest models from Anthropic, OpenAI, and Google"
Note the two official pages describe the default model differently:
- the README says Claude Sonnet 4.5
- the about page says "The default model used by GitHub Copilot CLI is Claude Sonnet 4. GitHub reserves the right to change this model"
The exact list of available models varies by plan; the full list is on the Copilot models page (same account system as the IDE entry).
Third-party agent delegation follows Copilot platform capabilities (Preview).
- Where it runs
A local terminal process, lifecycle bound to the terminal session.
Officially supported systems:
- Linux
- macOS
- Windows: via Powershell or Windows Subsystem for Linux (WSL)
Official wording on support:
Official wording: "Linux / macOS / Windows from within Powershell and Windows Subsystem for Linux (WSL)"
The about page adds:
Official wording: "Native Windows support in Powershell is available, but experimental"
There is also a cloud execution surface.
copilot --cloudstarts a session in an isolated cloud-hosted environment (official docs say cloud sandboxes are "in public preview", their policies "inherit from Copilot cloud agent policies", sessions can continue across machines and run tasks in parallel).These are two execution surfaces — the local terminal session and the cloud one; do not conflate them.
- Local files
Bounded by "trusted directories". When starting a session, the official docs require you to "confirm that you trust the files in, and below, the directory from which you launched the CLI".
This trusted directory controls "where Copilot CLI can read, modify, and execute files".
Key caveat: the official docs state plainly
Official wording: "Scoping of permissions is heuristic and GitHub does not guarantee that all files outside trusted directories will be protected"
Do not treat trusted directories as a hard sandbox.
For a harder boundary, enable the local sandbox: Official wording: "run
/sandbox enableinside a session", which restricts filesystem, network and system capabilities. Or usecopilot --cloudto put the whole session in a cloud-isolated environment.- Tasks after shutdown
There is explicit background delegation and cloud sessions. Official changelog wording:
Official wording: "Prefix any prompt with
&to delegate work to the Copilot coding agent in the cloud, freeing your terminal for other tasks. Use/resumeto switch between local and remote coding agent sessions seamlessly"That is, in the terminal you hand the task to the cloud coding agent and keep using the terminal for other things.
Cloud sandboxes (public preview) additionally support:
Official wording: "keep a session's state between uses, continue a session from a different machine, or run multiple tasks in parallel"
The local session itself still ends with the terminal. It is a client-resident type; the real background comes from the cloud channel above.
- Tools & extensions
MCP is a default capability. Official README wording:
Official wording: "the coding agent ships with GitHub's MCP server by default and supports custom MCP servers"
How to add:
/mcp addfor interactive adding;/mcp searchbrowses the GitHub MCP Registry for direct install (2026-06-23 changelog).Other extension surfaces listed in official docs:
- Custom instructions
- Custom agents — including built-in Explore / Task / Code Review / Plan specialist agents, runnable in parallel
- Hooks
- Skills
- Plugins
There is also LSP: you install language servers yourself, configured via
~/.copilot/lsp-config.jsonor.github/lsp.json.ACP integration is supported (the official concepts page has a "Use Copilot CLI via ACP" section; the changelog mentions ACP closeSession).
On macOS / Windows, local sessions can additionally enable computer use to operate desktop apps.
- Context & memory
The trio: auto-compaction + session management + repository memory.
Auto-compaction: official docs say when a session nears the 95% token limit, "Copilot automatically compresses your history in the background", enabling "virtually infinite sessions".
Manual operations:
/compactcompacts manually;/contextshows token usage.Rollback uses
/rewind. The changelog says itOfficial wording: "no longer requires git and restores only the files Copilot changed, skipping any file whose contents no longer match what Copilot last wrote"
and optionally Official wording: "conversation-only or conversation + files".
Cross-session memory follows Copilot Memory (the same feature as the IDE entry in this section, storing repo-level conventions and preferences).
- Permissions & limits
Approval is the axis most worth remembering in this entry, with finer granularity than the IDE form.
On first use of write / executable tools, the official docs give three options:
- 1. Yes
- 2. Yes, and approve TOOL for the rest of the running session
- 3. No, and tell Copilot what to do differently (Esc)
Official wording:
Official wording (the three approval-prompt options): "1. Yes" / "2. Yes, and approve TOOL for the rest of the running session" / "3. No, and tell Copilot what to do differently (Esc)"
Option 2 means all commands of that tool class are allowed for this session. Official example: after approving
rm ./this-file.txt, anyrmcan run in the session.Programmatic / unattended mode has three switches:
--allow-all-tools— never ask for any tool--allow-tool— allow specified tools--deny-tool— forbid specified tools, highest priority
Values support "
shell(COMMAND),write,MCP_SERVER_NAME", and--deny-tooltakes precedence over--allow-tool/--allow-all-tools.The official warning about auto-approval is worth remembering verbatim:
Official wording: "Copilot has the same access as you do to files on your computer, and can run any shell commands that you can run, without getting your prior approval"
The official docs also recommend using auto-approval inside VMs / containers / offline environments to limit blast radius.
For content exclusion, the CLI for Business / Enterprise users:
Official wording: "respects content exclusion policies configured at the enterprise, organization, and repository levels"
Enterprise and organization policies can disable the CLI entirely.
- Best for
Fits three kinds of people:
- those already in the GitHub ecosystem who want to finish "read the repo / edit code / run tests / open PRs / manage issues" from the terminal — the official use cases literally include tasks like "create a pull request on GitHub.com"
- those who need scripting / headless (
copilot -pwith approval options can run in CI) - those who need the MCP / plugins / custom-agent ecosystem
Not a fit for two kinds of people:
- those unwilling to pay for a Copilot subscription — the CLI comes with the subscription and cannot be bought separately
- those wanting "fully automatic yet zero risk" — auto-approval must be paired with an isolated environment; the official docs flag the risk explicitly
Top misconception
- Thinking Copilot CLI is a separate purchase — it comes with a Copilot subscription and has no standalone price
- Thinking the CLI costs no quota — each prompt deducts one premium request, and premium models multiply it
- Taking the about page's plan list (Pro/Pro+/Business/Enterprise) as the only wording — the quickstart page says all plans
Evidence sources
Checked 2026-10-23,Content updated 2026-10-08。This is the date of the entry, not a claim that every field was rechecked that day.
| Type | Name | Link |
|---|---|---|
| docs | GitHub · About GitHub Copilot CLI (modes, approval options, trusted directories, models and premium requests) | https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli |
| docs | GitHub · Copilot CLI concepts page (sandbox, context management, customization, content exclusion, ACP) | https://docs.github.com/en/copilot/concepts/copilot-surfaces/copilot-cli |
| docs | GitHub · GitHub Copilot CLI quickstart (npm / WinGet / Homebrew install, -p non-interactive) | https://docs.github.com/en/copilot/get-started/cli-quickstart |
| docs | GitHub · Install GitHub Copilot CLI (per-platform commands and prerequisites) | https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli |
| docs | GitHub · Requests in GitHub Copilot (premium requests and model multipliers) | https://docs.github.com/en/copilot/concepts/billing/copilot-requests |
| changelog | GitHub · Copilot CLI offline changelog (1.0.93 @ 2026-10-07) | https://github.com/github/copilot-cli/blob/main/changelog.md |
| repo | GitHub · copilot-cli official repository (README: default model, MCP, LSP, PAT auth) | https://github.com/github/copilot-cli |
| changelog | GitHub · GitHub Copilot CLI generally available (2026-02-25 GA, plan / autopilot / background delegation) | https://github.blog/changelog/2026-02-25-github-copilot-cli-is-now-generally-available/ |
| changelog | GitHub · Changelog (Copilot label page) | https://github.blog/changelog/label/copilot/ |
Test notes
This site has not completed measured runs. The test protocol is at protocols/coding/_protocol.md.
Suggested measurement: focus on three things.
- the real blast radius of "approve for the rest of the session" in the three-option prompt (the official example shows it expands to the whole command class)
- exit codes and output of
copilot -punder CI (no TTY) - whether the
&prefix delegation really hands the task to the cloud and pulls it back via/resume
Differences from the IDE form (differences only)
| Dimension | IDE form (see ./copilot.md) | CLI form (this entry) |
|---|---|---|
| Entry | editor / website | terminal copilot |
| Non-interactive | generally none | copilot -p / --prompt, usable in scripts and CI |
| Approval | editor modes | terminal three-option prompt + --allow/--deny-tool switches |
| Cloud execution surface | website / coding agent | copilot --cloud cloud sandbox (public preview) |
| Background delegation | dispatch via issue / comment trigger | prefix & hands the task to the cloud coding agent |
Shared parts are not repeated: model lists, Copilot Memory, org policies all follow the IDE entry; plan pricing always goes to the official plans page.
Programmatic use and installation
Installation is primarily via the npm package. The official prerequisite is Node.js 22 or later:
npm install -g @github/copilot
There are also WinGet (winget install GitHub.Copilot), Homebrew (brew install --cask copilot-cli) and an install script.
Besides /login, authentication supports a fine-grained PAT with the "Copilot Requests" permission, placed in GH_TOKEN or GITHUB_TOKEN.
Official example: copilot -p "Show me this week's commits and summarize them" --allow-tool='shell(git)'
Add -s to output only the answer, omitting usage info.
Permissions and approvals (the axis most worth remembering)
The three-option approval prompt (official wording):
1. Yes
2. Yes, and approve TOOL for the rest of the running session
3. No, and tell Copilot what to do differently (Esc)
Option 2 means more than it reads. Official example: after approving rm ./this-file.txt, any rm (e.g. rm -rf ./*) can run in the session. This is "allow by tool class", not per-command approval.
Unattended mode uses three switches, and deny wins:
| Switch | Effect |
|---|---|
--allow-all-tools | never ask for any tool |
--allow-tool | allow specified tools |
--deny-tool | forbid specified tools, highest priority |
Values support shell(COMMAND) (down to the shell(git push) level), write, MCP_SERVER_NAME.
Official warning: with --allow-all-tools, it has the same local access as you.
Local files and commands all count, with no per-item confirmation.
The official docs recommend using it in VMs / containers / offline environments to limit blast radius.
Trusted directories are not a hard sandbox. The official docs state plainly that the boundary
"is heuristic and GitHub does not guarantee that all files outside trusted directories will be protected"
Quota: one premium request per prompt
Each prompt costs one premium request. Official wording:
Each time you submit a prompt to Copilot CLI, your monthly quota of Copilot premium requests is reduced by one.
Non-default models multiply by the model rate (e.g. Claude Opus 4.5 is 3x).
The Free tier officially allows up to 50 premium requests per month. Paid tiers' built-in models (GPT-5 mini / GPT-4.1 / GPT-4o) do not consume quota.
The official docs also announced that starting 2026-06-01, Copilot moves from request-based billing to usage-based billing.
Plan pricing is on the official plans page (per this site's price-recording policy, no prices are stored here).
Verification notes
Basis for confidence: verified: execution modes and approval options were obtained. MCP / extension surfaces were also obtained.
Context management and billing units were also obtained.
Sources are official docs and the official repository.
The remaining gap is mainly "the exact mapping between the CLI and each Copilot plan". The official about page lists Pro/Pro+/Business/Enterprise, while the quickstart page says all Copilot plans — the two pages are inconsistent. This is recorded as "not stated by the official docs", listing the pages checked, without picking one on the vendor's behalf.
Related entries
- GitHub Copilotthe IDE form of the same product; model lists and the cloud coding agent are covered there
- Claude Code CLIalso a terminal coding agent; permission-approval granularity can be compared item by item
- Codex CLIalso a terminal coding agent, but the non-interactive and sandbox models differ (Codex defaults to a workspace sandbox; this CLI defaults to per-tool approval)
- GitHub MCP ServerOther layer · MCP tools
Same-category peers
Look at these three before reading further
Selected by overlap in jobs, not ranked. Compare where it runs, licence and status first; if one of the three fails, skip it.
| Object | Where | Licence | Evidence / status | What it is for |
|---|---|---|---|---|
| Amp | Cloud / API | Not checked | 8 questions checked Active | Sourcegraph's Amp: a frontier coding agent spanning CLI + cloud orbs + r |
| Claude Code CLI | Local / self-hosted | Not checked | 8 questions checked Active | A terminal coding and tool-execution product, with a CHANGELOG and Atom |
| Codex CLI | Local / self-hosted | Not checked | 8 questions checked Active | OpenAI's official terminal coding agent, written in Rust, architecturall |
Same vendor
More from GitHub
One vendor’s products are often split across categories. This list puts them together so you do not have to assemble them across five sites.
This page is generated from the ai-handbook data layer (CC BY 4.0).
For the judging criteria and method notes, see METHODOLOGY.md.