GitHub Copilot CLI

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

v1.0.78  ยท  Claude Opus 5 (default)  ยท  August 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 all timeline items
Ctrl+EExpand all timeline items
Ctrl+GEdit prompt in external editor
Ctrl+LClear terminal screen without clearing session New
Ctrl+X โ†’ BMove running task/shell to background New
Ctrl+YIn plan mode, opens most recent research report New
EscCancel current operation
โ†‘ / โ†“Navigate command history (includes past shell commands in normal mode) New
Ctrl+RSearch command history including shell commands (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
s (in picker)Cycle session sort order (relevance/last used/created/name) New
Ctrl+CCancel operation (ร—2 to exit session) New
Ctrl+DExit interactive session (no longer queues messages) New
Ctrl+Q / Ctrl+EnterQueue message to submit 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
Alt+ScrollScroll one line at a time (Option on macOS) New
Ctrl+F / Ctrl+BPage down/up in scrollable views New
w (in /diff)Hide whitespace-only changes in diff view New
n / N (in /diff)Navigate to next/previous match in diff search New
/ (in Issues/PR)Search GitHub with server-side filtering 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 5, Sonnet 4.6, Sonnet 4.5, Opus 4.8 Fast, Opus 4.8, Fable 5, kimi-k2.7-code, grok-4.5, GPT-5.6, GPT-5.4, gemini-3.6-flash, etc.) New
/planCreate implementation plan before coding
/autopilot / /goalToggle autopilot mode or set a specific objective; /goal is an alias New
/reviewRun code review agent on changes
/security-reviewReview code changes for security vulnerabilities New
/delegatePush work to Copilot coding agent (cloud)
/fleetParallel subagent execution
/fork / /branchFork current session into new independent session (/branch is alias) New
/researchDeep research with web + GitHub sources
/diffReview all changes in current directory
/undoUndo the last turn and revert file changes New
/refineRewrite a rough, stream-of-consciousness prompt into a clear one New
/rewindTimeline picker to roll back to any point in conversation history New
/prCreate PRs, fix CI failures, address review feedback, resolve conflicts New
/worktreeCreate new git worktree and switch to it (alias: /move) New
/new-worktreeCreate a new worktree and start a new conversation in it (experimental) New
/compactCompress context to free token space
/agentBrowse and select custom agents
/subagentsConfigure subagent model, reasoning effort, and context tier (alias: /agents) New
/skills / /skillList, enable, disable, add, remove skills (/skill is alias) New
/mcpAdd, edit, enable, disable, reload, auth, list MCP servers New
/remoteManage remote session connections and status 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
/pluginsDashboard to manage installed plugins New
/resumeResume a previous session
/shareExport session to file, GitHub gist, or HTML New
/copyCopy the last response to clipboard New
/askAsk a quick question without affecting conversation history New
/rubber-duckGet an independent critique of the agent's current work New
/contextShow token usage visualization
/usageSession metrics and statistics
/chronicleShow session timeline and command history New
/chronicle searchSearch all session content by keyword or topic New
/chronicle skills reviewReview proposed draft skill changes with options to accept, reject, or defer New
/chronicle cost-tipsPersonalized token usage and cost reduction recommendations New
/tasksView and manage background tasks New
/afterSchedule task to run after specified time (experimental) New
/everySchedule recurring task with cron or natural language (experimental) New
/changelogView recent release notes and updates New
/ideConnect to an IDE workspace
/lspManage language server configuration
/clearClear session history and context New
/settingsBrowse and edit all user settings in one place New
/cwd / /cdShow or change working directory (/cd persists directory on session resume) New
/add-dirAdd directory for file access New
/list-dirsShow allowed directories New
/sessionDisplay current session info New
/session idDisplay current session ID and copy to clipboard New
/session renameRename current session (auto-generates name if not provided) New
/envShow loaded environment (instructions, MCP servers, skills, agents, plugins) New
/memoryEnable, disable, or view memory status with on/off/show options New
/statuslineCustomize status bar items (directory, branch, effort, context, quota) โ€” alias: /footer New
/themeConfigure terminal theme (auto/dark/light) New
/terminal-setupEnable multiline input mode New
/voiceConfigure voice mode settings including microphone device selection New
/permissionsSwitch between approval modes (allow-all, auto, manual) New
/reset-allowed-toolsReset all tool permissions New
/userShow, list, or switch GitHub accounts New
/limitsView or manage AI credit limits; use /limits predict to suggest limits from similar sessions New
/login / /logoutSign in or out of Copilot New
/exit / /quitExit the CLI session ('exit' or 'quit' as bare commands also work; use /exit print to print session before exiting) New
/helpShow all available commands and shortcuts New
/feedbackSubmit feedback to GitHub New
/keep-alivePrevent system sleep while CLI active New
/appOpen the GitHub app or browser fallback New
/remoteShow remote control status or toggle with on/off New
CLI Flags (Command Line)
FlagPurpose
-p "prompt"Programmatic mode โ€” execute and exit
-C <directory>Change working directory before starting, similar to git -C New
--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] / -r [ID]Resume a specific session (-r is shorthand) New
--session-id <ID>Resume known session/task or start new session with specific UUID New
--name NAMEName a session on start New
--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)
--mode MODEStart directly in a specific agent mode New
--planStart directly in plan mode New
--max-autopilot-continues NCap autopilot continuations (default: 5) New
--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
--print-debug-infoDisplay version, terminal capabilities, and environment variables New
--connect IDDirectly connect to a remote session by ID New
--list-envLog loaded plugins, agents, skills, and MCP servers in prompt mode New
--sandbox / --no-sandboxTurn OS-level shell sandbox on/off for current session only (doesn't change saved setting) New
--config-dir PATHSpecify custom config directory โ€” deprecated, use COPILOT_HOME env var Deprecated
--session-idle-timeout SECONDSConfigure session idle timeout (disabled by default) New
CLI Subcommands (Outside Session)
CommandPurpose
copilot completion bashGenerate Bash completion script New
copilot completion zshGenerate Zsh completion script New
copilot completion fishGenerate Fish completion script New
copilot loginAuthenticate with GitHub
copilot logoutSign out of GitHub
copilot plugin installInstall a plugin
copilot plugin updateUpdate installed plugins
copilot plugin listList installed plugins
copilot plugin uninstallRemove a plugin
copilot plugin marketplaceManage plugin marketplaces (list, add, remove, browse, update) New
copilot mcp addAdd an MCP server
copilot skillList, add, and remove skills from file, URL, or directory New
copilot helpShow CLI help
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