Copilotbeginner

How to Migrate from Deprecated gh-copilot Extension to GitHub Copilot CLI

Step-by-step guide to migrate from the deprecated gh copilot extension to the new standalone GitHub Copilot CLI. Understand the differences, transfer your workflows, and set up the modern CLI experience.

6 min readUpdated January 2025

Want us to handle this for you?

Get expert help →

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

FeatureOld gh copilot ExtensionNew Copilot CLI
Installationgh extension install github/gh-copilotbrew install copilot-cli or winget install GitHub.Copilot
Launch commandgh copilot suggest / gh copilot explaincopilot (interactive session)
Interaction styleSingle command, single responseFull conversation with context
Code editingNot supportedCan read, analyze, and edit files
Shell commandsSuggests commands onlyCan execute commands via Task agent
Model selectionFixed/model to switch between Claude Sonnet 4.5, GPT-5, etc.
MCP supportNot supportedFull MCP server integration
GitHub integrationBasicNative 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:

PlanPremium Requests/MonthOverage
Copilot Pro300$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

  1. Ensure your Copilot subscription is active at github.com/settings/copilot
  2. For Business/Enterprise users, verify your admin has enabled CLI access
  3. 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

Frequently Asked Questions

Find answers to common questions

The gh copilot extension is deprecated in favor of the standalone GitHub Copilot CLI (the 'copilot' command). While the extension may still work, it no longer receives updates and lacks newer features like agents, MCP support, and interactive sessions.

Need Professional IT & Security Help?

Our team of experts is ready to help protect and optimize your technology infrastructure.