GitHub Copilot CLI
The GitHub Copilot terminal agent with access to repositories, issues and pull requests, plus MCP support
Install
npm install -g @github/copilotmacOS, Linux and Windows.
This is third-party code. Review the repository files before installing.
What it does
Copilot CLI starts with the copilot command in a code folder and acts as an agent: it plans a task, edits files, builds and debugs the project. It shares its harness with GitHub's cloud coding agent and sees repositories, issues and PRs through your GitHub account. The GitHub MCP server is built in, and you can add your own MCP servers and LSP servers for code navigation. Every action is previewed and needs approval.
Who it is for. For developers with a Copilot subscription who want an agent in the terminal.
Good fit when
- You already pay for Copilot and want to work in the terminal
- The task involves GitHub issues and PRs
- You want to plug your own MCP servers into the GitHub agent
Not a fit when
- You have no Copilot subscription or your organization disabled the CLI
- You need to work with a local model without the cloud
Example request
Find open issues labeled bug in this repository and fix the first oneLimitations
An active Copilot subscription is required, and each prompt uses premium request quota. Organization admins can disable the CLI. Copilot services are not guaranteed to work from Russia without a VPN, and paying for a subscription from Russia is difficult. LSP servers are installed separately.
How to disable. Remove it with npm uninstall -g @github/copilot or brew uninstall copilot-cli; settings live in ~/.copilot.
Security check
- Runs commands and modifies files
- Acts on repositories and issues on behalf of your GitHub account
README in short
The README covers requirements, installation via script, Homebrew, WinGet and npm, and sign-in via /login or a token. It explains model selection, experimental mode with autopilot, and premium request usage. A separate section shows LSP server configuration at user and repository level.
FAQ
Can I sign in without a browser?
Yes, with a fine-grained PAT that has the Copilot Requests permission, set in GH_TOKEN or GITHUB_TOKEN.
How do I change the model?
With the /model command inside a session.
Related
Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins
A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself
Anthropic's coding agent for the terminal, IDE and GitHub: understands your codebase, runs tasks and handles git
OpenAI's coding agent that runs locally in your terminal, with IDE and desktop versions