GitHub 官方:Copilot CLI 新手入門——npm 安裝、/login、第一個提問
GitHub Copilot CLI for Beginners: Getting started with GitHub Copilot CLI
摘要分析
GitHub 2026-04-10 的 Copilot CLI 新手系列首篇,介紹在終端機跑的 AI 助手:能存取 repo、執行建置與測試等多步驟任務,也能把工作交給雲端 coding agent 開草稿 PR。步驟極簡:npm install -g @github/copilot → cd 到專案輸入 copilot → 授權資料夾 → /login 登入 GitHub → 輸入「Give me an overview of this project」讓它導覽專案。對 Claude Code 使用者而言操作模式幾乎相同,是比較兩家 CLI 的好起點。
- npm install -g @github/copilot
- cd 專案資料夾 → copilot → 授權資料夾
- session 內 /login 登入 GitHub
- 第一句:Give me an overview of this project
- 可把任務交給雲端 coding agent 開草稿 PR
Published 2026-04-10 by Christopher Harrison, this first post of the GitHub Copilot CLI for Beginners series introduces an AI assistant that runs in your terminal with access to your repositories, performs multi-step tasks such as building code and running tests, and can delegate work to the Copilot cloud agent, which opens a draft pull request for review. Setup is minimal: npm install -g @github/copilot (requires Node.js), cd into your project folder and run copilot, grant access to the folder for this session or permanently, type /login inside the session to authenticate with your GitHub account, then ask 'Give me an overview of this project' to have it walk you through the codebase. For Claude Code users the interaction model is nearly identical, making it a good basis for comparing the two CLIs.
- npm install -g @github/copilot
- cd into project, run copilot, grant access
- /login inside the session
- Ask for a project overview first
- Delegate to the cloud coding agent for a draft PR
關鍵字:Copilot CLI終端機GitHubnpmcoding agent
來源原文:https://github.blog/ai-and-ml/github-copilot/github-copilot-cli-for-beginners-getting-started-with-github-copilot-cli/
本頁為報導內容的摘要與分析,版權屬原媒體所有;請以原文為準。
