GitHub Copilot CLI brings GitHub's Copilot agent to the terminal. GitHub's documentation describes it as an agent that can answer questions, write and debug code, run commands and interact with GitHub.com, for example by making changes to a project and creating a pull request. It is available with every Copilot plan; for Copilot provided by an organization, an administrator must enable the Copilot CLI policy.
Running copilot starts an interactive session with a default ask/execute mode and a plan mode, toggled with Shift+Tab, in which Copilot asks clarifying questions and builds an implementation plan before writing code. The -p option runs a single prompt and exits, and options such as --allow-tool pre-approve specific tools. Inside a session, /sandbox enable restricts filesystem, network and system access, and copilot --cloud starts a session in a cloud sandbox, which GitHub labels as public preview.
Copilot CLI can be customized with custom instructions, MCP servers, custom agents, hooks, skills and Copilot Memory, and it can act as an agent for other tools through the Agent Client Protocol (ACP). The /model command or --model option selects a model from Copilot's list, which includes models from OpenAI, Anthropic, Google, xAI and other providers; availability depends on plan and client. You can also connect your own OpenAI-compatible, Azure OpenAI or Anthropic endpoint, including local models served by Ollama or vLLM, as long as the model supports tool calling and streaming.
Each interaction spends GitHub AI Credits based on the tokens processed, at a rate that depends on the model, and choosing an extended 1 million token context or higher reasoning uses more credits. Copilot CLI installs through npm (Node.js 22 or later), Homebrew, WinGet or an install script, and runs on Linux, macOS and Windows via PowerShell or WSL.


