Getting Started
You can activate Copilot in your terminal using one of two methods:| Method | Requirements | Key Commands |
|---|---|---|
| GitHub CLI | GitHub Copilot subscription, GitHub CLI installed | brew install gh gh extension install github/gh-copilot |
| Windows Terminal Canary | Windows Terminal Canary build | Configure Copilot in Terminal settings |
1. GitHub CLI Method
A GitHub Copilot subscription is required (free for eligible users).

- Install GitHub CLI
- Authenticate to GitHub
- Install Copilot extension
- Verify setup
2. Windows Terminal Canary Method

- Install Windows Terminal Canary from the Microsoft Store.
- Open Settings → Copilot and Sign in with GitHub.
- Restart the terminal to enable AI suggestions natively.
Context & Prompting
Copilot’s prompt is the code and comments around your cursor. Better context means smarter suggestions. Copilot now:- Extracts nearby code, open tabs, and imports
- Scans project files for relevant patterns
- Achieves a ~35% acceptance rate on prompts (vs. ~20% at preview)
Command-Line Features
- Explain: Summarize commands in plain English.
- Suggest: Generate ready-to-use commands.
- Chat: Interactive Q&A via
gh copilot chat.
Shell Aliases
Save keystrokes by defining shortcuts in your shell config:
| Shell | Config File | Alias Example |
|---|---|---|
| Bash | ~/.bashrc | alias ghcs="gh copilot suggest" |
| Zsh | ~/.zshrc | alias ghce="gh copilot explain" |
| PowerShell | Profile script | Set-Alias ghcs gh copilot suggest |
source ~/.bashrc or restart) to apply.
Practical Use Cases

- Git Workflows: Branch creation, commit messages, conflict resolution.
- SysAdmin Tasks: File ops, permissions, process control.
- Error Debugging: Convert cryptic errors into actionable fixes.
VS Code Integration
Copilot extends into VS Code’s integrated terminal and chat:- Inline Chat: Run “GitHub Copilot: Open Copilot Chat” from the Command Palette.
- @Terminal Agent: Prefix prompts with
@Terminalto target shell commands.

Best Practices
- Provide clear prompts and context (project name, file paths).
- Review suggestions carefully—especially for destructive commands.
- Rate responses to help Copilot improve over time.
Always inspect AI-generated commands before executing in production environments.
Command-Line Demo
Try these hands-on examples:- Authenticate
- Install
- Explain a Command
- Explain a Pipeline
- Suggest a Git Command
Copilot proposes: