GitHub Copilot CLI

The complete reference โ€” every surface, every config, every command. One page.

v1.0.17  ยท  Claude Sonnet 4.5 (default)  ยท  April 2026


Section 1

The GitHub Copilot Ecosystem

Every surface where GitHub Copilot shows up โ€” from your terminal to the cloud.

โŒจ๏ธ
Copilot CLI
Terminal
Full agentic coding agent in your terminal. Plan, build, debug, refactor, and ship โ€” all from the command line. Powered by the same harness as Copilot coding agent. Docs โ†—
Agent Mode Plan Mode Autopilot Subagents MCP Skills Plugins Custom Agents Hooks LSP Fleet Mode Deep Research /delegate ACP Server
๐Ÿค–
Copilot Coding Agent
Cloud
Async AI teammate on GitHub. Assign issues to Copilot, it spins up a dev environment in GitHub Actions, writes code, creates PRs, and requests your review. Docs โ†—
Issue Assignment Auto PR Creation GitHub Actions Runtime Custom Agents MCP Skills Hooks Copilot Memory Agents Panel
๐Ÿ’ป
VS Code
IDE
The flagship Copilot experience. Agent mode for autonomous multi-file edits, inline completions, chat panel, next edit suggestions, and vision capabilities. Docs โ†—
Agent Mode Chat Panel Inline Completions Next Edit Suggestions Multi-file Edits MCP Servers Custom Agents Subagents Vision Custom Instructions
๐Ÿ”ง
JetBrains IDEs
IDE
IntelliJ, PyCharm, WebStorm, Rider, etc. Agent mode GA with custom agents, subagents, plan mode, and full agentic capabilities. Docs โ†—
Agent Mode (GA) Chat Completions Custom Agents Subagents Plan Mode MCP
๐Ÿข
Visual Studio
IDE
Enterprise .NET powerhouse. Agent mode, chat, code completions, and code review integration for C#, .NET, C++, and more.
Agent Mode Chat Completions Code Review Custom Instructions
โ˜•
Eclipse
IDE
Java ecosystem support with agent mode now generally available. Autonomous multi-step task execution and chat.
Agent Mode (GA) Chat Completions
๐ŸŽ
Xcode
IDE
Apple development with Copilot. Agent mode GA for Swift and Objective-C with autonomous code changes.
Agent Mode (GA) Completions
๐Ÿ“Ÿ
Neovim / Vim
Editor
Lightweight terminal editor integration. Inline completions and chat via the official Copilot.vim plugin.
Completions Chat
๐ŸŒ
GitHub.com
Web
Copilot embedded across GitHub.com โ€” Chat, PR summaries, code review with AI suggestions, code search, issue triage, and knowledge bases.
Copilot Chat PR Summaries Code Review Code Completion Issue Triage Knowledge Bases Agents Panel
๐Ÿ“ฑ
GitHub Mobile
Mobile
Copilot Chat on iOS and Android. Ask questions about repos, assign issues to coding agent on the go.
Copilot Chat Assign to Agent
๐Ÿ”Œ
Copilot Extensions
Platform
Third-party integrations in Copilot Chat. Docker, Sentry, Jira, Confluence, and more โ€” interact with your dev tools via natural language.
3rd Party Tools Chat Integration API-based Marketplace
๐Ÿ”—
ACP (Agent Client Protocol)
Protocol
Open standard for interacting with AI agents. Use Copilot CLI as an agent in any third-party tool, IDE, or automation system that supports ACP.
Open Standard External Integrations copilot --acp

Section 2

Configuring & Customizing Copilot CLI

Every lever you can pull โ€” instructions, skills, hooks, agents, plugins, extensions, and more.

๐Ÿ“‹
Repository Instructions
Scope: Entire repo ยท Always loaded
Persistent, repo-wide guidance loaded at session start. Coding standards, conventions, build commands, preferred patterns. Applied to every prompt automatically. Docs โ†—
.github/copilot-instructions.md
๐ŸŽฏ
Path-based Instructions
Scope: Matching files ยท Contextual
File-pattern specific instructions with applyTo glob in YAML frontmatter. Target TypeScript files, test directories, API routes, etc. Combines with repo-wide instructions.
.github/instructions/**/*.instructions.md
๐Ÿค–
Agent Instructions
Scope: Repo root / CWD ยท Primary
Multi-agent instruction files at repo root. Supports AGENTS.md, CLAUDE.md, and GEMINI.md. Root-level files are treated as primary instructions.
AGENTS.md ยท CLAUDE.md ยท GEMINI.md
๐Ÿ 
Local / Personal Instructions
Scope: All projects ยท User-level
Personal preferences applied across all repos. Coding style, communication preferences, tool choices. Also supports COPILOT_CUSTOM_INSTRUCTIONS_DIRS env var.
~/.copilot/copilot-instructions.md
โšก
Skills
Scope: On-demand ยท Task-specific
Folders of instructions, scripts, and resources loaded when relevant. SKILL.md with YAML frontmatter (name + description). Invoke with /skill-name or auto-detected. Open standard (agentskills spec). Docs โ†—
.github/skills/<name>/SKILL.md ยท ~/.copilot/skills/
๐Ÿ”Œ
MCP Servers
Scope: Session ยท Extensibility
Model Context Protocol servers provide external tools and data sources. GitHub MCP server is built-in. Add custom servers for DBs, APIs, calendars, ticketing systems. Manage with /mcp add. Docs โ†—
~/.copilot/mcp-config.json ยท /mcp add
๐Ÿช
Agent Hooks
Scope: Repository ยท Lifecycle events
Execute custom shell commands at key points: sessionStart, sessionEnd, preToolUse, postToolUse, userPromptSubmitted, agentStop, subagentStop, errorOccurred. Approve/deny tools programmatically, add logging, security scanning. Docs โ†—
.github/hooks/*.json
๐Ÿง‘โ€๐Ÿ’ผ
Custom Agents
Scope: Repo / User / Org ยท Specialist personas
Define specialized personas in Markdown with YAML frontmatter: role, allowed tools, MCP connections, infer: true for auto-delegation. React reviewer, docs writer, security auditor, etc.
.github/agents/ ยท ~/.copilot/agents/ ยท .github-private/agents/
๐Ÿ‘ฅ
Built-in Subagents
Scope: System ยท Always available
Pre-built specialized agents the CLI auto-delegates to: explore (codebase analysis), task (commands/builds), general-purpose (complex tasks), code-review (change analysis), research (deep investigation).
Automatic ยท /fleet for parallel execution
๐Ÿ“ฆ
Plugins
Scope: Installable bundles ยท New!
Packages that deliver agents + skills + hooks + MCP configs in one install. plugin.json manifest. Install from repos or marketplaces. Update, list, uninstall via /plugin. Docs โ†—
plugin.json ยท copilot plugin install ./my-plugin
๐Ÿช
Plugin Marketplace
Scope: Distribution ยท Registry
Registry of plugins in a Git repo. marketplace.json in .github/plugin/. Users add with /plugin marketplace add org/repo. Official marketplaces: github/copilot-plugins, github/awesome-copilot.
.github/plugin/marketplace.json
๐Ÿงฉ
Extensions New
Scope: Session ยท Experimental
Ask Copilot to write custom tools and hooks for itself using the @github/copilot-sdk. Extend the CLI with your own capabilities beyond built-in features. Enable with /experimental on. Added in v1.0.3. Changelog โ†—
/experimental on ยท @github/copilot-sdk
๐Ÿ”
LSP Servers
Scope: Code intelligence ยท Per-language
Language Server Protocol for go-to-definition, hover info, diagnostics. Configure per language with command, args, and file extension mappings. Manage with /lsp.
~/.copilot/lsp-config.json ยท .github/lsp.json
๐Ÿง 
Copilot Memory
Scope: Persistent ยท Automatic learning
Copilot builds persistent understanding of your repository by storing "memories" โ€” coding conventions, patterns, and preferences deduced while working. Reduces repetitive context in prompts.
Automatic ยท Persistent across sessions

๐Ÿงญ When to Use What?

Requirement Best Option
Copilot should always follow our repo conventionsCustom Instructions
I want a repeatable workflow I can invoke on demandSkills
I want guardrails, policy, or automation around tool useHooks
I need Copilot to use tools from an external serviceMCP Servers
I want Copilot to operate as a specialist for certain tasksCustom Agent
I want to add a package of functionality without manual configPlugin
I want to share plugins with my team or publiclyPlugin Marketplace
I want rich code intelligence (go-to-def, diagnostics)LSP Servers

Section 3

Quick Start & Usage Guide

Install, launch, and master โ€” every command, shortcut, and workflow pattern.

Installation
macOS / Linux (script)
curl -fsSL https://gh.io/copilot-install | bash
Homebrew
brew install copilot-cli
Windows (WinGet)
winget install GitHub.Copilot
npm (cross-platform)
npm install -g @github/copilot
Modes (Shift+Tab to cycle)
Interactive
Default
Conversational โ€” Copilot asks before each action. You review and approve tool use step by step.
Plan
Shift+Tab
Structured planning โ€” Copilot analyzes your request, asks clarifying questions, builds a plan before writing code.
Autopilot
Shift+Tab ร—2
Autonomous โ€” Copilot continues working until the task is complete. Experimental feature.
Typical Demo Flow
1
Launch
copilot
โ†’
2
Trust & Auth
/login
โ†’
3
Init Repo
/init
โ†’
4
Give Task
Prompt
โ†’
5
Agent Works
Read โ†’ Edit โ†’ Run
โ†’
6
Review
/diff
โ†’
7
Ship It
/delegate ยท git push
Essential Shortcuts
ShortcutAction
@fileInclude file contents in context
#issueReference GitHub issues, PRs, discussions New
!cmdRun shell command directly
&promptDelegate to coding agent
Shift+TabCycle modes (interactive โ†’ plan โ†’ autopilot)
Ctrl+SRun command while preserving input
Ctrl+TToggle reasoning display
Ctrl+OExpand recent timeline
Ctrl+EExpand all timeline items
Ctrl+GEdit prompt in external editor
Ctrl+LClear screen
EscCancel current operation
โ†‘ / โ†“Navigate command history
Ctrl+RSearch command history (reverse incremental search) New
Ctrl+ZSuspend/resume (Unix platforms) New
Esc-EscRewind file changes to any previous snapshot New
TabResume local & remote coding agent sessions New
Ctrl+CCancel operation (ร—2 to exit session) New
Ctrl+DExit interactive session (Unix-style) New
Shift+EnterInsert line break in prompt (Kitty protocol terminals) New
Ctrl+EnterSubmit multiline prompt New
Page Up / DownScroll in alt-screen mode; navigate in diff viewer New
Ctrl+F / Ctrl+BPage down/up in scrollable views New
Home / EndJump to top/bottom of scroll buffer; navigate in diff viewer New
Ctrl+AMove cursor to beginning of line New
Ctrl+KDelete from cursor to end of line New
Ctrl+UDelete from cursor to beginning of line New
Ctrl+WDelete word before cursor New
Ctrl+HDelete character before cursor New
Alt+โ† / โ†’Move cursor by word New
Key Slash Commands
CommandPurpose
/initInitialize copilot instructions for the repo
/modelSelect AI model (Sonnet 4.6, Sonnet 4.5, GPT-5.4, etc.)
/planCreate implementation plan before coding
/reviewRun code review agent on changes
/delegatePush work to Copilot coding agent (cloud)
/fleetParallel subagent execution
/researchDeep research with web + GitHub sources
/diffReview all changes in current directory
/undoUndo the last turn and revert file changes New
/rewindTimeline picker to roll back to any point in conversation history New
/prCreate PRs, fix CI failures, address review feedback, resolve conflicts New
/compactCompress context to free token space
/agentBrowse and select custom agents
/skillsList, enable, disable, add, remove skills
/mcpAdd, edit, enable, disable, reload, auth MCP servers New
/extensionsView, enable, and disable CLI extensions New
/restartHot restart CLI while preserving session New
/updateView changelog and update instructions New
/versionDisplay CLI version and check for updates New
/pluginInstall, update, list, uninstall plugins
/resumeResume a previous session
/shareExport session to file, GitHub gist, or HTML New
/copyCopy the last response to clipboard New
/contextShow token usage visualization
/usageSession metrics and statistics
/chronicleShow session timeline and command history New
/tasksView and manage background tasks New
/changelogView recent release notes and updates New
/ideConnect to an IDE workspace
/lspManage language server configuration
/clearClear session history and context New
/cwdShow or change working directory New
/add-dirAdd directory for file access New
/list-dirsShow allowed directories New
/sessionDisplay current session info New
/themeConfigure terminal theme (auto/dark/light) New
/terminal-setupEnable multiline input mode New
/reset-allowed-toolsReset all tool permissions New
/userShow, list, or switch GitHub accounts New
/login / /logoutSign in or out of Copilot New
/exit / /quitExit the CLI session ('exit' or 'quit' as bare commands also work) New
/helpShow all available commands and shortcuts New
/feedbackSubmit feedback to GitHub New
CLI Flags (Command Line)
FlagPurpose
-p "prompt"Programmatic mode โ€” execute and exit
--autopilotEnable autonomous continuation
--yoloAllow all permissions (alias: --allow-all)
--model MODELSelect AI model
--agent AGENTUse a specific custom agent
--continueResume most recent session
--resume [ID]Resume a specific session
--allow-tool 'X'Pre-approve specific tools
--deny-tool 'X'Block specific tools
--experimentalEnable experimental features
--acpStart Agent Client Protocol server
-s / --silentOutput only agent response (scripting)
--max-autopilot-continues NCap autopilot continuations
--no-custom-instructionsSkip loading instruction files
--share [PATH]Export session transcript to markdown file New
--share-gistExport session to shareable GitHub gist New
--available-toolsAllowlist specific tools for the session New
--excluded-toolsDenylist specific tools for the session New
--additional-mcp-configAdd MCP config files per-session New
--output-format jsonEmit JSONL in prompt mode for programmatic integrations New
--plugin-dir PATHLoad a plugin from a local directory New
--binary-versionQuery CLI binary version without launching New
--mouse / --no-mouseEnable/disable mouse mode in alt screen New
--bash-envSource BASH_ENV in shell sessions New
--alt-screen on/offControl alternate screen buffer mode New
Deprecated Commands
CommandStatus
gh copilot suggest / gh csRemoved Oct 2025 โ€” replaced by Copilot CLI interactive mode Deprecated
gh copilot explain / gh ceRemoved Oct 2025 โ€” replaced by Copilot CLI interactive mode Deprecated
gh-copilot extensionFully deprecated Oct 25, 2025 โ€” migrate to standalone Copilot CLI Deprecated
Programmatic Examples
# Quick one-shot task copilot -p "Add error handling to src/api.ts" --yolo # Autonomous with limits copilot --autopilot --yolo --max-autopilot-continues 10 \ -p "Fix all failing tests" # Specific permissions copilot --allow-all-tools --deny-tool 'shell(rm)' \ --deny-tool 'shell(git push)' # Use a custom agent copilot --agent=security-auditor -p "Audit this codebase" # Resume last session copilot --continue # Pipe options from a script ./my-options.sh | copilot
Repository Configuration Structure
# Your repository my-project/ โ”œโ”€โ”€ .github/ โ”‚ โ”œโ”€โ”€ copilot-instructions.md # Repo-wide instructions โ”‚ โ”œโ”€โ”€ instructions/ โ”‚ โ”‚ โ”œโ”€โ”€ typescript.instructions.md # Path-based (applyTo: "**/*.ts") โ”‚ โ”‚ โ””โ”€โ”€ tests.instructions.md # Path-based (applyTo: "**/*.test.*") โ”‚ โ”œโ”€โ”€ skills/ โ”‚ โ”‚ โ””โ”€โ”€ deploy/ โ”‚ โ”‚ โ””โ”€โ”€ SKILL.md # Skill definition โ”‚ โ”œโ”€โ”€ agents/ โ”‚ โ”‚ โ””โ”€โ”€ reviewer.agent.md # Custom agent โ”‚ โ”œโ”€โ”€ hooks/ โ”‚ โ”‚ โ””โ”€โ”€ security.json # Hook configuration โ”‚ โ”œโ”€โ”€ plugin/ โ”‚ โ”‚ โ””โ”€โ”€ marketplace.json # Plugin marketplace โ”‚ โ””โ”€โ”€ lsp.json # LSP server config โ”œโ”€โ”€ AGENTS.md # Agent instructions โ””โ”€โ”€ ... # Your home directory ~/.copilot/ โ”œโ”€โ”€ copilot-instructions.md # Personal instructions โ”œโ”€โ”€ mcp-config.json # MCP server config โ”œโ”€โ”€ lsp-config.json # LSP config (user-level) โ”œโ”€โ”€ config.json # CLI settings โ”œโ”€โ”€ skills/ # Personal skills โ””โ”€โ”€ agents/ # Personal agents