AI / GitHub Copilot CLI Fundamentals Interview Questions
1. What is GitHub Copilot CLI and how does it differ from the deprecated gh copilot extension?
GitHub Copilot CLI is a standalone, terminal-native AI coding assistant that brings agentic capabilities directly to your command line. Invoked with the copilot command, it functions as an active collaborator capable of reading, modifying, and executing files, interacting with GitHub,...
2. What are the prerequisites for installing GitHub Copilot CLI?
Before installing Copilot CLI you must have the correct runtime environment, a valid Copilot subscription, and (if working within an organisation) the right admin policy enabled. Prerequisites Requirement Detail Node.js runtime Node.js 22 or later must be installed GitHub Copilot...
3. How do you install GitHub Copilot CLI?
Copilot CLI can be installed through several methods depending on your operating system and preferences. Installation methods Method Command OS npm (recommended) npm install -g @github/copilot macOS, Linux, Windows Install script (root) curl -fsSL https://github.com/github/copilot-cli/releases/la
4. How do you authenticate GitHub Copilot CLI and what token types are supported?
Copilot CLI supports two authentication methods: an interactive browser-based flow (default) and a token-based flow for headless/automated environments. Authentication methods Method How it works Best for Browser-based (default) Run copilot or /login - browser opens for OAuth flow; token stored...
5. What is the directory trust model in GitHub Copilot CLI and why does it exist?
Copilot CLI has the ability to read, modify, and execute files in your working directory - which poses a security risk if you run it in an untrusted location (e.g. a directory containing malicious files)....
6. How do you start an interactive Copilot CLI session and what are the two main usage modes?
Copilot CLI has two usage modes: an interactive session (the default) and a non-interactive / programmatic mode using the -p flag. # Mode 1: Interactive session cd my-project copilot # → trust prompt → REPL-style interface opens # Type prompts,...
7. What are slash commands in GitHub Copilot CLI and what are the most important ones?
Slash commands are special instructions you type inside an interactive Copilot CLI session (prefixed with / ) to control behaviour, switch context, or trigger specific actions. Key slash commands Command Purpose /?...
8. What are the operating modes in GitHub Copilot CLI and how do you switch between them?
Copilot CLI has three operating modes that control how autonomously the agent works. You cycle between them using Shift+Tab ....
9. What is the copilot-instructions.md file and how does it affect Copilot CLI behaviour?
The copilot-instructions.md file is a repository-level configuration file that provides Copilot with persistent custom instructions about your project - such as build commands, test procedures, architecture notes, and coding conventions. Copilot CLI reads this file automatically on startup.
10. How does model selection work in GitHub Copilot CLI?
Copilot CLI supports multiple AI models and provides several ways to select or switch models - at launch, during a session, or automatically. # Select a model at launch with --model flag copilot --model claude-3-7-sonnet # Use auto to let...
11. What is the /pr slash command in GitHub Copilot CLI and what can it do?
The /pr slash command lets you manage GitHub pull requests directly from the terminal without switching to a browser or using the gh CLI separately. /pr capabilities Action Description View PRs Browse open pull requests in the current repository Create...
12. What is the /fleet slash command and what problem does it solve?
The /fleet command allows Copilot CLI to spawn multiple subagents that work in parallel on different parts of a complex implementation plan. This dramatically speeds up multi-step tasks that would otherwise need to be executed sequentially....
13. What is remote control in GitHub Copilot CLI and how does it work?
Remote control allows you to monitor and interact with a running Copilot CLI session from GitHub.com or GitHub Mobile , even after you have stepped away from your terminal. # Enable remote control when starting a session copilot --remote #...
14. What are Copilot CLI hooks and what can they be used for?
Hooks are user-defined scripts that Copilot CLI invokes automatically at specific points during a session - for example, before or after Copilot modifies files. They let you inject custom logic (validation, notifications, formatting) into the Copilot workflow without modifying the...
15. What is the AGENTS.md file and how does it differ from copilot-instructions.md?
Both files customise how Copilot behaves in a repository, but they serve different purposes and have different scopes. AGENTS.md vs copilot-instructions.md Feature AGENTS.md copilot-instructions.md Purpose Define custom instructions and tool access for agentic sessions - used by Copilot when work
16. What is the /chronicle slash command and what session history features does it provide?
The /chronicle command gives you access to a searchable history of all your Copilot CLI sessions. Instead of losing context between sessions, Copilot builds a persistent record that you can query in natural language....
17. What is MCP (Model Context Protocol) support in Copilot CLI and how do you use it?
Model Context Protocol (MCP) is an open standard that allows AI models to connect to external tools and data sources through a standardised interface. Copilot CLI supports MCP via the /mcp slash command, allowing you to extend it with a...
18. What is the COPILOT_HOME environment variable and where does Copilot CLI store its config?
Copilot CLI stores configuration, cached data, and authentication tokens in a dedicated directory. By default this is ~/.copilot/ but you can override the location with the COPILOT_HOME environment variable....
19. What are experimental features in Copilot CLI and how do you enable them?
Copilot CLI has a set of preview/experimental features that are not enabled by default. These are features GitHub is actively developing and may change based on feedback....
20. What is AI Credits billing in GitHub Copilot CLI and how does it work?
GitHub Copilot CLI draws on your plan's AI Credits allowance rather than being charged separately. Every interaction with the agent - submitting a prompt - reduces your monthly AI Credits quota by one premium request....
21. How does Copilot CLI read and understand repository context?
Copilot CLI builds its understanding of your codebase from several sources - the directory you run it in, the files it reads during a session, project configuration files, and the copilot-instructions.md file. Context sources for Copilot CLI Source What Copilot...
22. What are the keyboard shortcuts available in an interactive Copilot CLI session?
Copilot CLI provides keyboard shortcuts that speed up navigation and mode switching inside an interactive session, reducing the need to type slash commands for common operations. Key keyboard shortcuts Shortcut Action Shift+Tab Cycle between Chat, Plan, and Autopilot modes Enter...
23. What is the difference between GitHub Copilot CLI and Copilot in VS Code?
Both are AI coding assistants powered by GitHub Copilot, but they target different workflows and environments. Copilot CLI vs Copilot in VS Code Dimension GitHub Copilot CLI GitHub Copilot in VS Code Interface Terminal / command line IDE (graphical editor)...
24. What is GitHub Copilot Workspace and how does it differ from Copilot CLI?
GitHub Copilot Workspace is a browser-based, GitHub-native environment for planning and executing larger tasks driven by issues and pull requests. It is distinct from Copilot CLI, which is terminal-native....
25. What are common Copilot CLI troubleshooting steps and how do you debug issues?
When Copilot CLI behaves unexpectedly - authentication errors, tool failures, or unexpected responses - a structured set of checks resolves most issues. Common issues and fixes Symptom Likely cause Fix 'Not authenticated' error No valid token found Run copilot and...
26. How does Copilot CLI differ between Copilot Individual, Business, and Enterprise plans?
All Copilot plans include access to Copilot CLI, but the plans differ in available models, premium request limits, and administrative controls. Copilot CLI features by plan Feature Free / Pro Pro+ / Max Business Enterprise Copilot CLI access Yes Yes...
27. How do you use Copilot CLI effectively with private repositories?
Copilot CLI works with private repositories the same way it works with public ones - the local file system access means it reads private files directly without sending them to GitHub. However, when using GitHub-integrated features like /pr or MCP,...
28. What are best practices for writing effective prompts in GitHub Copilot CLI?
The quality of Copilot CLI's output is directly related to the clarity and specificity of your prompt. Well-structured prompts reduce back-and-forth and get you to working code faster....
29. How can you use GitHub Copilot CLI in CI/CD pipelines and automation workflows?
Copilot CLI's non-interactive mode ( -p ) and environment variable authentication make it suitable for use in CI/CD pipelines, GitHub Actions, and shell scripts - enabling AI-powered automation at scale. # GitHub Actions example: AI-powered PR summary on every PR...
30. What security considerations should developers be aware of when using GitHub Copilot CLI?
Copilot CLI is a powerful agentic tool that can read, modify, and execute code. This power introduces security considerations that every developer and organisation should understand before adopting it....
31. What is the --delegate flag and how does the /delegate slash command work?
The /delegate slash command and --delegate flag allow you to hand off a task to Copilot for fully autonomous execution - similar to Autopilot mode but often used to initiate a delegation from the command line or during a session...
32. What logging and diagnostic capabilities does GitHub Copilot CLI provide?
Copilot CLI provides several mechanisms for understanding what is happening during a session - from verbose logging to dry-run previews - useful for debugging, auditing, and understanding agent behaviour. # Enable verbose/debug logging copilot --log-level debug # Write logs to...
33. What does GitHub Copilot CLI's diff and undo capability provide?
After Copilot makes file modifications, Copilot CLI provides review and undo capabilities so you can inspect changes before committing them or roll back actions that produced unexpected results. # After Copilot edits files, review the diff # Copilot CLI shows...
34. What are the Windows-specific considerations for GitHub Copilot CLI?
Copilot CLI is supported on Windows but has some differences compared to macOS and Linux that developers should know about - particularly around the shell environment and tool execution. Windows vs macOS/Linux differences Aspect Windows macOS/Linux Shell PowerShell or Command...
35. What is the full list of GitHub Copilot CLI command-line flags and their purposes?
Understanding the complete flag set allows you to use Copilot CLI effectively in both interactive and scripted contexts. Flags are passed at launch to configure the session or a single non-interactive call....
36. How does GitHub Copilot CLI integrate with GitHub issues?
Copilot CLI can work directly with GitHub issues - reading issue details, using issue context to guide implementation, and linking completed work back to issues through pull requests. # Reference a GitHub issue directly in your prompt copilot - p...
37. What are the key differences when using Copilot CLI on macOS vs Linux?
Copilot CLI runs on both macOS and Linux with near-identical behaviour - the differences are primarily in installation methods, credential storage, and system integration rather than core features. macOS vs Linux differences Aspect macOS Linux Install (recommended) npm install -g...
38. What is the overall workflow for using Copilot CLI on a real development task from start to finish?
Combining all Copilot CLI features into an end-to-end workflow demonstrates how the tool fits into professional development practice. # ── End-to-end Copilot CLI workflow ────────────────────────────── # 1....