# What is GitHub Copilot CLI and how do you install it?

GitHub Copilot CLI runs GitHub’s coding agent in a terminal: install it with one command, then type copilot. Inside: first steps, safe settings and what it costs.

Tool: GitHub Copilot. By ColdIQ team. Updated 2026-11-28. Source: https://coldiq.com/university/github-copilot/github-copilot-cli

## In short

- GitHub Copilot CLI is GitHub’s AI agent in a terminal, the text window where you type commands. It is another product than Microsoft Copilot.
- It runs on Mac, Linux and Windows. On Windows it needs PowerShell, or WSL (a Linux environment inside Windows).
- It is available on every GitHub Copilot plan, including the Free plan, which has a limited allowance.
- It asks for your approval before it changes files or runs commands, and Shift+Tab switches to a plan mode that writes a plan first.
- Usage is paid in GitHub AI Credits, where one credit is worth $0.01. Long sessions and stronger models use more of them.

## Steps

1. Open a terminal and paste the install command below.
2. Go to your project folder, type copilot and sign in with /login.
3. Describe a small task, then read each action before you approve it.

## What is GitHub Copilot CLI?

GitHub Copilot is GitHub’s assistant for code. It is not Microsoft Copilot, the assistant in Word, Outlook and Windows, even though Microsoft owns GitHub. The two have separate accounts and separate plans.

CLI means command-line interface, a program you use by typing. GitHub Copilot CLI puts the agent in that window. It can read files, edit them, run commands and work with your projects on GitHub.

You do not need to write code to use it. A marketer can ask it to fix a typo on a web page, rename a batch of files or explain what a project does.


## How do you install Copilot CLI?

On a Mac or Linux, open Terminal and paste the command at the top of this page. On Windows, open PowerShell and paste the Windows version.

There are two other official ways. With Homebrew, use brew install --cask copilot-cli. With npm (a tool to install software), use npm install -g @github/copilot, which needs Node.js 22 or later.

You need an active GitHub Copilot plan, and the Free one counts. Two exceptions exist: people who plug in their own model provider, and people who sign in with an eligible Microsoft Entra account on Windows or Mac.

Tip: If your company gives you Copilot, its admin can turn the CLI off. When it refuses to start on a work account, ask about the policy before you reinstall anything.


## How do you start your first session?

Pick a folder you can afford to experiment in. A copy of a project is perfect.

1. Go to the folder: type cd, a space, then the folder’s path, and press Enter.
2. Type copilot and press Enter.
3. Type /login the first time, and follow the steps on screen.
4. Confirm that you trust the files of this folder when it asks.
5. Ask a question that changes nothing, such as the prompt at the top of this page.
6. Then ask for one small change, and read the action it proposes before you approve it.

Tip: GitHub advises against starting it from your home folder. The agent has the same access to files as you do, so give it one project at a time.


## Which commands are worth knowing?

Commands that start with a slash control the tool. Everything else you type is a request in plain language.

- /model chooses the AI model for the session.
- /context shows how much of the conversation’s memory is used.
- /compact shortens the conversation. The CLI also does it by itself near 95% of the limit.
- /mcp manages MCP servers (a standard way to plug outside tools into an AI assistant).
- /sandbox enable limits what the session can reach on your computer and network.
- Shift+Tab switches between the normal mode and plan mode.


## How do you keep it safe?

For each tool it wants to use, the CLI asks. You can say yes once, approve that tool for the rest of the session, or refuse and explain what to do instead.

Commands such as /yolo and /permissions allow-all skip those questions. GitHub’s advice for automatic approval is to work in a sandbox, a virtual machine or a container, so a mistake stays inside it.

For a task you run often, you can allow or deny precise tools with --allow-tool and --deny-tool. A deny rule always wins.


## What does Copilot CLI cost?

The program has no price of its own. It uses the GitHub AI Credits of your plan, based on the model and the amount of text processed.

As of November 2026, Free has a limited allowance and chooses the model for you. Pro is $10 a month with 1,500 credits, Pro+ is $39 with 7,000 and Max is $100 with 20,000. Part of that is a flex allotment, which GitHub says can change.

GitHub recommends the 1 million token context window (a very long memory) and higher reasoning levels only for complex work, because they use more credits.

- Use Copilot Fusion or Auto, when it is offered, so a simple task goes to a lower-cost model.
- Start a new session for a new subject.
- Name the files you want changed, so it does not read the whole project.


## What can you do with it besides code?

Any folder of text files is fair game. The agent can also read and act on GitHub: list issues (tasks), open a pull request (a proposed change to review) or comment on one.

With an MCP server, it reaches other tools. If you add the ColdIQ server (https://mcp.coldiq.com/mcp), the agent can look up leads and verified emails from 40+ data providers and save them to a file in the folder.

For a job that repeats, copilot -p followed by a prompt runs one task and exits, so you can put it in a script.

> In the file customers.csv, find rows with the same company written in different ways. List them in a new file called duplicates.md. Do not edit customers.csv.


## Command

```
curl -fsSL https://gh.io/copilot-install | bash
```

## What to say

> Read this folder and explain in plain words what each file is for. Do not change anything.

## Sources

- [Installing GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli)
- [About GitHub Copilot CLI](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli)
- [Responsible use of Copilot CLI](https://docs.github.com/en/copilot/responsible-use/copilot-cli)
- [Plans for GitHub Copilot](https://docs.github.com/en/copilot/get-started/plans)
- [Usage-based billing for individuals](https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-individuals)

## Questions

**Is GitHub Copilot CLI free?** It works on every Copilot plan, including Free. The Free plan has a limited credit allowance and picks the model for you.

**Is Copilot CLI the same as Microsoft Copilot?** No. It belongs to GitHub Copilot, a coding product. Microsoft Copilot is the assistant in Windows and Microsoft 365, with its own plans.

**Does Copilot CLI work on Windows?** Yes, in PowerShell or in WSL. The official install command is winget install GitHub.Copilot.

**Can Copilot CLI run in the cloud?** Yes. copilot --cloud starts an isolated session in the cloud that you can follow from other Copilot apps.

**Can I use Claude models in Copilot CLI?** Yes, when your plan includes them. Pro has Claude Sonnet and Haiku models, and Opus needs Pro+ or higher.


## Related

- [What is GitHub Copilot?](https://coldiq.com/university/github-copilot/what-is-github-copilot)

## Try ColdIQ free

ColdIQ gives new accounts up to 1,450 free credits as they get started, no credit card required.
One subscription covers 40+ B2B data providers for finding, enriching and verifying
contacts and companies, through the web app, the API or the MCP server for AI agents.

1. Create an account: https://coldiq.com/marketplace/sign-up?utm_source=ai-assistant&utm_medium=markdown&utm_content=university
2. Run a first search on your own market with the free credits.
3. Connect the MCP server to Claude, ChatGPT or Cursor: https://coldiq.com/mcp
