Copilot CLI Tutorial #1 - Intro & Setup
Chapters9
explains that Copilot CLI runs in the terminal and coordinates multiple AI models rather than hosting its own model.
Copilot CLI tutorial kicks off with setup, login, and a starter Astro project, showing terminal workflows and VS Code integration.
Summary
Net Ninja introduces Copilot CLI as an agentic coding tool that runs entirely in the terminal and orchestrates multiple AI models. The video explains that Copilot CLI aggregates models from providers like Anthropic, OpenAI, and Google, allowing you to switch models for different tasks. The instructor walks through signing up for a GitHub account, choosing a free plan, and installing Copilot CLI via Homebrew on Mac, winget on Windows, or npm for all platforms (Node 22+ required). A starter project called Word Sprint/Words Print is used to demonstrate the workflow, and the tutor shows how to start a Copilot session in a project folder. The session prompts you to trust the folder contents, then log in with /login and complete a one-time code flow in the browser to authorize the tool. After login, you can query Copilot about the project and receive a concise, file-scanned summary (e.g., an Astro 6 + React 19 app with a single route and a shared base layout). The video also covers opening the project in VS Code for easier diffs and context, and running npm run dev to spin up a local server at localhost:1234. Finally, Net Ninja points to the GitHub repo for the starter project and teases upcoming lessons on commands, model options, and settings, with a pitch for the Net Ninja Pro course for early access.
Key Takeaways
- Copilot CLI runs in the terminal and orchestrates AI models from multiple providers, letting you switch models for different tasks.
- Free GitHub plan provides 50 agent mode or chat requests per month, enough to test the setup and early tutorials.
- Mac users can install via Homebrew; Windows users can use winget or npm, with Node 22+ required.
- Login uses a slash command (/login) and a one-time code that can auto-copy and open a browser for authorization.
- Copilot can summarize a project by scanning the repo, returning a concise overview like the Words Print Astro/React app.
- Dev server for the starter project runs with npm run dev and serves at localhost:1234.
- Starter project Word Sprint/Words Print is available on GitHub; fetch by selecting the starter branch and downloading the ZIP, then npm install.
Who Is This For?
Developers curious about how to use Copilot CLI for terminal-based AI coding, especially those evaluating the free plan and a starter Astro project for rapid prototyping.
Notable Quotes
""Okay, then my friends. In this series, we're going to be exploring the Copilot CLI, which is an agentic coding tool, meaning it generates code by using AI models""
—Opening line that defines the series and the tool.
""Copilot itself doesn't have its own dedicated AI model, and instead, it's more of an aggregator and orchestrator of many different models from various providers like Anthropic, OpenAI, Google, et cetera.""
—Explains Copilot CLI's model-aggregation approach.
""Now, I'm going to start a Copilot session within this project folder by just typing Copilot and then hitting enter.""
—Demonstrates starting a Copilot session in a project folder.
""One-time code which you'll need to copy and then enter on github.com in a moment. And actually, if you hit enter again, it's going to automatically copy that code for you to your clipboard and open a browser for you to log in with your GitHub account.""
—Describes the login flow during Copilot CLI setup.
Questions This Video Answers
- How do I install Copilot CLI on Mac or Windows and what are the minimum node requirements?
- Can Copilot CLI switch between AI models like Anthropic, OpenAI, and Google during a session?
- What does the first login flow look like for Copilot CLI and how does the one-time code work?
- Where can I get the Word Sprint/Words Print starter project and how do I set it up locally?
- What should I expect when running npm run dev for a Copilot-enabled Astro project?
Copilot CLINet NinjaWord Sprint/Words PrintAstro 6React 19VS Code integrationMCP serverssub-agentspluginsGitHub sign-up
Full Transcript
Okay, then my friends. In this series, we're going to be exploring the Copilot CLI, which is an agentic coding tool, meaning it generates code by using AI models, and it's not too dissimilar to something like Claude Code in that it runs entirely in the terminal. So, doesn't matter which editor or environment you're using, as long as you have a terminal, you can start a Copilot session. Where it differs from Claude Code is that Copilot itself doesn't have its own dedicated AI model, and instead, it's more of an aggregator and orchestrator of many different models from various providers like Anthropic, OpenAI, Google, et cetera.
And you can switch between these models whenever you see fit for different kinds of tasks. I've mainly been a Claude Code user for the last 12 months or so. I think it's really good, but I've also been very impressed using the Copilot CLI recently, too. It comes with a bunch of similar features and moving parts like command skills, MCP servers, sub-agents, plugins, and all that jazz, and we'll be exploring all of those in this series. But anyway, in this lesson, we're just going to be talking a little bit more about what the Copilot CLI is, how we set it up on our computer, and then we'll get it working with a starter project that I've already prepared.
And then throughout the rest of this series, we'll add features to the project using Copilot CLI until we end up with an application a little bit like this, which is a word count tracker for writers, which allows you to log and compare your daily word count. All right, then. So, the first thing we need to do is install Copilot CLI and also choose a plan to sign up with. Now, at the time of recording this, GitHub have actually paused the Pro and Pro Plus subscription models while they kind of reconfigure how they're going to be charging users for this.
Uh so, they were $10 and $39 a month. It looks like we're going to be going to a usage-based billing system in the future with some kind of API account. So, at the moment, you can only sign up for a free account, which you do get access to the Copilot CLI with, and you can make 50 agent mode or chat requests per month with that as well. So, it is enough to get started with and just to kind of take it for a test ride during this tutorial. So, you can choose the free plan for now or if you have a pro plan, you can go ahead with that.
Now, if you've not got a plan yet, you will need to sign up for an account a GitHub account first of all. There should be a sign up button somewhere up here and you can do that. Then, get started with your free account, okay? The next thing we need to do is we need to install the Copilot CLI onto our computer. Now, if you're on a Mac like I am, you can use Homebrew using this command. If you're on Windows, you can use winget or you can use npm for all platforms as well, but you must have Node 22 or later.
So, I'm going to grab this one right here. This command and then I'm going to open a terminal and paste this in. All right. So, now I'm just going to hit enter to install this. And then, I'm just going to type clear and hit enter just to give us some more room. Okay. So, now it's installed, we can start a Copilot CLI session wherever we want on the computer. Now, I'm going to navigate into a project folder which is called Word Sprints. And this is a starter project which I'm going to show you how to get from GitHub later on in the video.
But now, I can start a Copilot session within this project folder by just typing Copilot and then hitting enter. Now, when I do that for the first time in a folder where I've not had a Copilot session before, then Copilot is going to ask me to confirm that I trust the contents of this folder. It does that because you shouldn't be letting Copilot execute code that you don't trust. Now, I do trust it because I made this code myself. So, I'm going to select yes down here. And when we do that, we are now dropped into a Copilot session where we can start chatting and asking about the project and getting Copilot to write some code for us.
But before we do any of that, we need to log in. And we can do that really easily by just typing forward slash login and then pressing enter. Now, when we do that, it's going to ask us to either log in using github.com or with GitHub Enterprise. Now, if you've signed up to just a personal plan like I showed you before, like the free plan, then you probably want to be selecting this first option right here. So, if you hit enter on that, it's going to give you a one-time code which you'll need to copy and then enter on github.com in a moment.
And actually, if you hit enter again, it's going to automatically copy that code for you to your clipboard and open a browser for you to log in with your GitHub account. So, you just need to paste that code in and then authorize the Copilot CLI. Okay, so I've just done all that and now we can go ahead and start chatting with Copilot. So, I'm going to just ask a simple question to begin with, which is can you tell me about this project? Then, I'm going to hit enter. And now, Copilot is going to explore the entire code base and hopefully come back with a concise summary about it.
Okay, so now that's finished, if we first of all scroll up just a little bit, then you should see that it's read a bunch of different files. It's basically scanned the entire project and it's gone through all the files to find out what it is. And then at the end, we get this concise summary. So, it says, "This is a very early-stage Astro app called Words Print intended to be a daily writing tracker. Right now, it's mostly a branded landing page scaffold rather than a finished product, which it is. It uses Astro 6 and React 19." Yeah, it's identified those correctly.
It's got a single route. Uh the page renders a shared base layout. It does. Got a styled header. Uh this components Yeah, yeah, yeah. All this is right and then it's give us at the bottom of the stack, it's correctly identified that. Uh the UI states, uh the scope today, what it does at the moment, etc. So, it looks like it's been pretty accurate in this. So, that's worked. And now, if we wanted to, we could carry on using Copilot in a regular terminal like this, but sometimes I like to use it within the integrated terminal in VS Code.
And that way, I can easily jump into the code when I need to. And also, the Copilot CLI integrates with VS Code in a way that we can easily see code diffs and get automatic open file context with our prompts. We're going to talk about that later on in the course, but for now, I'm going to exit this chat session by coming down here and then saying {forward slash} exit and just pressing enter. Once I'm done Once I've done that, I'm back in the regular terminal, and I'm going to type code and then a space and then a full stop and then hit enter again to open this project in VS Code.
All right, so this is the starter project then, and again, I'll show you how to get it in a moment. It's an Astro project, and it just consists of a single page, a layout file, and a couple of components for the header and the title. And I'll be working on this project adding more features as we go forward. So, if I want to start a new Copilot CLI session for this project, I can just open my terminal, which I keep on the right instead of down below because it just gives my editor more vertical real estate for the code, and then I can just type Copilot and hit enter.
And when I do that, it should, after a moment, start up a new session in exactly the same way as before, where we can ask it about the project, automate changes, or add new features, and so on. So, we'll be doing all of that in the next lesson, but for now, I just want to get this starter project up and running so we can preview it in a browser. And to do that, we'll need another terminal window to run the dev command, which is just npm run dev. When we do that, it's going to spin up a development server on localhost port 1234, which we can use then to visit the application in a browser.
Okay, so there it is in all its glory, just a simple layout with a header and a title for now, but again, we'll be adding more features to this using Copilot as we go. And finally, I want to show you how to get the starter project. It's right here on GitHub, at this repo called Word Sprint. And I will leave a link to it down below the video. All you need to do is make sure you've selected the starter branch from this branch drop-down, and then hit the code button over here to download a zip of the project.
Then you can open it up in VS Code. You will need to also install all the dependencies, which you can do by running the command npm install. Anyway, that's your introduction to Copilot out of the way, and in the next lesson we'll be looking at commands, at the different models we can use, and a couple of settings. By the way, if you want early access to the entire course now, you can grab it on the netninja.dev website. It's just $3 to buy, or you can sign up for a which is just $9 a month. And for that you get access to all of my courses, early access to my YouTube courses, uh exclusive courses, and long masterclass courses as well, like the Claude Code masterclass I recently released.
So again, that is just $9 a month or $79 for the year. So, I'll leave this link down below the video in case you want to go ahead and access the full course, and also this one if you want to join Net Ninja Pro.
More from Net Ninja
Get daily recaps from
Net Ninja
AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.









