AI in Your Terminal: A First Look at GitHub Copilot CLI

GitHub Copilot CLI moves Copilot's agentic AI capabilities from the editor into the command line. Instead of switching between your terminal and an IDE to get help from an AI assistant, you work with an agent that behaves like any other terminal tool — except it has the full context of your repository.

The agentic model is what separates this from a simple autocomplete tool. Copilot CLI can handle multi-step tasks such as writing code and running tests on its own. It can also spot errors in its own output and fix them without waiting for a human to step in. That means you can hand off a task, continue with other work, and come back to review the results and request follow-up changes from the same terminal session.

Installing Copilot CLI

If you have Node.js installed, the simplest cross-platform route is npm:

npm install -g @github/copilot 

Package managers such as Homebrew and WinGet can also handle the installation; refer to their respective documentation for the exact commands.

First Run and Authentication

Start the tool by typing Copilot in your command line. A number of command switches are available, which will be covered in more depth later in the series.

First-time users must sign in with their GitHub credentials:

/login

This sign-in step does two things: it links the CLI client to your Copilot account, and it connects the read-only GitHub MCP server, which gives the agent access to resources on GitHub.

Before Copilot can explore or modify files, it needs permission to access your project folder. You can grant access for a single session or save the setting so future sessions in the same project won't require repeated approval.

What You Can Do With It

Once authenticated, you can start issuing prompts. A few common use cases:

  • Get a project overview: Ask Copilot to summarize the codebase, and it will open the important files and report back with what it finds.
Give me an overview of this project 
  • Request new code: Ask for something like a new API endpoint. Copilot inspects the project, checks existing examples and documentation, and follows the patterns it sees before requesting permission to create the file.
Let’s add a new endpoint to return all categories
  • Delegate work to the cloud agent: For well-defined assignments, you can offload the task to the Copilot cloud agent directly from the CLI. The agent retains context from your current session, creates a fresh branch, opens a draft pull request, and makes the changes in the background before asking for your review.
/delegate Let’s deal with issue #14 to add the rest of the CRUD endpoints to games

A useful trick for discovering capabilities is to ask Copilot itself. It can search its own documentation and offer guidance on the best ways to interact with it.

The next lesson in this series covers the two operating modes: interactive mode, which runs a project locally, and non-interactive mode using the -p flag, which is suited to quick summaries without leaving your shell context. Future installments will look at slash commands, MCP server integration, and more.