In short.
GitHub’s Copilot CLI guide helps developers understand an AI terminal assistant, but broad permissions can allow unintended file changes and command execution. It explains interactive and programmatic use, planning, GitHub operations, sandboxing, customization and model providers. Directory permission boundaries are described as heuristic, and two organization-level MCP policies are unsupported. Exact costs, complete setup requirements and actual task performance are unknown from this page. Nothing was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected documentation page at [https://docs.github.com/api/article/body?pathname=/en/copilot/concepts/copilot-surfaces/copilot-cli], including its usage examples, customization options, security notices, policy limitations and model-provider requirements. Linked pages and image contents are excluded. Installation, pricing details, legal terms, sandbox guarantees and actual CLI behavior were not independently established. Nothing was executed.
The overview
Identity
This is GitHub’s documentation page for Copilot CLI, an AI assistant accessed through a terminal. The guide explains its interfaces, representative tasks, extension points, security controls and model configuration.
Its examples span local coding and Git operations through GitHub issues, pull requests and Actions workflows. Installation and several detailed configuration topics are covered through links to separate pages.
Assessment
The guide is useful for deciding whether terminal-based AI assistance fits an existing development workflow. Its strongest practical detail is the explanation of permissions: allowing a tool for a session can authorize much more than the particular command first presented.
It provides enough information to compare interaction modes and identify adoption questions. It supplies no measured evidence of coding accuracy, task completion rates, speed or reliability.
Users
Developers who already work in terminals and GitHub repositories are the clearest audience. Beginners can use the task examples to understand the assistant’s scope, but will need separate installation guidance and enough command-line knowledge to judge requested actions.
Experienced developers and automation engineers get details on programmatic invocation, tool restrictions, MCP integrations, custom providers and ACP, a protocol for connecting agents to compatible clients. Enterprise administrators should examine the stated MCP policy limitations.
Capabilities
The page describes answering questions, writing and debugging code, explaining file history, editing documentation, performing Git operations and creating application prototypes. GitHub examples include finding issues, opening and managing pull requests, reviewing changes and creating Actions workflows.
Interactive sessions support a planning mode and follow-up messages while work is underway. Extensions include MCP servers for external tools and data, specialized agents, hooks, skills, custom instructions and persistent memories. Computer use is described for local macOS and Windows sessions; ACP supports compatible third-party clients.
Using it
Requirements
Supported environments are Linux, macOS and Windows through PowerShell or Windows Subsystem for Linux. Minimum operating-system versions, installation dependencies, account eligibility and authentication steps are not specified here.
Models used with Copilot CLI must support tool calling (function calling) and streaming; otherwise the CLI returns an error. The page recommends at least a 128,000-token context window. When using your own model provider instead of GitHub-hosted models, configuration uses COPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_TYPE and COPILOT_MODEL (required for a custom provider), plus COPILOT_PROVIDER_API_KEY when authentication is required. Supported provider types are openai, azure and anthropic.
Mechanism
Users give natural-language requests, and the assistant can use tools to inspect or change files, execute commands and interact with services. Interactive sessions support continued steering; programmatic mode accepts a single prompt and exits after completing its task.
Permissions determine which tool requests require approval. Deny rules take precedence over allow rules, including blanket tool approval. The page describes automatic conversation compaction near 95% of the context limit, manual compaction with /compact and usage inspection with /context. These features do not establish perfect retention of earlier details.
Setup
The page directs readers to separate installation instructions. After installation, entering copilot starts an interactive session. Launch it from a project directory whose contents you trust, then review the directory trust request. Shift+Tab cycles between the default ask/execute mode and planning mode.
Local sandboxing is enabled inside a session with /sandbox enable. The command copilot --cloud starts a GitHub-hosted cloud sandbox session. Model selection uses /model or --model. Detailed installation, sandbox configuration and account setup remain outside this page.
Example
A documented programmatic example is: copilot -p "Show me this week's commits and summarize them" --allow-tool='shell(git)'. It illustrates passing one request directly to the CLI and allowing Git commands without individual approval.
The permission applies to the git command, not just history inspection. The page also supports restrictions on first-level Git subcommands, such as --deny-tool='shell(git push)'. These are documented usage examples; their outputs and behavior were not observed.
Assessment & evidence
Limitations
GitHub explicitly describes directory permission scoping as heuristic and does not guarantee protection for every file outside trusted directories. Blanket tool approval permits commands with the user’s available access. Session-wide approval of a tool can authorize destructive uses beyond the original request.
The page states that the organization-level policies named MCP servers in Copilot and MCP Registry URL are unsupported. It separately says Business and Enterprise content exclusions are respected. Local and cloud sandboxes are documented mitigations, but their detailed guarantees and effectiveness were not assessed.
No exact CLI release, supported model list, benchmark results or evidence of successful end-to-end task execution is supplied.
Reasoning
The documented combination of conversation, planning, command execution and GitHub operations suggests a useful fit for developers who want to delegate related tasks without leaving the terminal. That fit is an inference from the described capabilities, not evidence of productivity gains.
The permissions model makes supervision a central adoption decision. A narrow request does not itself impose narrow tool access, so users need to assess the permission granted as well as the task requested.
Alternatives
Within Copilot CLI, interactive mode suits work that needs feedback, while programmatic mode suits single requests and automation. Planning mode provides an opportunity to clarify scope before code changes. Local and cloud sandboxes offer different execution environments.
GitHub-hosted models and custom providers offer another choice. The page names OpenAI-compatible endpoints, Azure OpenAI, Anthropic and local systems such as Ollama, subject to model requirements. It provides no comparative evaluation of competing terminal assistants, provider quality or value.
Evidence
The source is GitHub’s complete Copilot CLI documentation body at [https://docs.github.com/api/article/body?pathname=/en/copilot/concepts/copilot-surfaces/copilot-cli]. Its descriptions and examples establish documented capabilities and cautions, rather than observed performance.
No commands, installations, model requests, file changes or GitHub operations were executed. Linked installation, pricing, security and reference pages were not assessed.
Access & freshness
Costs
The page says each interaction in the interactive interface and each programmatic use consumes AI credits based on the number of tokens processed, with the amount varying by model. Larger context windows and higher reasoning settings increase consumption.
Exact prices, included credits, subscription requirements, cloud-session charges and representative task costs are unknown. Custom providers are supported, but their billing arrangements and any remaining GitHub charges are not explained. The page does not state whether AI credits are still consumed when a custom model provider is configured. Local-provider support does not establish that an entire workflow is free.
Rights
The page does not establish software or documentation licences, permission to redistribute captured documentation, or ownership and reuse terms for generated code.
Provider data-retention terms and broader contractual protections are also unspecified. The description of content exclusion for Business and Enterprise users does not answer those rights and data-handling questions.
Freshness
The documentation was captured on 2026-11-15 at 03:17:11.683 UTC. The captured source revision is sha256:65481c9df7588618b83a8a76f7ee1d0687d747bef9c6815c6031839547c7f5d0.
The supplied page gives no publication date, last-update date or CLI version. Features described as belonging to the latest models cannot be tied to named models here. Availability and behavior beyond this snapshot are unknown.
Actions
Before adopting the CLI, consult the linked installation and pricing references to establish prerequisites, account access and expected charges. Confirm that the intended model supports the required capabilities.
For initial use, choose a trusted project directory, review tool requests individually and consider a sandbox. Use planning mode for complex changes and inspect resulting code and commands. Organizations relying on MCP restrictions should resolve the two documented policy gaps before deployment. Custom-provider users should verify data handling and billing separately.
