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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

The GitHub Blog

Investigating unauthorized access to GitHub-owned repositories Take your local GitHub sessions anywhere Building a general-purpose accessibility agent—and what we learned in the process Raising the bar: Quality, shared responsibility, and the future of GitHub’s bug bounty program GitHub availability report: April 2026 From latency to instant: Modernizing GitHub Issues navigation performance Dungeons & Desktops: 10 roguelikes that never die (because their communities won’t let them) GitHub Copilot individual plans: Introducing flex allotments in Pro and Pro+, and a new Max plan Dungeons & Desktops: Building a procedurally generated roguelike with GitHub Copilot CLI GitHub for Beginners: Getting started with OSS contributions Why age assurance laws matter for developers How researchers are using GitHub Innovation Graph data to reveal the “digital complexity” of nations Improving token efficiency in GitHub Agentic Workflows Agent pull requests are everywhere. Here’s how to review them. Validating agentic behavior when “correct” isn’t deterministic Welcome to Maintainer Month: Celebrating the people behind the code Register now for OpenClaw: After Hours @ GitHub GitHub Copilot CLI for Beginners: Interactive v. non-interactive mode GitHub for Beginners: Getting started with Markdown Securing the git push pipeline: Responding to a critical remote code execution vulnerability An update on GitHub availability GitHub Copilot is moving to usage-based billing Changes to GitHub Copilot Individual plans Highlights from Git 2.54 Building an emoji list generator with the GitHub Copilot CLI Bringing more transparency to GitHub’s status page How GitHub uses eBPF to improve deployment safety Build a personal organization command center with GitHub Copilot CLI Developer policy update: Intermediary liability, copyright, and transparency Hack the AI agent: Build agentic AI security skills with the GitHub Secure Code Game How exposed is your code? Find out in minutes—for free GitHub for Beginners: Getting started with GitHub Pages GitHub availability report: March 2026 GitHub Universe is back: We want you to take the stage GitHub Copilot CLI combines model families for a second opinion The uphill climb of making diff lines performant Securing the open source supply chain across GitHub Run multiple agents at once with /fleet in Copilot CLI Agent-driven development in Copilot Applied Science GitHub for Beginners: Getting started with GitHub security What’s coming to our GitHub Actions 2026 security roadmap
GitHub Copilot CLI for Beginners: Getting started with GitHub Copilot CLI
2026-04-10 · via The GitHub Blog

GitHub for Beginners: Getting started with the GitHub Copilot CLI, a step-by-step tutorial.

|

4 minutes

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.

/login

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

We do newsletters, too

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.