Less // TODO: more done with GitHub Copilot CLI
Chapters7
Overview of Copilot CLI and its purpose as a terminal based agent for developers.
GitHub Copilot CLI brings a powerful, multi-mode agent directly to your terminal—great for automations, code reviews, and multi-agent workflows.
Summary
Julia from the GitHub team demonstrates how GitHub Copilot CLI transforms your terminal into a feature-rich assistant. She walks through getting started: subscription checks, installation on Windows, macOS, and Linux, and logging in with slash commands. The talk then branches into three interaction modes: non-interactive (headless), interactive, and server mode, highlighting practical demos like generating live-stream content, model selection with auto mode, and multi-agent orchestration. A highlight is the built-in agents and the ability to customize with Aagents, MCP servers, and skills, all executable from the terminal. Julia also shows real-world workflows: running a code review with the built-in review agent, layering in the rubber duck agent for cross-model validation, and orchestrating sub-agents with a fleet to tackle complex tasks. The SDK demo at the end ties everything together, showing how you can connect external apps to a Copilot CLI session via JSON RPC. By the end, you’ll see how Copilot CLI can automate routines, improve code quality, and power AI-assisted tooling inside existing development pipelines.
Key Takeaways
- Copilot CLI runs as a terminal-based agent that can be launched with a simple copilot command, bringing an AI assistant directly into developer workflows.
- Auto mode selects models based on availability and prompt complexity, often choosing advanced options like GPT 5.3 codeex to balance capability and cost.
- The interactive mode uses slash commands to manage models, contexts, and tools, enabling live back-and-forth with the agent.
- Built-in agents (like code review and rubber duck) provide ready-to-use capabilities for code analysis and cross-model validation without extra setup.
- You can customize Copilot CLI with MCP servers, skills, and custom agents to tailor the assistant to your repository and tooling needs.
- The server-mode feature exposes a JSON RPC port, letting external apps integrate with Copilot CLI sessions programmatically.
- Memory (copilot memory) lets the agent persist key repo details across contributors, improving coordination in multi-user projects.
Who Is This For?
Software developers, DevOps engineers, and AI/ML practitioners who want AI-assisted coding, automated code reviews, and multi-agent collaboration inside their existing terminal workflows and CI/CD pipelines.
Notable Quotes
"This is a featurerich agent that lives in your terminal."
—Julia introduces Copilot CLI as a feature-rich agent that lives in the terminal.
"the slash login command and this will start an o flow."
—Demonstrates the login workflow via a slash command.
"in a non-interactive um type of interaction. So this way you're running it in its headless state."
—Explains the headless mode use case for automation pipelines.
"behind the scenes auto mode is backed by two different systems."
—Describes how auto mode chooses models based on availability and prompt complexity.
"out of the box with the copilot CLI, you get the computer use and the GitHub MCP servers by default."
—Highlights built-in customization ecosystems (MCP servers and default capabilities).
Questions This Video Answers
- how does Copilot CLI decide which model to use in auto mode
- can Copilot CLI be integrated with external apps via JSON RPC
- what are built-in agents in Copilot CLI and how do you use them to review code
- how do you set up memory or persistent context in Copilot CLI
- what is the difference between interactive and headless modes in Copilot CLI
GitHub Copilot CLICLI automationInteractive modeHeadless modeModel selectionAuto modeAagentsMCP serversSkillsCode review agent”“ Rubber duck agent
Full Transcript
Thanks, Matt. Hi, everyone. Um, welcome again to GitHub Copilot Dev Days. Um, my name is Julia. I am a developer advocate at Microsoft and I'm in a ble in a black t-shirt. I have a black um pair of glasses on and I have um black and brown braided hair. I am so excited to be joining you live from Nairobi, Kenya. So in this segment of the session and thank you so much um Matt for the introduction uh that was a really good overview of everything GitHub copilot but for this segment we are going to focus on GitHub copilot CLI we look at how you can get started and what it is you can achieve by using this tool.
So in the course of the presentation if you have any questions we have an amazing team ready for you on the chat. So feel free to pop your questions in there throughout the presentations. And so with that, we'll get started. Now, if by any chance you have not worked with GitHub Copilot CLI before, this is a featurerich agent that lives in your terminal. We continue to see the uprising of CLI based agents and this simply just proves that developers spend a considerable amount of time in your terminals. So in as much as you have your files open, you're writing code, you know, if you still do that to date, you spend a good amount of your time in the terminal either running tests um um deploying your cloud infrastructure or debugging sessions from failed tests and failed build commands.
So you do spend a fair amount of your time on the terminal. And this context most often is always either treated as secondary context or just overlooked. So with the terminal, the CLI, the GitHub copilot CLI, we basically bring this powerful agentic experience directly in your terminal with a unique set of integrations and extensibility features that you will see throughout the day. So how to get started? Number one, ensure that you have a GitHub Copilot subscription. And then number two, you need to install Copilot CLI on your computer. Now, if you're running on a Windows machine, you can easily get the CLI using Wingut or you can install it directly from the Microsoft Store.
If you're on Mac or Linux, you can get the CLI using Homebrew or you can alternatively install it using npm. Now once you have it installed then I'm going to get exit my slides and I'm going to have my terminal here. As soon as you have the CLI installed launching the agent is as easy as typing copilot on your terminal and that just brings out this beautiful banner which will come in any second now. And then you now have the agent live and ready for interaction. Again, if you're using it for the very first time, you will be prompted to log into your GitHub account or you can do this manually by typing the slash login command and this will start an o flow.
It will give you a temporary code, redirect you to the browser. You can sign in with your preferred GitHub account and get started with a copet cla. Now once you're signed in, you can come back again, do slash user, and this should confirm for you the um GitHub account that you have active for your active CLI session. And that's it when it comes to setting up Copilot. It's now ready for me to start using it directly from my terminal. So I'll switch back to my slides and that's the installation step. Now the next thing is that you can interact with copilot CLI in a variety of different modes.
Each of them designed to support specific use cases. So you see here three distinct modes that you can interact with the CLI. and we are going to spend some time on each, see a demo and see how you can basically get the most out of this tool. So the first interaction mode is using copilot in a non-interactive um type of interaction. So this way you're running it in its headless state. So this means and you can think of use cases that involve automation pipelines or your CI/CD workflows. In this case, you just want to send a oneoff prompt to copilot, get the output back, and then inject that output as part of your existing workflow.
And so to demonstrate this, I'm going to again hop out of my slides and then back here on my terminal. Um, I'm going to give a practical example. So every single week I host a live stream on the GitHub account rubber duck Thursdays where we connect with the community talk about everything that's new in the world of GitHub and our conversations are often grounded in what is available in the GitHub change log. So we basically discuss what's new do some demos around that and so if you see in this folder I have a script. So I have an RDT.sh script.
So I'm going to execute that script and while it runs on this terminal I will open a second terminal and then we're going to inspect what we have in this file. So at the top here you'll see it's a regular script. I'm running it using bash. I'm running it in strict mode and then I'm defining the output that I want. In this case it's a single markdown file. And then you see me down here sending a prompt to copilot. And here is the syntax. So I'm using copilot-p or you can alternatively use copilot-mprompt. And then in double quotes you send in your prompt.
So in this case we're telling copilot that hey you are preparing content for rubber duck Thursdays a weekly GitHub developer live stream. Today's date is this. Fetch and read content from the change log and the GitHub blog platform. And then I want you to return a markdown document structured as follows. So it has the header, it has different sections for a summary, change log, updates, demo ideas, etc. So at the bottom here, I'm also passing in some parameters. So for example, I am running - s to run this silently and have copilot drop any session metadata and just give me the output.
I'm then running it in a no ask user mode. So, I don't want you to ask me any clarifying questions, and I'm only restricting it to the github.blog URL destination, which is recommendation number one. If you're using the Copilot CLI in an environment where you don't have 100% control over, you do want to limit the tools that you give it access to, as well as the URL destinations. So, that is what our script is doing. I'll go back to the first um tab, and you'll see that we have a new file that has been added.
So I'm going to open this markdown file that has been created. And what you see here is woof. We actually quite have quite a lot given that it's just Wednesday this week. So we have at the very top a header rubber duck Thursday's week of 27th May. That's today's date. The one paragraph summarizing what's new in the world of GitHub. And then we have items for each of the announcements that have been posted on the change log. I can click on the link here to verify and validate that. So, this really helped me get ahead as I prepare for my live stream.
I have some insights on what's new. And you can already see how this can come in handy. So, this can be part of a GitHub action. Every single morning, as part of my setup routine, I can have a message just telling me what's new in the world of GitHub. And at the very bottom here, it actually gives me some demo ideas, right? So it's giving me some demos that I can run with the community to demonstrate these new features. So again I'll switch back to my slides. That's the first mode that you can interact with copilot in a headless state and you can already think of the many possibilities given your automation pipelines have copilot produce output that can be injected into your workflows.
Then mode number two is the most popular mode which is using copilot CLI in its interactive state. So this means that you engage in a series of back and forth prompts and conversations with the agents in an interactive um state. And again um as I mentioned at the beginning this agent is not just a baseline flatline agent but it comes with so many features. And how you invoke and use these features is through slash commands. So if you launch copilot in your terminal, you can easily just use type the special character slash and then this will give you access to a very long list of different features that are ready for you to use including switching between your custom agents, your models, managing your context, understanding the token consumption, etc.
And so for this I will jump back into my terminal and I'm going to hop into a different project here. I will type copilot to launch the copilot CLI and then there we go. I'm going to use the special character slash and then this will see and you'll definitely see the list of available features. As I've said, this list is so long. So, do spend some time going through the list of features that you can use with Copilot. So, for now, I'm going to look through the available models that I have. So, if you do /models, you should see the list of models that are available.
This list will vary depending on the type of subscription across uh different users. So, you will see models that you have access to. So, for now, I'm just going to switch to auto mode. Now auto mode is an interesting selection because what happens is behind the scenes auto mode is backed by two different systems. So the first system is looking at the models that you have access to and then it's looking at their availability as well as their health and then system number two is analyzing the complexity of your prompt and then it combines the two to make a model selection on your behalf.
So you'll see in this case it decided to go with GPT 5.3 codeex. So I can use copilot here in an interactive mode. So I can go in with a prompt like give me a brief overview of this project. I can send that in and in this interactive mode I can see the thinking steps of the model. I can see its internal thoughts. I can see the tools that it makes. the calls that it makes. Um, I can as well see if the agent is taking a direction that is not what I want it to be doing, I can easily steer it back on track.
So, this is the experience as you're working with the agent through this interactive mode. And of course, as an output, we should expect a simple um explanation of what this project is. In this case, it's a simple VS code extension that focuses on reducting um sensitive information during um live live presentations. So that's basically the baseline of how you can interact with the agent. Now a key advantage of the copilot CLI specifically is the rich set of customization options that you have. Now if I type in / env this command allows me to see a list of customizations that are being applied into my copilot session.
So this starts from any custom instructions that I have defined for the agent to use. In this case I have none. And then it goes on to the MCP servers. So you can have your agent running directly on the terminal communicate with and connect to external services. your data sources and pull in context to complete tasks. And out of the box with the copilot CLI, you get the computer use and the GitHub MCP servers by default. So they are built in. You can choose to disable or enable your MCP servers depending on the task at hand.
And of course, we do have the dedicated MCP set of commands that allow you to easily manage and add modify different MCPS as you proceed. Then the other set of customizations is the skills which are basically folders of customizations, instructions, scripts, and resources that the agent can choose to load in order to improve the output that it gives you. So for example, if I have my agent running from the terminal and I want it to interact with some word documents, it's going to pull in from the dog skills that I have provided. And similarly, I can run the skills command here and see the set of available commands that I can easily manage all these options without leaving the terminal environment.
So this is the same for custom agents, for your plugins, for your extensions, etc. So we have a variety of and a very broad spectrum of customization options as you're working with copilot directly on the terminal. So back on my slides I'm going to restart. So I I keep talking about um customization options that you have and of course you can bring in your personalized custom agents. So you define a simple markdown file with the extension aagent.mmd and this gives you access to um a personalized um agent that the copilot cla can work with. But then another factor that makes copilot cla a really really powerful developer tool is the set of builtin agents that you get out of the box.
So without even doing any form of customizations, you get a set of powerful built-in agents starting from a dedicated research agent which just takes a topic from you, does its own deep research and gives you a final research report is the output and then you can take that report and handle it uh and pass it over to the plan agent. Now the plan agent will create a full implementation plan whether it's for a full system or a feature implementation. It will just output a plan that is ready to be built. And then we also have this last option of autopilot.
This is a mode that you should use with a lot of caution because the baseline is that you give it access to all the tools and then it will run independently up until a task is complete. So, what I'll spend some more time on is showing you some additional built-in tools that are not on this list. So, back on our back on our terminal here, I'm going to get into our previous project that is Key Mask and then I'm going to launch the Copilot CLI. From here, um, you'll see the first thing that I'm going to do is that I'm going to run the agent / aagent command.
You'll see that I don't have any custom agents built. And so, coincidentally, the tip for today is actually slash review, which is the first custom agent that I want to demonstrate. So with a code review agent, this basically performs a code review of your local changes before you push them to GitHub. So I'll run slash review and then I'm going to just um have the agent analyze the code changes that I've made. I see there's another security review um feature that is still in experimental mode. So this allows you to focus on security vulnerabilities in your changes.
But for now, I'm just going to stick with the slash review option. I'm going to send that in. And you'll see that the agent here recognizes that this is a request for the code review agent. It's a standalone built-in agent. It picks up the task and you will see it interacting with my code. So, it's running some shell commands. It's reading through my files. It will attempt to build and um and run the project. And then I do expect that in a short moment it will come back with some review findings that I can basically use to improve this code even before I get it off my computer.
So that's a really really useful feature. So in this case you see it comes back with some issues categorizes them as high, medium and low. So this is a really really good starting point. At this point I have several options. So I can choose to either have the agent work on these issues or either create GitHub issues for me to work on them one after the other or a third option that I will demonstrate to show us the next built-in agent which is the rubber duck agent right and I will use this rubber duck agent to get a second opinion on this code review.
So at this point I have my issues already identified. And so right here on Copilot CLI I'm going to explicitly use the rubber duck command. So what this does is that it runs an independent critique and I'll go in with a prompt that I want you to review the findings above compare them with my codebase and then surface any gaps. What will happen here is you'll see that my main agent is running using set 4.6 and so the main agent using set is going to recognize that I am sending this prompt directly to the rubber duck agent.
So it gathers some context from my codebase. It's going to read through the files. It will get the full context and then it's going to send that to the rubber duck agent. And then momentarily we're going to see the rubber duck agent kick in. And what you'll realize is that this agent is using is using GPT 5.4. So let's talk about what what is happening here. This robber agent is designed to enforce the cross model family validation. So what this means is my main agent here is using sonet 4.6 a model from the cloud family.
So the robber agent comes in with a model from a different family in this case GPT and just does a validation of what the previous model did. So what we end up having here is improved performance since we have different model families with their own set of strengths and weaknesses. So we sort of marry the two and get the best of both worlds. Now the team behind this feature actually published findings that with a combination of your base agent plus rubber duck you get a performance that is close to what you would get by using the OPAS models.
And we all know that the biggest challenge right now with OPAS models is how expensive they are. So you can easily get near OPAS level performance with this combination of the rubber duck agent. So we see that shortly it actually confirms some of the earlier issues. It identifies some false positives and it also surfaces some gaps which um it's able to um basically just enforce and give me a better outcome. So the next part of this demo is um the relationship between um humans and agents coding agents continues to evolve. So it's no longer one to one agent to human but it also evolves to be multi-agentic.
So out of the box with the copilot CLI you get an environment that supports a hierarchical structure. So you have a main agent that delegates tasks to sub agents. And so with that we'll get to the last last part of this demo where you can see that interactively I'm going to switch my model. So, my go-to model for everything code is GPT 5.5. I'll stick with the default context window and the reasoning effort. And then I'm going to go in and use the /fleet command. So, with this command, I'm going to ask the agent to address all the issues in the code and ensure that it has a master list that it will update as these issues are fixed.
and then at the end test the extension before it exits the loop. And what happens here is that my main agent GPT 5.5 is going to analyze my prompt, break it down into small problems, and then it's going to identify if we have problems that can be solved in parallel, if we have any dependencies, and then it's going to dispatch independent sub aents to work on the different parts of this problem. So you'll see that it dispatches three agents and I can use the /tasks command here to see the list of sub agents as they work in the background.
So this is particularly helpful um because these sub agents each have their own context window. So that means that whatever these sub agents are doing or their back and forth is not um accounted for in the main context window. So you'll see the agent now interacts with the sub agent in a managerial kind of role. So it's looking through how the agents work. And then at this point I am prompted to allow copilot to store or reserve memory. So what happens here is that we have copilot memory which allows copilot to save a persistent record of key details about my repository.
And this record is available across all the contributors in this repo. So if I have the cloud agent, the cloud agent sitting on GitHub, if I have um that party agents interacting with my repo, they all can reference this memory and just have a better understanding of what it is I'm trying to achieve. So we'll see this interaction, the main agent looking through the different sub agents, trying to understand the tasks as they get completed. It's going to validate that everything is completed as should and basically you get this out of the box with no additional customizations as you're using the copilot CLI.
So that of course will um will give you uh that will give you a final report. The agent will come back and report of all the tasks that have been completed and you can basically now have that kind of interaction with the agent. All right. So that's using copilot in an inter interactive mode. So the last part is how you can use copilot in its server mode. So this means you can run copilot CLI in the server mode. It's going to expose a JSON RPC port and allow you to connect your applications to local CLI sessions.
Now to see this in action, I hope that you can see my slides. To see this in action, we're going to briefly see the GitHub Copilot SDK, which allows you to programmatically connect to a a GitHub copilot CLI session. And the conversation now shifts from you building with AI to actually building AI using the CLI. So, let me show you what I mean by that statement. Now, this is the last demo. I'll show you a tool that I'm personally using to manage my courses. So, you can think of it as a tool for students. You can come in here, add your different courses, you can add your lecture notes, add your assessments, and I recently added this AI chat feature.
So, the whole idea is that you can have a chat layer on top of your academic documents. And the agent is going to reference your notes. I can ask questions about concepts that were covered, it will confirm which exact lectures talked about the said concept and so instead of worrying about building this agent runtime or this orchestration from scratch, I am using behind the scenes I'm using the copilot SDK, the GitHub copilot SDK to connect programmatically to GitHub copilot CLI. So if I switch to my terminal here and type copilot, I can easily see the list of sessions that I've had in the terminal.
So if I do / resume, you will see the conversation that I just had on my application appearing right here under the CLI sessions. So you will see the prompt that we just provided on the app. You can see the custom tool calls that it made. You can see the summary of the conversation that you had in the application. So the conversation again shifts from you building with AI to adding powerful AI experiences um into your applications using and leveraging the GitHub copilot CLI. So that's it regarding a deep dive into C-Pilot CLI. You've seen how you can set it up and get started.
You've seen the different modes that you can use to interact with the CLI either headless, interactively, or in server mode to power your applications. And I hope that you get an amazing time and that you get to try it out yourselves. So, thank you so much. That's all we have time for for this segment. I will now pass it back to Matt.
More from GitHub
Get daily recaps from
GitHub
AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.









