Back to Blog

    Engineering

    Set up GitHub Copilot CLI: The current terminal workflow

    Install, sign in to, and use the current GitHub Copilot CLI safely. Avoid commands from the gh-copilot extension retired in 2025.

    January 28, 20262 min read
    Christof Schnyder

    Christof Schnyder

    Software Architect, Co-Founder

    christof.schnyder@cnext.ch
    CNEXT AI Agent
    In this article

    If you search for GitHub Copilot in the terminal, you will still find instructions for two different products. The old GitHub CLI extension, with commands such as gh copilot suggest and gh copilot explain, was retired in October 2025. The current GitHub Copilot CLI is a standalone, conversational assistant. Knowing the difference saves you an installation that no longer works.

    Install and sign in

    You need active Copilot access. In organisations, the Copilot CLI policy must be enabled. On Windows, PowerShell 6 or later is required. GitHub lists WinGet and npm as installation routes; npm requires Node.js 22 or later.

    winget install GitHub.Copilot

    Or:

    npm install -g @github/copilot

    Then start it with the copilot command. On first launch, the CLI guides you through sign-in; /login is available if needed. Before installing it across an organisation, check the current requirements on GitHub.

    A sensible first task

    Start with a question about an existing repository: ‘Explain where the API routes are defined and which tests cover them.’ Let the CLI read and explain first. For a change, then name the affected files, the expected result and how the result will be checked. The CLI can run tools, so review its permission requests and the diff before you accept changes. This matters most for shell commands with write access.

    The Copilot CLI command reference documents the current start command, help, sign-in and interactive commands. Old alias examples using gh? or github-copilot-cli alias do not belong to this product.

    When is the CLI worth using?

    It helps when a task needs context from several files: tracing a failure, adding a test or preparing a small change with a rationale. For a single shell command, the tool's own documentation is often enough.

    If you are migrating older team guides, also read GitHub's notice on retiring the extension.

    GitHub CopilotAgentic AISchweiz
    Teilen:

    AI tools may have supported the creation of this article. CNEXT is responsible for the published content. Product features and prices can change; check the linked primary sources for current details.

    Christof Schnyder

    Christof Schnyder

    Software Architect, Co-Founder

    Introduce Copilot CLI to your team

    We discuss policies, installation and first tasks for your development team with you.