The power of GitHub Copilot, now in your terminal.
GitHub Copilot CLI brings AI-powered coding assistance directly to your command line, enabling you to build, debug, and understand code through natural language conversations. Powered by the same agentic harness as GitHub's Copilot coding agent, it provides intelligent assistance while staying deeply integrated with your GitHub workflow.
See our official documentation for more information.
We're bringing the power of GitHub Copilot coding agent directly to your terminal. With GitHub Copilot CLI, you can work locally and synchronously with an AI agent that understands your code and GitHub context.
- Terminal-native development: Work with Copilot coding agent directly in your command line — no context switching required.
- GitHub integration out of the box: Access your repositories, issues, and pull requests using natural language, all authenticated with your existing GitHub account.
- Agentic capabilities: Build, edit, debug, and refactor code with an AI collaborator that can plan and execute complex tasks.
- MCP-powered extensibility: Take advantage of the fact that the coding agent ships with GitHub's MCP server by default and supports custom MCP servers to extend capabilities.
- Full control: Preview every action before execution — nothing happens without your explicit approval.
We're still early in our journey, but with your feedback, we're rapidly iterating to make the GitHub Copilot CLI the best possible companion in your terminal.
- Linux
- macOS
- Windows
- (On Windows) PowerShell v6 or higher
- An active Copilot subscription. See Copilot plans.
If you have access to GitHub Copilot via your organization or enterprise, you cannot use GitHub Copilot CLI if your organization owner or enterprise administrator has disabled it in the organization or enterprise settings. See Managing policies and features for GitHub Copilot in your organization for more information.
Install with the install script (macOS and Linux):
curl -fsSL https://gh.io/copilot-install | bashOr
wget -qO- https://gh.io/copilot-install | bashUse | sudo bash to run as root and install to /usr/local/bin.
Set PREFIX to install to $PREFIX/bin/ directory. Defaults to /usr/local
when run as root or $HOME/.local when run as a non-root user.
Set VERSION to install a specific version. Defaults to the latest version.
For example, to install version v0.0.369 to a custom directory:
curl -fsSL https://gh.io/copilot-install | VERSION="v0.0.369" PREFIX="$HOME/custom" bashInstall with Homebrew (macOS and Linux):
brew install copilot-clibrew install copilot-cli@prereleaseInstall with WinGet (Windows):
winget install GitHub.Copilotwinget install GitHub.Copilot.PrereleaseInstall with npm (macOS, Linux, and Windows):
npm install -g @github/copilotnpm install -g @github/copilot@prereleasecopilotOn first launch, you'll be greeted with our adorable animated banner! If you'd like to see this banner again, launch copilot with the --banner flag.
If you're not currently logged in to GitHub, you'll be prompted to use the /login slash command. Enter this command and follow the on-screen instructions to authenticate.
You can also authenticate using a fine-grained PAT with the "Copilot Requests" permission enabled.
- Visit https://github.com/settings/personal-access-tokens/new
- Under "Permissions," click "add permissions" and select "Copilot Requests"
- Generate your token
- Add the token to your environment via the environment variable
GH_TOKENorGITHUB_TOKEN(in order of precedence)
Launch copilot in a folder that contains code you want to work with.
By default, copilot utilizes Claude Sonnet 4.5. Run the /model slash command to choose from other available models, including Claude Sonnet 4 and GPT-5.
Experimental mode enables access to new features that are still in development. You can activate experimental mode by:
- Launching with the
--experimentalflag:copilot --experimental - Using the
/experimentalslash command from within the CLI
Once activated, the setting is persisted in your config, so the --experimental flag is no longer needed on subsequent launches.
- Autopilot mode: Autopilot is a new mode (press
Shift+Tabto cycle through modes), which encourages the agent to continue working until a task is completed.
Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premium requests is reduced by one. For information about premium requests, see About premium requests.
For more information about how to use the GitHub Copilot CLI, see our official documentation.
GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature provides intelligent code features like go-to-definition, hover information, and diagnostics.
Copilot CLI does not bundle LSP servers. You need to install them separately. For example, to set up TypeScript support:
npm install -g typescript-language-serverFor other languages, install the corresponding LSP server and configure it following the same pattern shown below.
LSP servers are configured through a dedicated LSP configuration file. You can configure LSP servers at the user level or repository level:
User-level configuration (applies to all projects):
Edit ~/.copilot/lsp-config.json
Repository-level configuration (applies to specific project):
Create .github/lsp.json in your repository root
Example configuration:
{
"lspServers": {
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"fileExtensions": {
".ts": "typescript",
".tsx": "typescript"
}
}
}
}Check configured LSP servers using the /lsp command in an interactive session, or view your configuration files directly.
For more information, see the changelog.
We're excited to have you join us early in the Copilot CLI journey.
We're building quickly. Expect frequent updates--please keep your client up to date for the latest features and fixes!
Your insights are invaluable! Open an issue in this repo, join Discussions, and run /feedback from the CLI to submit a conf# Attaching files
You can convey information by attaching a variety of file types to your issues and pull requests.
Note
For public repositories, uploaded files can be accessed without authentication. In the case of private and internal repositories, only people with access to the repository can view the uploaded files.
To attach a file to an issue or pull request conversation, drag and drop it into the comment box. Alternatively, you can click below the issue comment box to browse, select, and add a file from your computer.
For a pull request, you can also click in the formatting bar above the pull request comment box.
When you attach a file, it is uploaded immediately to GitHub and the text field is updated to show the anonymized URL for the file. For more information on anonymized URLs see About anonymized URLs.
Note
In many browsers, you can copy-and-paste images directly into the box.
The maximum file size is:
- 10MB for images and gifs
- 10MB for videos uploaded to a repository owned by a user or organization on a free GitHub plan
- 100MB for videos uploaded to a repository owned by a user or organization on a paid GitHub plan
- 25MB for all other files
Note
To upload videos greater than 10MB to a repository owned by a user or organization on a paid GitHub plan, you must either be an organization member or outside collaborator, or be on a paid plan.
The following image and media file types are supported in all contexts.
-
PNG (
.png) -
GIF (
.gif) -
JPEG (
.jpg,.jpeg) -
SVG (
.svg) -
Video (
.mp4,.mov,.webm)[!NOTE] Video codec compatibility is browser specific, and it's possible that a video you upload to one browser is not viewable on another browser. At the moment we recommend using H.264 for greatest compatibility.
The following file types are supported for uploads in issue comments, pull request comments, and discussion comments within repositories. This list of file types is also supported in organization discussions.
- PDFs (
.pdf) - Microsoft Office documents (
.docx,.pptx,.xlsx,.xls,.xlsm) - OpenDocument formats (
.odt,.fodt,.ods,.fods,.odp,.fodp,.odg,.fodg,.odf) - Rich text and word processing files (
.rtf,.doc)
- Plain text and markup (
.txt,.md,.copilotmd) - Data and tabular files (
.csv,.tsv,.log,.json,.jsonc)
- C files (
.c) - C# files (
.cs) - C++ files (
.cpp) - CSS files (
.css) - Diagrams (
.drawio) - Dump files (
.dmp) - HTML files (
.html,.htm) - Java files (
.java) - JavaScript files (
.js) - Jupyter notebooks (
.ipynb) - Patch files (
.patch) - PHP files (
.php) - Profiling files (
.cpuprofile) - Program database files (
.pdb) - Python files (
.py) - Shell scripts (
.sh) - SQL files (
.sql) - TypeScript files (
.ts,.tsx) - XML files (
.xml) - YAML files (
.yaml,.yml)
Note
If you use Linux and try to upload a .patch file, you will receive an error message. This is a known issue.
- Archives and packages (
.zip,.gz,.tgz)
- Text and email files (
.debug,.msg,.eml)
- Bitmap and TIFF images (
.bmp,.tif,.tiff)
- Audio files (
.mp3,.wav)idential feedback survey!


