GitHub Copilot CLI: Public Preview
β
GitHub Copilot CLI is now in public preview GitHub bought 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 in depth.
π Overviewβ
GitHub Copilot CLI is now in public preview, and itβs designed to bring AI-powered development right to your command line. You can work locally and synchronously with an AI agent that understands your code and GitHub context no IDE switching required.

β¨Key features:
- β Terminal-native dev β Use the Copilot coding agent directly in your terminal.
- β GitHub integration β Work with repositories, issues, and pull requests using llm.
- β Agentic capabilities β Build, edit, debug, and refactor code with AI.
- β
MCP-powered extensibility β Extend with
custom MCP servers. - β Full control β Every action requires your explicit approval.
Plus, extend Copilot CLI's capabilities and context through custom MCP servers. Agent-powered, GitHub-native Execute coding tasks with an agent that knows your repositories, issues, and pull requests β all natively in your terminal.
π¦ Getting Startedβ
Supported Platformsβ
- β Linux
- β macOS
- β Windows (experimental)
Prerequisitesβ
- βοΈNode.js v22+
- βοΈnpm v10+
- βοΈPowerShell v6+ (Windows only)
- βοΈActive GitHub Copilot subscription (Pro, Pro+, Business, or Enterprise)
You can install the latest version of the powershell using this command and check the version as mentioned above it should be more than V6.
winget install Microsoft.PowerShell
pwsh --version
If you have access to GitHub Copilot via your organization of 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.
π½ Installationβ
Install globally with npm: Powered by the same agentic harness as GitHub's Copilot coding agent, it provides intelligent assistance while staying deeply integrated with your GitHub workflow. Enter the prompt in the command line.
npm install -g @github/copilot

Verify installation: the below command will run the banner start image of GitHub Copilot.
copilot --banner
Authenticate with your GitHub account:
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.
/login
Or authenticate using a Personal Access Token (PAT):
You can also authenticate using a fine-graned PAT with the "Copilot Rrequests" 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_TOKEN or GITHUB_TOKEN.ππ»
# Linux/macOS
export GH_TOKEN=your_token_here
# Windows
setx GH_TOKEN your_token_here