# Getting Started with GitHub Copilot CLI by [kirupa](https://www.kirupa.com/me/index.htm) | filed under [AI Fundamentals](https://www.kirupa.com/ai_fundamentals/index.htm) **TL;DR:** GitHub Copilot CLI is a coding agent that runs in your terminal. Install it with Homebrew, WinGet, npm, or GitHub's script, run copilot in a project folder you trust, and sign in with /login. It reads code, edits files, and runs commands, and it asks first before anything risky unless you allow it. - Approvals ask before shell commands, file edits, and URL fetches. Allow and deny rules like shell(git:*) tune that, and deny rules always win, even over --allow-all. - Shift+Tab cycles the standard, plan, and autopilot modes, and /delegate hands a task to the cloud agent, which opens a draft pull request. - AGENTS.md and .github/copilot-instructions.md are read every session, skills load when they're needed, and MCP servers add tools like a browser or a database. - Every model call resends the conversation so far, so /new between unrelated tasks and /compact keep long sessions cheaper. Wren, the web developer for the Crumb & Co. bakery, has a small but annoying bug. The menu page on the bakery's website is supposed to put a ***Sold out*** badge on anything that's gone for the day. Croissants sell out by 10 a.m. every morning, and yet the menu keeps cheerfully offering them to everyone who visits. In [Agent Harnesses](https://www.kirupa.com/ai_fundamentals/agent_harnesses.htm), we saw that a coding agent is a model wrapped in a harness: the loop, the tools, the permissions, and the instruction files that turn a text predictor into something that can actually fix a bug. Now it's time to put one to work. In this tutorial, we'll install **GitHub Copilot CLI**, sign in, and walk through Wren's first real session with it, from asking questions about the code to letting it edit files and run commands. Along the way, we'll look at how its permissions work, which slash commands are worth knowing, and how to teach it about our project. One heads-up before we start. Copilot CLI changes quickly, often with a new release every few days. Everything here was checked against [GitHub's Copilot CLI documentation](https://docs.github.com/en/copilot/how-tos/copilot-cli) and against version 1.0.116 of the CLI itself in November 2026. If something looks a little different on your screen, `/help` and `copilot --help` always have the current story. Onwards! ## What Is GitHub Copilot CLI? GitHub Copilot isn't one product so much as a family of helpers that show up in different places. Here are the four places we're most likely to run into it: ![Four places GitHub Copilot works. In your editor, it suggests code as you type, chats, and runs an agent inside VS Code and other editors. On github.com, it answers questions about your repositories, issues, and pull requests, and reviews code. In your terminal, Copilot CLI is an agent that reads code, edits files, and runs commands on your machine; this one is highlighted. In the cloud, the cloud agent works on a task by itself and opens a draft pull request.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_surfaces.png) Copilot CLI is the one in the blue box. It's a coding agent that runs in our terminal, on our own machine, inside whatever project folder we start it from. We type requests in plain English, and it can read our code, edit files, and run commands like `npm test`, asking us first before it does anything risky. [Its README](https://github.com/github/copilot-cli) says it's ***"powered by the same agentic harness as GitHub's Copilot coding agent"***, the agent that works on its own in the cloud. That makes it different from the other three in a couple of ways. Copilot in our editor is great while we're actively typing code, and it has its own agent mode, but it lives inside that editor. Copilot on github.com answers questions about repositories in the browser, without running anything on our computer. The cloud agent goes off and works on a task by itself, then comes back with a pull request. Copilot CLI sits in the middle. It does real work on our real files, and we get to watch and steer every step of it from the terminal. One more bit of history clears up a lot of confusion. There used to be an older tool called ***gh copilot***, an extension for the GitHub CLI with commands like `gh copilot suggest` and `gh copilot explain` that suggested and explained shell commands. GitHub [retired that extension](https://github.blog/changelog/2025-09-25-upcoming-deprecation-of-gh-copilot-cli-extension/) in October 2025 in favor of the new agent, and Copilot CLI became [generally available](https://github.blog/changelog/2026-02-25-github-copilot-cli-is-now-generally-available/) on February 25, 2026. Today, typing `gh copilot` offers to install the new Copilot CLI and then [runs it for us](https://github.blog/changelog/2026-01-21-install-and-use-github-copilot-cli-directly-from-the-github-cli/). If an older tutorial tells you to run `gh copilot suggest`, it's describing the retired tool. ## How Do You Install Copilot CLI? Before installing anything, we need two things. The first is a GitHub Copilot plan. At the time of writing, [GitHub's plans page](https://docs.github.com/en/copilot/get-started/plans) says every plan includes Copilot CLI, including Copilot Free (which only gets automatic model selection). If our Copilot seat comes from a company, an administrator has to have Copilot CLI turned on in the organization's policies. The second is a terminal: Copilot CLI runs on macOS, Linux, and Windows, where it works in PowerShell and in WSL. There are several ways to install it, and they all end up giving us the same `copilot` command. Pick whichever matches how you install everything else. On a Mac (or Linux) with Homebrew, it's a cask: ```bash brew install --cask copilot-cli ``` On Windows, WinGet does the job: ```bash winget install GitHub.Copilot ``` On macOS or Linux without Homebrew, GitHub's install script downloads the right build for our machine: ```bash curl -fsSL https://gh.io/copilot-install | bash ``` And anywhere we have Node.js 22 or later, npm works too: ```bash npm install -g @github/copilot ``` To check that it worked, ask it for its version: ```bash copilot --version ``` If you see something like `GitHub Copilot CLI 1.0.116.`, you're all set. Staying current is mostly automatic. The Homebrew, WinGet, and install-script versions [update themselves](https://github.blog/changelog/2026-02-25-github-copilot-cli-is-now-generally-available/), and `copilot update` (or `/update` inside a session) fetches the latest version on demand. The npm version only tells us when there's a newer one, so updating it is another `npm install -g @github/copilot`. ## How Do You Start Copilot CLI and Sign In? Copilot CLI works on whatever folder we start it in, so the first step is always to go to our project. For Wren, that's the bakery's website, in a folder called `crumb-site`. The very first time we start Copilot CLI in a folder, it asks whether we trust that folder: ![Wren runs cd crumb-site and then copilot. Before doing anything, Copilot CLI warns that it may read, modify, and execute files in and below this folder, and offers three choices: 1. Yes, 2. Yes, and remember this folder for future sessions, and 3. No (Esc).](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_trust.png) Copilot CLI is about to read, change, and run things in this folder and everything below it. [GitHub's docs](https://docs.github.com/en/copilot/concepts/copilot-surfaces/copilot-cli) are blunt about it: ***"You should only launch Copilot CLI from directories that you trust."*** They also suggest not starting it from our home folder, which would put every file we own in scope. Picking ***Yes*** trusts the folder for this session, and picking the second option remembers it, so we won't be asked again. Wren wrote this code, so the second option is fine. Next, we need to sign in. If we aren't signed in yet, Copilot CLI tells us to type `/login`, and the rest happens in the browser: ![Signing in takes three steps. First, type /login in Copilot CLI. Second, approve it in your browser on github.com by clicking Authorize. Third, the terminal says you're signed in successfully, and you're in.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_sign_in.png) On our own computer, `/login` opens the browser, we approve Copilot CLI on github.com, and we're back in the terminal, signed in. Over SSH, in a Codespace, or anywhere else without a browser handy, it switches to a **device code**: it shows a short code that we type in at `github.com/login/device` from any other device. The same sign-in is available outside a session as `copilot login`. For scripts and automation, where nobody is around to click a button, Copilot CLI can read a token from the `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` environment variable, checked in that order. If we make a personal access token for this, the [authentication docs](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli) say it has to be a fine-grained one with the ***Copilot Requests*** permission. The older classic tokens that start with `ghp_` don't work. ## Your First Session: Asking Questions Once we're signed in, we get a prompt where we can type anything. A good first move in an unfamiliar codebase (or a familiar one we haven't touched in a while) is to ask a question instead of asking for a change. Wren asks how the menu page decides what's sold out: ![Wren asks: How does the menu page decide what's sold out? Copilot CLI first reads src/menu.js and searches for soldOut in src/. Then it answers: renderMenu() adds a sold-out badge when an item's count === 0. The counts come from src/stock.js as strings, so "0" never equals 0, and croissants never look sold out.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_explain.png) Look at the two green lines before the answer. Copilot CLI looked before it answered. It read `src/menu.js` and searched the code for `soldOut`, and then it answered based on what it found. Reading and searching inside our project are safe enough that Copilot CLI does them without asking. And in this case, just asking for an explanation turned up the bug. The stock counts arrive as text, so the count for croissants is the text `"0"`, which isn't strictly equal to the number `0`. A few small habits make questions like this work better: - Type `@` to pick a file and add it to the conversation, as in `Why is @src/stock.js returning strings?`. It saves the agent a search and makes it clear which file we mean. - Start a line with `!` to run a shell command ourselves, like `!git status`, without leaving Copilot CLI. - Paste a screenshot (or point `@` at an image file) to show it a broken layout. That works when the model we're using can read images, which [How AI Understands Images](https://www.kirupa.com/ai_fundamentals/how_ai_understands_images.htm) explains. - Press `Esc` twice to stop whatever it's doing, and use `/exit` (or `Ctrl+D` on an empty prompt) to quit. ## Asking It to Edit and Run Things With the cause found, Wren asks for the fix: ***Fix the sold-out badge so string counts work, and run the tests.*** This is where Copilot CLI stops being a fancy search box and starts acting like an agent. Under the hood, it runs the same loop we took apart in [How an Agent Like Claude Code Works](https://www.kirupa.com/ai_fundamentals/how_an_agent_works.htm): ![The loop behind every Copilot CLI task. Your prompt, like fix the badge, goes to the model, which picks a step. When the step needs a tool, to read, edit, or run something, the request goes through a permission check that asks you if needed. The result goes back to the model, which goes around again. When it's done, the model sends a final answer.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_loop.png) The model never touches the files directly. It asks for a tool, like reading a file, editing one, or running a shell command, and the harness carries it out. Before a risky tool runs, the harness checks whether we've allowed it, and if we haven't, it asks us. The result goes back to the model, which decides the next step, and the loop repeats until the model has nothing left to do. For Wren's bug, that might be one read, one edit to compare counts as numbers, and one run of `npm test` to confirm that the badge works. When it's done, two commands help us check its work. `/diff` shows every change it made in the current folder, and `/rewind` takes the conversation back to an earlier turn, optionally undoing the file changes made after it too. If the fix looks good, Wren can ask Copilot CLI to commit it or commit it by hand. ## How Do Approvals and Permissions Work? Running `npm test` executes code on Wren's machine, so Copilot CLI doesn't just go ahead and do it. It stops and asks: ![Copilot CLI wants to run the tests to check the fix, using the command npm test, and stops to ask. The choices are 1. Yes, 2. Yes, and don't ask again for npm test in this repo, and 3. No, and tell Copilot what to do differently (Esc).](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_approval.png) These three choices are worth getting comfortable with. The first runs the command this one time. The second runs it and saves the answer, so Copilot CLI won't ask about `npm test` in this repository again. The third says no, and it lets us tell Copilot what to do instead, which is a great way to steer it (***No, run only the menu tests***). So what triggers a question like this? According to Copilot CLI's own help, it asks before it: - runs shell commands, other than ones it recognizes as read-only, - creates or edits files, - reaches files outside the folder we started in (plus the system's temp folder), - fetches a URL, or - calls a tool from an MCP server, which we'll get to in a bit. Answering every question by hand is the safe default, but it isn't the only setting. We can dial how much Copilot CLI asks up or down: ![Four levels of how much Copilot CLI asks before acting, from most asking to least. Ask each time is the default. Don't ask again saves a yes for one command in one repo. --allow-tool rules allow tools for one run. --allow-all, aka --yolo, allows everything, with a handwritten note: careful up here! An arrow underneath reads less asking, more trust, and a red banner says --deny-tool rules still win over all of these.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_trust_levels.png) From left to right: the default asks about everything risky. ***Don't ask again*** remembers a yes for one command in one repository. The `--allow-tool` flag allows tools for a single run, and `--allow-all` (whose nickname is `--yolo`, which tells you a lot) allows every tool, path, and URL without asking (deny rules and any organization rules still apply). That last one is useful inside a throwaway container or a sandbox. Anywhere else, the docs warn that it gives Copilot the same access we have to the files on our computer, without asking first. Inside a session, `/allow-all` does the same thing, and `/reset-allowed-tools` undoes our saved yeses. The rules behind `--allow-tool` and `--deny-tool` look like `kind(argument)`. Here's a pair that lets Copilot CLI use git freely, with one important exception: ![Two rules for one run of Copilot CLI: --allow-tool 'shell(git:*)' allows every git command, and --deny-tool 'shell(git push)' makes an exception for that one. So git status runs with no prompt, git commit -m "Fix badge" runs with no prompt, and git push is blocked, because deny wins.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_rules.png) The `:*` in `shell(git:*)` matches `git` followed by anything, so `git status` and `git commit` both run without a question. The deny rule blocks `git push`, and deny rules always win, even over `--allow-all`. Other kinds work the same way: `write` covers file edits, `url(github.com)` covers fetching from a site, and an MCP server's name covers its tools. Running `copilot help permissions` shows the full syntax. This is the same idea as [least-privilege access](https://www.kirupa.com/ai_fundamentals/least_privilege_tools.htm) for any agent: give it exactly the access the job needs, and keep a human in the loop for the rest, as we saw in [Human Approval for Risky Actions](https://www.kirupa.com/ai_fundamentals/human_approval_for_risky_actions.htm). ## Plan Mode and Autopilot So far, Wren has been working in the standard mode, where Copilot CLI does the work while Wren watches and approves. There are two other modes, and `Shift+Tab` cycles through all three: ![Copilot CLI's three modes. Standard works with you and asks before it edits files or runs commands. Plan asks questions and writes a plan before it changes any code. Autopilot keeps going on its own until the task is done. Pressing Shift+Tab cycles from standard to plan to autopilot and back.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_modes.png) **Plan mode** is for bigger jobs, like ***add an allergens filter to the menu page***. Instead of jumping straight into code, Copilot CLI asks clarifying questions and writes a step-by-step plan first, so we can fix a wrong assumption before it turns into fifty lines of wrong code. `/plan` followed by a request does the same thing. When the plan looks right, we approve it, and Copilot CLI starts building. **Autopilot** lets Copilot CLI keep working without waiting for us to type ***continue*** after each step. Any permission request that would normally stop and ask us gets denied instead, though, so autopilot only gets far when we've allowed the tools it needs, either by answering the permission question that appears when we switch to it or with `--allow-tool` rules. It also pauses after five automatic continuations by default, which keeps a confused agent from looping forever. ([Agent Step Limits](https://www.kirupa.com/ai_fundamentals/agent_step_limits.htm) explains why that kind of limit matters.) There's also a way to hand work off completely. `/delegate` followed by a task (or a prompt that starts with `&`) sends it to the Copilot cloud agent, which [works on GitHub](https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/delegate-tasks-to-cca) and opens a draft pull request. It keeps running even after we close our laptop. ## Which Slash Commands Should You Know? Anything we type that starts with `/` is a command that Copilot CLI handles itself, though some of them, like `/plan` and `/review`, then put the model to work. There are a lot of them (`/help` lists them all, by group), but these are the ones that come up most in everyday use: | Command | What it does | |---|---| | `/help` | Lists every command and keyboard shortcut | | `/login`, `/logout` | Signs in or out | | `/model` | Picks the AI model, or `auto` to let Copilot choose | | `/plan` | Writes a plan before changing any code | | `/diff` | Shows the changes made in the current folder | | `/rewind` | Goes back to an earlier turn, optionally undoing file changes too | | `/review` | Runs a code review agent over our changes | | `/context` | Shows how full the context window is | | `/compact` | Summarizes the conversation to free up room | | `/usage` | Shows what this session has used so far | | `/new`, `/clear` | Starts a fresh conversation | | `/resume` | Switches to an earlier session | | `/init` | Writes a starter instructions file for the repository | | `/skills`, `/mcp`, `/agent` | Manage skills, MCP servers, and custom agents | | `/add-dir` | Lets Copilot CLI reach another folder | | `/allow-all`, `/reset-allowed-tools` | Turns on every permission, or clears our saved approvals | | `/delegate` | Hands the task to the cloud agent, which opens a pull request | Outside a session, a few things are handy too. `copilot --continue` picks up the most recent session where we left off, and `copilot --resume` shows a list of earlier sessions to choose from. ## How Do You Pick a Model? Copilot CLI isn't tied to one model. `/model` shows the models our plan can use and switches between them in the middle of a conversation. To start with a specific one, we can pass `--model` (as in `copilot --model claude-opus-5.5`) or set the `COPILOT_MODEL` environment variable. Choosing `auto` lets Copilot pick for us. At the time of writing, the [command reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference) lists Claude Sonnet 5.5 as the default, but the list of models changes almost weekly, so `/model` is the place to check. Models also differ in price. Copilot now [measures usage in AI credits](https://docs.github.com/en/copilot/concepts/billing-and-usage/individuals/billing), where one credit is a cent, and each call to the model costs credits based on the [tokens](https://www.kirupa.com/ai_fundamentals/tokens_and_your_bill.htm) it reads and writes at that model's price. (Some accounts are still on the older premium-request billing, and Copilot CLI shows whichever one ours uses.) Every call also resends the whole conversation so far, so a long session pays to read the same old messages again and again. `/usage` shows what a session has used, `/context` shows how full the [context window](https://www.kirupa.com/ai_fundamentals/context_window_limits.htm) is, and `/compact` squeezes older turns into a summary (the idea behind [compacting a conversation](https://www.kirupa.com/ai_fundamentals/compacting_a_conversation.htm)). When we switch to an unrelated task, `/new` is often the cheapest command of all. ## Custom Instructions and Skills Every new session starts out knowing nothing about our project. Copilot CLI can read the code, but it can't know that the bakery's team writes tests with Vitest, or that menu text should never use exclamation points, unless somebody tells it. Instruction files and skills are how we tell it, once, instead of repeating ourselves in every session. Here's where Copilot CLI looks for them: ![Where Copilot CLI looks for setup files. In the crumb-site project, shared with the team: AGENTS.md and .github/copilot-instructions.md are read every session, a skill in .github/skills/menu-copy/ is loaded when needed, and .mcp.json adds extra tools. In ~/.copilot, just for you: copilot-instructions.md is read every session, skills/ holds skills loaded when needed, and mcp-config.json adds extra tools.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_files.png) **Instruction files** (the blue rows) are read at the start of every session. Copilot CLI reads `.github/copilot-instructions.md` and `AGENTS.md`, as well as `CLAUDE.md` and `GEMINI.md` if a project has those, and path-specific files in `.github/instructions/`. It combines all of them rather than picking a winner, so they shouldn't contradict each other. Our personal preferences go in `~/.copilot/copilot-instructions.md`, which applies in every project. The easiest way to start is `/init`, which looks around the repository and writes a first draft of `.github/copilot-instructions.md` with the build commands, conventions, and project layout it finds. Because the files are read when a session starts, run `/new` after editing one. **Skills** (the green rows) are for know-how that only matters sometimes. A skill is a folder with a `SKILL.md` file in it, and Copilot CLI looks in `.github/skills/`, `.agents/skills/`, and `.claude/skills/` in our project, and in `~/.copilot/skills/` for our own. Only a skill's short description sits in the context until it's needed. Here's a small one for writing menu blurbs: ![A SKILL.md file with the name menu-copy and the description Write short, friendly menu blurbs for new bakes, followed by instructions: Keep it under 20 words. Mention one flavor. It runs two ways. You can run it yourself by typing /menu-copy rye loaf, or Copilot picks it when a task matches its description.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_skill.png) The `description` does double duty. It's what the model reads when deciding whether this skill fits the task in front of it, so it should say what the skill does and when to use it. And by default, every skill also becomes a slash command named after it, so `/menu-copy rye loaf` runs it right away. [Teaching Your Agent New Skills](https://www.kirupa.com/ai_fundamentals/teaching_your_agent_new_skills.htm) goes much deeper on writing skills that actually get better over time. ## Adding Tools With MCP Out of the box, Copilot CLI can read and edit files, run shell commands, and fetch web pages. The [Model Context Protocol](https://www.kirupa.com/ai_fundamentals/model_context_protocol.htm), or MCP, is how we give it more tools, like a real browser to click through the menu page, or read access to the bakery's database: ![Copilot CLI, in your terminal, connects to MCP servers that give it more tools. The GitHub server is built in and covers issues, pull requests, and code. The others are ones you add, like Playwright, which drives a browser, Postgres for the bakery's stock table, and Slack for team messages.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_mcp.png) GitHub's own MCP server comes built in. When we're signed in, Copilot CLI starts it automatically, which can read repository files, issues, and pull requests, and search code. It's read-only by default, so it can't change anything on GitHub until we turn on more of its tools. Most other servers, we add ourselves. `/mcp add` walks us through a short form inside a session, and `copilot mcp add` does the same from the shell, with the server's name and its command or URL as arguments. Servers we add for ourselves are saved in `~/.copilot/mcp-config.json`. Servers the whole team should share go in a `.mcp.json` file in the repository, and Copilot CLI only loads those once we've trusted the folder. One gotcha: VS Code's `.vscode/mcp.json` isn't read. To reuse those servers, copy the file to `.mcp.json` and rename its top-level `servers` key to `mcpServers`. MCP tool calls ask for permission like any other tool unless we've allowed them, and each server's tools take up room in the context window. So a handful of servers we actually use beats a dozen we installed just in case. ## Running It From Scripts Everything so far has been a conversation. Copilot CLI has a second way to run, where we hand it one prompt and it prints an answer and exits: ![Two ways to run Copilot CLI. Typing copilot starts a conversation: you chat back and forth, it asks before risky steps, and it's good for exploring and fixing. Typing copilot -p with a prompt runs once and prints the answer; anything that needs a yes is denied unless a rule allows it, which makes it good for scripts and jobs.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_prompt_mode.png) That's the `-p` (or `--prompt`) flag. Since there's nobody around to answer a permission question, anything that would normally ask gets denied, so we allow exactly what the job needs up front. Here's a nightly job that summarizes the day's changes to the bakery's site: ```bash copilot -p "Summarize today's commits in plain English for the bakery owner" \ --allow-tool='shell(git log)' -s ``` The `-s` (`--silent`) flag prints only the answer, without the usage summary at the end, which makes the output easy to send along somewhere else. `--output-format json` gives a program something it can parse instead. This is also how Copilot CLI ends up inside other tools, like a step in a build script or a scheduled job that writes a report. ## Tips for Getting Good Results A handful of habits make a big difference in how sessions go: - **Ask before you change.** A question like Wren's first one costs very little and often finds the bug, or at least the right file. - **Be specific about done.** ***Fix the badge and run the tests*** gives the agent a finish line. ***Make the menu better*** doesn't. - **Use plan mode for anything big.** Reviewing a plan is much faster than reviewing a pile of wrong code. - **Answer no with a reason.** The third approval option tells the agent what to do instead. - **Write things down once.** When you catch yourself explaining the same convention twice, put it in an instruction file or a skill. - **Start fresh between tasks.** `/new` keeps an old conversation from confusing (and paying for) the next one. - **Read the diff.** `/diff` before every commit, because the agent's confidence isn't the same as being right. ## When Should You Use Copilot CLI? With four flavors of Copilot around, the best way to pick one is to ask where we want the work to happen: ![Where should the work happen? In my editor, as I type: Copilot in your IDE. In my terminal, while I watch: Copilot CLI. Somewhere else, while I'm away: the cloud agent.](https://www.kirupa.com/ai_fundamentals/images/github_copilot_cli_which.png) If we're in the middle of writing code, Copilot in the editor is right there with suggestions as we type. If the job spans several files and needs commands run, like Wren's fix plus its tests, Copilot CLI is a great fit, especially when we spend most of our day in a terminal anyway or work on a remote machine over SSH. And if it's a well-defined task we don't need to watch, like an issue with clear steps, the cloud agent can take it away entirely, and `/delegate` sends it there without leaving the terminal. None of these choices is permanent. Plenty of people use all three on the same day. ## Frequently Asked Questions **Is GitHub Copilot CLI Free?** At the time of writing, GitHub says every Copilot plan includes Copilot CLI, including Copilot Free, which only gets automatic model selection. Usage counts against the plan’s AI credits, based on the tokens each model call reads and writes. If your Copilot seat comes from a company, an administrator has to turn Copilot CLI on first. **How Do I Install Copilot CLI on Windows?** Run winget install GitHub.Copilot, or npm install -g @github/copilot if you have Node.js 22 or later. Copilot CLI works in PowerShell and in WSL. Then run copilot --version to check that it worked. **How Do I Start Copilot CLI?** Open a terminal, go to a project folder you trust, and type copilot. The first time, it asks whether you trust the folder. If you aren’t signed in yet, it tells you to type /login, which finishes the sign-in in your browser. **What Happened to gh copilot suggest and gh copilot explain?** Those commands belonged to an older GitHub CLI extension that GitHub retired in October 2025, in favor of the new Copilot CLI agent. Today, typing gh copilot offers to install the new Copilot CLI and then runs it. **How Do I Check Which Version of Copilot CLI I Have?** Run copilot --version. To get the newest version, run copilot update, or /update inside a session. The Homebrew, WinGet, and install-script versions also update themselves, while the npm version only tells you when a newer one is out. ## Conclusion We started with a menu page that wouldn't admit croissants were gone. In one Copilot CLI session, Wren asked how the page worked, found that `"0"` isn't `0`, let the agent fix it, and approved one test run before anything executed. Getting there took an install command, `/login`, and one trust question. The rest is about how much we let it do. Approvals and allow and deny rules decide what runs without asking, instruction files and skills teach it about our project once, MCP servers give it new tools, and `-p` runs it with nobody watching. Copilot CLI is one of the harnesses we met in Agent Harnesses, so everything there about the model being the engine and the harness being the rest of the car applies here too. Before you go, here are a few things you can do: 1. Test your knowledge by taking the quiz below. 2. Read the next article in the series, [Multi-Agent Systems](https://www.kirupa.com/ai_fundamentals/multi_agent_systems.htm), or check out some related content: - [How an Agent Like Claude Code Works](https://www.kirupa.com/ai_fundamentals/how_an_agent_works.htm). See the loop inside a coding agent, one tool call at a time. - [Teaching Your Agent New Skills](https://www.kirupa.com/ai_fundamentals/teaching_your_agent_new_skills.htm). Write skills that teach an agent your project’s know-how. - [Model Context Protocol (MCP)](https://www.kirupa.com/ai_fundamentals/model_context_protocol.htm). How MCP servers plug new tools into any agent. 3. Stuck on something, or curious about a detail we skipped? [Ask on the forums](https://forum.kirupa.com/), and we’ll help you out. ## Test your knowledge! [Take the Getting Started with GitHub Copilot CLI Quiz](https://www.kirupa.com/quizzes/github_copilot_cli.htm). Practice with 8 multiple-choice questions and an explanation after every answer.