惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

The latest from GitHub Education - The GitHub Blog

GitHub for Beginners: How to get LLMs to do what you want GitHub for Beginners: How to get started with GitHub Copilot Supporting the next generation of developers Building LATAM’s future tech workforce with AI Beginner’s guide to GitHub: Merging a pull request Calling all teachers! Learn how to build new commands on the GitHub Classroom CLI Building a more inclusive GitHub Global Campus Working on a creative project? Unleash your originality and start to tinker with the Aspiring Creatives Experience Meet the GitHub Campus Experts selected for the fall 2022 MLH Fellowship Cohort, powered by GitHub
GitHub Copilot CLI for Beginners: Getting started with GitHub Copilot CLI
Christopher Harrison · 2026-04-11 · via The latest from GitHub Education - The GitHub Blog

Welcome to GitHub Copilot CLI for Beginners! In this series (available in video format and on the GitHub Blog), we’ll explore how to use your AI coding assistant directly in your terminal, along with tips and tricks on how to navigate the command line like a pro!

In this blog, we’ll walk through what GitHub Copilot CLI is, how it works, and how to get started. You’ll learn how to install it using npm, authenticate with your GitHub account, grant folder permissions, and run your first prompts to generate code directly from the terminal.

Let’s get started!

What is GitHub Copilot CLI?

The GitHub Copilot CLI brings Copilot’s agentic AI capabilities right into the command-line interface (CLI), becoming like any terminal or console based tool you use (with the full context of your repos)!

What makes agents so special is their ability to perform tasks like building code and running tests autonomously, so you can build iteratively. They can even self-correct and fix errors without needing a human to prompt them.

This means you can assign tasks to Copilot, focus on other to-do list items, and then review the results and request additional changes from the terminal—all without having to interrupt your workflow or switch tools. (You can even delegate tasks to Copilot Cloud agent from inside the CLI, more on this later.)

Installing Copilot CLI

Not surprisingly, the first step to using Copilot CLI is installation. The core cross-platform way—if you already have node—to do this is via npm, using:

npm install -g @github/copilot 

If you’re using a package manager like WinGet or Homebrew, you can install Copilot CLI through those tools as well. (You’ll want to consult those tools’ documentation for the exact specifics on how to do this.)

Getting started with GitHub Copilot CLI

Once you install the product, you can launch it by typing “Copilot” in your command line. There are numerous switches you can use, which we’ll cover later in the series.

If it’s your first time in the terminal, you’ll need to log in with your GitHub credentials.

This will:

  • Tie the client to your Copilot account.
  • Connect the readonly GitHub MCP server, which grants access to resources on GitHub. (Don’t worry, we’ll cover MCP later in the series as well!)

When using Copilot, you need to grant access to the folder for Copilot to be able to explore and potentially modify files. You can do this for only this session or save this setting to apply to later sessions, too. This will allow you to launch Copilot again in the future, without having to keep approving it for the same project.

Once you’ve done that, you can start talking to Copilot, asking it questions, and request code or other tasks.

Use cases: What you can do with Copilot CLI

Here are just a few GitHub Copilot CLI use cases. (There are many more covered in the GitHub Copilot CLI 101 blog!)

Ask for an overview of the project: Copilot will explore, open important files, and report back with its findings.

Give me an overview of this project 

Ask for code, such as a new endpoint: Copilot will look at the project, find existing documentation and examples, and try to follow the practices it sees. Again, it will ask for permission to create the file.

Let’s add a new endpoint to return all categories

Delegate tasks to Copilot cloud agent: For well-defined tasks, you can delegate to Copilot cloud agent right from the CLI. Copilot will preserve the context from your current session, create a new branch, open a draft pull request, and make the requested changes in the background before requesting your review.

/delegate Let’s deal with issue #14 to add the rest of the CRUD endpoints to games

Of course, one of the best ways to explore what you can do with Copilot CLI is to simply ask Copilot. It can look through its own documentation and provide guidance on the best ways to interact with it and explore.

Tune in for the next lesson in the series which covers using two different modes: interactive mode to have GitHub Copilot run your project locally or non-interactive mode with the -p flag for quick summaries without leaving your shell context.

Take this with you

Bringing agentic AI right to your terminal opens a whole new way to learn, experiment, and get things done without ever breaking your flow. Keep an eye out for more videos in the GitHub Copilot CLI for Beginners series, where we’ll learn about:

  • Interactive vs non-interactive modes
  • Copilot CLI slash commands
  • Using MCP servers with Copilot CLI
  • And more!

Happy coding!

Looking to try GitHub Copilot CLI? Read the Docs and get started today.

More resources to explore:


Written by

Christopher Harrison

Senior Developer Advocate, GitHub

Related posts

Explore more from GitHub

Docs

Docs

Everything you need to master GitHub, all in one place.

Go to Docs

GitHub

GitHub

Build what’s next on GitHub, the place for anyone from anywhere to build anything.

Start building

Customer stories

Customer stories

Meet the companies and engineering teams that build with GitHub.

Learn more

The GitHub Podcast

The GitHub Podcast

Catch up on the GitHub podcast, a show dedicated to the topics, trends, stories and culture in and around the open source developer community on GitHub.

Listen now