If you have been using the gh copilot extension for shell suggestions and command explanations, it is time to migrate to the new standalone GitHub Copilot CLI. The extension is deprecated and no longer receives updates, while the new CLI offers significantly more powerful features including an interactive agentic experience.
Why GitHub Made This Change
The original gh copilot extension was designed as a simple command-line helper that could suggest shell commands and explain what commands do. It worked well for its intended purpose but had limitations:
- Single-shot interactions: Each command was independent with no conversation context
- Limited to shell suggestions: Could not help with code generation or multi-step tasks
- No agentic capabilities: Could not execute commands, read files, or work across multiple files
The new GitHub Copilot CLI is a complete reimagining of what an AI coding assistant can do in the terminal. It competes directly with Claude Code and provides a full interactive experience with specialized agents, file system access, and the ability to maintain context across long conversations.
Key Differences
| Feature | Old gh copilot Extension | New Copilot CLI |
|---|---|---|
| Installation | gh extension install github/gh-copilot | brew install copilot-cli or winget install GitHub.Copilot |
| Launch command | gh copilot suggest / gh copilot explain | copilot (interactive session) |
| Interaction style | Single command, single response | Full conversation with context |
| Code editing | Not supported | Can read, analyze, and edit files |
| Shell commands | Suggests commands only | Can execute commands via Task agent |
| Model selection | Fixed | /model to switch between Claude Sonnet 4.5, GPT-5, etc. |
| MCP support | Not supported | Full MCP server integration |
| GitHub integration | Basic | Native PR, issue, and repo workflows |
Migration Steps
Step 1: Install the New Copilot CLI
macOS (Homebrew):
brew install copilot-cli
Windows (WinGet):
winget install GitHub.Copilot
npm (cross-platform):
npm install -g @github/copilot
For detailed installation instructions including WSL setup, see our Copilot CLI installation guide.
Step 2: Authenticate
Launch the new CLI and authenticate:
copilot
Use /login when prompted and complete the browser-based authentication. Your existing GitHub account with Copilot subscription will work automatically.
Step 3: Verify the Installation
Test that everything is working:
copilot --version
copilot "what directory am I in?"
Step 4: Transfer Your Workflows
Here is how to translate common gh copilot commands to the new CLI:
Old: Getting shell command suggestions
gh copilot suggest "find large files over 100MB"
New: Same task in interactive mode
copilot
> find large files over 100MB in this directory
Old: Explaining a command
gh copilot explain "tar -czvf archive.tar.gz folder/"
New: Explain in context
copilot "explain what tar -czvf archive.tar.gz folder/ does"
The key difference is that the new CLI maintains context. You can ask follow-up questions like "how do I exclude certain files?" without re-explaining your task.
New Features to Explore
The new Copilot CLI offers capabilities far beyond the old extension.
Specialized Agents
Use /explore for fast codebase analysis without cluttering your main conversation:
/explore "how does authentication work in this project?"
Use /task to have Copilot run commands and tests:
/task "run the test suite and show me any failures"
Model Selection
Switch between AI models based on your task:
/model
Available models include Claude Sonnet 4.5 (default), GPT-5, and others depending on your subscription level.
MCP Server Integration
Connect external tools and data sources via MCP servers. Configure them in ~/.copilot/config to extend Copilot's capabilities.
GitHub Workflows
The CLI has native integration with GitHub. Ask questions about issues, PRs, and repositories naturally:
copilot "summarize the open PRs in this repo"
copilot "what are the recent commits on main?"
Subscription and Billing
Your existing Copilot subscription works with the new CLI:
| Plan | Premium Requests/Month | Overage |
|---|---|---|
| Copilot Pro | 300 | $0.04/request |
| Copilot Pro+ | 1500 | $0.04/request |
Premium requests are consumed when using advanced models or features. Standard interactions with the default model typically do not count against limits.
Removing the Old Extension (Optional)
Once you are comfortable with the new CLI, you can remove the old extension:
gh extension remove github/gh-copilot
This is optional - both can coexist if you prefer to keep the old extension as a backup.
Troubleshooting
"command not found: copilot"
Close and reopen your terminal after installation. If still not working, verify the installation directory is in your PATH.
Authentication Issues
- Ensure your Copilot subscription is active at github.com/settings/copilot
- For Business/Enterprise users, verify your admin has enabled CLI access
- Try using a Personal Access Token with the Copilot Requests permission
Old Extension Still Running
If you accidentally run gh copilot instead of copilot, consider creating a shell alias to redirect:
# Add to your .bashrc or .zshrc
alias "gh copilot"="echo 'Use copilot command instead' && copilot"
Next Steps
- Learn about Copilot CLI agents and how to leverage them
- Set up MCP servers for extended capabilities
- Explore slash commands for quick actions
- Compare with Claude Code CLI to understand when each tool excels