GitHub Copilot is like predictive text for code. It lives inside your code editor and suggests what to type next — sometimes entire functions — based on what you're working on. It also has a chat mode for asking questions and an agent mode that can tackle bigger tasks across multiple files.
Think of GitHub Copilot as a really smart autocomplete. When you type on your phone, it suggests the next word. Copilot does the same thing, but for code — and it can suggest entire paragraphs of code at once.
It's made by GitHub (owned by Microsoft) and works as an extension — a plug-in that you add to your existing code editor. The most popular choice is VS Code, but it also works in JetBrains editors, Visual Studio, and Neovim.
Beyond autocomplete, Copilot has a chat panelwhere you can ask questions about your code (like "what does this function do?") and an agent mode (Copilot Workspace) that can plan and make changes across multiple files — more like having a junior developer on your team.
The key difference from tools like Bolt or Lovable: Copilot works inside your existing editor rather than in a browser. You keep your familiar environment and Copilot adds AI capabilities on top.
Download VS Code from code.visualstudio.com. It's free and works on Mac, Windows, and Linux. If you're using Cursor, you already have a VS Code-based editor — Copilot works there too.
Open VS Code, click the Extensions icon (the puzzle piece) in the sidebar, search for "GitHub Copilot," and click Install. This adds both the autocomplete and chat features.
You'll be prompted to sign in with your GitHub account. If you don't have one, create a free account at github.com first. This is how Copilot knows you're a subscriber.
Open any file and start typing. Copilot shows gray suggestions as you work. Press Tab to accept a suggestion, or keep typing to ignore it. Open the chat panel with Ctrl+I (or Cmd+I on Mac).
As you type, Copilot shows grayed-out suggestions. Press Tab to accept the whole thing, or keep typing to see new suggestions. It learns from what you accept and reject.
Open a sidebar chat where you can ask questions like "explain this function" or "how do I add authentication?" Copilot answers in context, aware of your open files.
For bigger tasks, agent mode can plan changes across multiple files, execute the plan, and show you the results. Like having a mini developer session.
In agent mode, Copilot can read and modify multiple files at once. Need to rename something everywhere? It handles the ripple effects across your whole project.
Highlight any code and ask "what does this do?" Copilot breaks it down in plain English. Perfect for understanding code that AI tools generated for you.
Ask Copilot to write tests for your code. It understands testing patterns and can generate test cases that check whether your code works correctly.
Not sure what command to run? Copilot can suggest terminal commands too. Type what you want to do and it suggests the right command.
Type @workspace in the chat to tell Copilot to look at your entire project. "@workspace how is the database connected?" searches across all your files for the answer.
Copilot can generate comments and documentation for your code. Highlight a function and ask it to add explanatory comments — great for future you.
1. Understand unfamiliar code
"@workspace Explain the overall architecture of this project. What are the main files, how do they connect to each other, and what does each major section do?"
2. Add a feature with agent mode
"Add a search bar to the top of the page that filters the list of items in real time as the user types. It should search by name and description. Show a 'No results found' message when nothing matches."
3. Explain selected code
"Explain what this selected code does in simple terms. What inputs does it expect? What does it return? Are there any edge cases or potential bugs?"
4. Write tests
"Write unit tests for the currently open file. Cover the main happy path, edge cases like empty inputs and invalid data, and error handling. Use the testing framework already in the project."
5. Fix a bug
"There's a bug where clicking the 'Save' button doesn't actually save the data. The form looks like it submits but nothing reaches the database. Find and fix the issue."
6. Suggest a terminal command
"What command do I run to install all the project dependencies and start the development server? Also, how do I check if there are any outdated packages?"
7. Add documentation
"Add JSDoc comments to every function in this file. Explain what each function does, its parameters, return values, and give a short usage example where helpful."
8. Refactor for readability
"Refactor this file to be more readable. Break long functions into smaller ones, use clearer variable names, remove duplicated code, and add comments explaining complex logic."
Don't accept every suggestion blindly. Read what Copilot suggests before pressing Tab. If the suggestion is only partially right, keep typing — Copilot will adjust.
Type a comment like "// function that validates an email address" and press Enter. Copilot will generate the code below your comment. Comments guide it like prompts.
Copilot considers your open tabs for context. If you're working on a component, open the related CSS file and data file too. More context = better suggestions.
When you need answers about your whole project (not just the open file), prefix your question with @workspace. It searches across all files to find the answer.
For multi-file changes, use agent mode instead of autocomplete. It can plan, execute, and apply changes across your project — much faster than editing file by file.
Python, JavaScript, TypeScript, Go, Ruby, Rust — Copilot supports virtually every programming language. It adapts to whatever file type you're editing.
Make sure you're signed in (check the Copilot icon in the bottom-right of VS Code). If it shows a strikethrough icon, Copilot is disabled for that file type. Click it to re-enable.
Copilot works best with context. Open related files, add comments explaining what you're trying to do, and make sure your file has some existing code so Copilot understands the patterns.
Copilot sends requests to the cloud, so a slow internet connection means slow suggestions. If it's consistently laggy, try disabling other extensions to rule out conflicts.
Agent mode (Copilot Workspace) requires a paid plan and may need to be enabled in your GitHub settings. Go to github.com/settings/copilot to check your access level.
Create a .github/copilot-instructions.md file in your project with style guidelines. Copilot reads this to understand your preferences — like "use arrow functions" or "prefer Tailwind over CSS modules."
| Feature | Copilot | Cursor | Claude Code | Codex | Bolt |
|---|---|---|---|---|---|
| Type | Editor extension | Full AI editor | Terminal agent | Cloud agent | Browser builder |
| Autocomplete | Excellent — core feature | Excellent | No | No | No |
| Chat mode | Yes — sidebar panel | Yes — sidebar | Yes — terminal | Yes — via ChatGPT | Yes — browser |
| Agent mode | Yes — Workspace | Yes — Composer | Yes — core workflow | Yes — autonomous | Yes — visual |
| Starting price | Free tier | Free tier | $20/mo | $20/mo (limited) | Free tier |