GitHub Copilot
GitHub / Microsoft
An AI coding assistant co-developed by GitHub and OpenAI, offering code completion, chat, and an Agent mode.
Overview
GitHub Copilot is an AI coding assistant co-developed by GitHub and OpenAI that can autocomplete code based on context, generate functions, optimize logic, and even write entire code modules. As the earliest AI coding tool to be commercialized at scale, it is deeply integrated into mainstream IDEs such as VS Code, JetBrains, and Visual Studio. In 2026 it added Copilot Agent mode, which can autonomously complete end-to-end tasks like fixing issues and creating PRs. Note: starting June 1, 2026, Copilot subscription plans switched to a usage-based billing model.
Core features: deep IDE integration, code completion, Copilot Chat, Agent mode, mature ecosystem.
Installation
Using VS Code as an example: search for and install the official Copilot extension from the marketplace, restart the editor, then sign in to your GitHub account and authorize via the command palette. When the status bar shows "Copilot Enabled", you're set. The JetBrains family works the same way.
# VS Code installation steps
1. Open VS Code → Extensions panel on the left (Cmd/Ctrl+Shift+X)
2. Search for "GitHub Copilot" → install the official extension
3. Restart VS Code
4. Cmd/Ctrl+Shift+P → type "GitHub Copilot: Sign In"
5. Browser redirects to GitHub for authorization → status bar shows "Copilot Enabled"
# Command-line install (optional)
code --install-extension GitHub.copilot
code --install-extension GitHub.copilot-chatRequires a GitHub account and a Copilot subscription (the individual tier has a free quota; students and open-source maintainers can use it for free).
Basic Usage
Copilot's core capabilities are Ghost Text real-time completion (press Tab to accept), Copilot Chat (Cmd/Ctrl+I), and inline editing. Describe your needs in natural language in a comment and Copilot will generate the corresponding code; select code and ask Chat to explain, refactor, or add tests.
# Write a comment in the editor and code is generated automatically
# Create a function: takes a date and returns how many days from today
def days_from_now(date_str):
# Copilot will autocomplete the implementation
...
# Copilot Chat (open with Cmd/Ctrl+I)
"Explain what this code does"
"Write unit tests for this function using pytest"
"Rewrite this callback style as async/await"
# Inline completion: press Tab to accept, Esc to dismissPress Alt+] / Alt+[ to cycle through completion suggestions; press Cmd/Ctrl+Enter to see the full suggestion list.
Tips
Copilot's completion quality depends heavily on context: opening related files, writing clear comments, and using well-named variables all improve results. Copilot Chat supports @workspace to reference the entire workspace and #file to reference a specific file. The 2026 Agent mode lets you @copilot directly in an issue to have it fix and submit a PR autonomously. Note that under usage-based billing, it's worth keeping an eye on the usage dashboard.
# Copilot Chat context references
"@workspace Where is the database connection initialized in this project?"
"#file:src/auth.ts Add input validation to this file"
# Summon the Agent in a GitHub issue
# In the comment box type: @copilot fix this issue
# Copilot will analyze, edit code, and submit a PR autonomously
# View usage
# github.com → Settings → Copilot → UsageTip: Always review completion suggestions—AI may produce outdated APIs or insecure code; for sensitive projects, pay attention to data privacy settings.
Configuration
GitHub Copilot is configured through the IDE extension settings and your GitHub account. Subscription plans use usage-based billing, so the usage dashboard (github.com -> Settings -> Copilot -> Usage) matters. Model selection, Agent mode, and Code Review are toggled in the Copilot panel, and @workspace / #file references control context. Privacy settings govern whether snippets are sent to GitHub for suggestions.
# Model selection
# Copilot panel -> model dropdown -> pick GPT / Claude, etc.
# Agent mode (fix issues and open PRs)
# In a GitHub issue comment: @copilot fix this issue
# Context references in Copilot Chat
"@workspace Where is the DB connection initialized?"
"#file:src/auth.ts Add input validation"
# Privacy settings
# VS Code -> Settings -> GitHub Copilot -> enable/disable telemetry
# "Allow GitHub to use my code snippets for suggestions"
# View usage (usage-based billing)
# github.com -> Settings -> Copilot -> UsageUnder usage-based billing, keep an eye on the usage dashboard; Agent mode and long chats consume the most.
FAQ
Common questions cover subscription plans, student/free access, Agent mode, model selection, and data privacy. Copilot is free for verified students and maintainers of popular open-source projects. Agent mode lets you @copilot in an issue to get an autonomous fix and PR. Privacy settings control whether code snippets leave your machine.
Q: Is Copilot free?
A: There is a free tier with a monthly quota; verified students and
maintainers of popular open-source repos get it free.
Q: How does usage-based billing work?
A: Plans bill by usage (completions, chats, agent runs); monitor spend at
github.com -> Settings -> Copilot -> Usage.
Q: What is Agent mode?
A: Type @copilot in a GitHub issue and it analyzes, edits code, and opens
a PR autonomously.
Q: Can I choose the model?
A: Yes—pick from the model dropdown in the Copilot panel (GPT, Claude, etc.).
Q: Is my code sent to GitHub?
A: Snippets are sent for suggestions unless you disable it in privacy
settings; enterprise plans offer stricter data controls.Always review AI suggestions—models may produce outdated APIs or insecure code.
More AI Guides
Claude Code
A terminal-native AI coding agent from Anthropic that autonomously understands codebases, edits files, runs commands, and completes multi-step development tasks.
OpenAI Codex
An official command-line AI coding assistant from OpenAI, built on the GPT model family and optimized for code generation and development workflows.
Trae
ByteDance's AI-native IDE—the first of its kind in China—deeply integrates LLMs such as Doubao and DeepSeek, supporting natural-language interaction and multimodal collaboration.
Cursor
A next-generation AI code editor from Anysphere with a built-in Composer agent that can run multiple coding tasks in parallel.
Windsurf
An AI-native IDE from Codeium with a built-in Cascade agent that deeply couples the terminal and editor.
Aider
An open-source command-line AI coding assistant with deep Git integration—every change is auto-committed and can be rolled back in one step.