Choose how you want to follow this guide:
Prerequisites
- I have Windows 10/11, Linux or macOS
- I have a stable Internet connection
- I have a GitHub account (or I'll create one now at github.com)
- I have (or will subscribe to) a GitHub Copilot subscription
Install Visual Studio Code
- Downloaded from code.visualstudio.com
- Installed with option: Add to PATH
- Installed with option: Open with Code in context menu
- Verified in terminal:
Install and Configure Git
- Git downloaded and installed from git-scm.com
- Name and email configured:
- SSH key generated and added to GitHub
- SSH connection verified:
Clone the Repository
- Repository cloned:
- VS Code opened in the project:
- File Explorer shows the project structure
- Source Control (Ctrl+Shift+G) detects the Git repository
- Integrated Terminal (Ctrl+`) opens in the project directory
Install GitHub Copilot
- Extensions panel opened: Ctrl+Shift+X
- Searched and installed "GitHub Copilot" (official extension)
- Signed in to GitHub (Sign In with OAuth)
- Copilot icon visible in the bottom status bar
Enable AI Agents
- Copilot Chat opened: Ctrl+Shift+I
- Selected Agent mode at the top of the chat
- AI model chosen (click on model name):
Claude Sonnet 4 → Daily development, balanced
GPT-4o → Multimodal, fast
Gemini 2.5 Pro → Massive context (1M tokens)
o3 → Advanced reasoning and logic
- Tested with a simple message: "Can you see the files in my project?"
Final Verification
- VS Code open with the project loaded
- Git works:
git statusshows the repo state - Copilot active: icon visible in status bar
- AI agent responds in the chat
- Integrated terminal operational
1. Introduction
Nowadays, setting up an efficient development environment goes far beyond installing a text editor. With the arrival of Artificial Intelligence agents integrated into code editors, the way we code has changed radically.
In this article we will walk step by step through how to set up a professional development environment using Visual Studio Code, GitHub Copilot with its AI agents, and a Git repository on GitHub. The goal is to have everything ready to work productively, exactly as we are using it right now to write this very article.
This workflow applies to any type of project: from web development, industrial applications, automation scripts, to PLC and SCADA projects where code or documentation is managed.
How do the tools interrelate?
The header conceptual map shows how the tools work together to take an idea to a finished project:
- VS Code is the command centre — the workspace where your code, files and terminal live.
- GitHub Copilot integrates directly into VS Code and gives access to AI agents (Claude, GPT, Gemini).
- AI Agents execute complete tasks autonomously: they search, edit, run and fix.
- The Integrated Terminal is where agents execute, test and validate.
- Git + GitHub ensures every step is recorded. You can roll back and collaborate.
The flow is cyclical: idea → the agent executes → you review → adjust → repeat. Every iteration is backed up in Git.
2. Prerequisites
Before we begin, we need to have the following ready:
- Operating system: Windows 10/11, Linux or macOS.
- Visual Studio Code: Latest stable version downloaded from code.visualstudio.com.
- Git: Installed and accessible from the command line.
- GitHub account: Required for Copilot and for hosting repositories.
- GitHub Copilot subscription: Individual, Business or Enterprise. A free tier with limitations is also available.
- Internet connection: AI agents require connectivity to function.
3. Install Visual Studio Code
Visual Studio Code (VS Code) is a free, open-source code editor developed by Microsoft. It is lightweight, extremely extensible and has become the world's most popular editor for software development.
Installation steps:
- Download the installer from code.visualstudio.com. Choose the User Installer or System Installer as preferred.
- Run the installer. During installation, check the following important options:
- ✔ Add to system PATH (allows running
codefrom terminal). - ✔ Register VS Code as the default editor.
- ✔ Add "Open with Code" to the context menu for files and folders.
- ✔ Add to system PATH (allows running
- Complete the installation and restart the computer if prompted.
- Verify the installation by opening a terminal and running:
code --versionIf the command returns the version number, the installation was successful and VS Code is available from the command line.
4. Configure Git and GitHub
Git is the most widely used version control system. It will allow us to manage the project's change history and synchronise it with GitHub.
Installing Git:
Download and install from git-scm.com. During installation, accept the default options unless you have a specific preference.
Initial configuration:
Once Git is installed, open a terminal and run the following commands to set up your identity:
# Set name and email (they will appear in every commit)
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
# Set VS Code as the default editor for Git
git config --global core.editor "code --wait"
# Set the default branch to 'main'
git config --global init.defaultBranch mainSet up SSH key for GitHub:
To avoid entering credentials every time you push/pull, it is recommended to set up an SSH key:
# Generate SSH key (Ed25519, more secure and faster)
ssh-keygen -t ed25519 -C "your@email.com"
# Start the SSH agent
eval "$(ssh-agent -s)" # Linux/macOS
# On Windows PowerShell:
Start-Service ssh-agent
# Add the key to the agent
ssh-add ~/.ssh/id_ed25519
# Copy the public key to clipboard
# Windows:
Get-Content ~/.ssh/id_ed25519.pub | Set-Clipboard
# Linux:
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboardThen go to GitHub > Settings > SSH and GPG Keys > New SSH Key, paste the public key and save. To verify the connection:
ssh -T git@github.com
# Expected response: "Hi username! You've successfully authenticated..."5. Clone the project repository
With Git configured, the next step is to clone the repository where our project lives. This will download a complete copy of the repository including its full history.
# Clone the repository (via SSH)
git clone git@github.com:user/my-project.git
# Or via HTTPS (will prompt for credentials)
git clone https://github.com/user/my-project.git
# Enter the project directory
cd my-project
# Open VS Code directly in the project
code .Running code . will open VS Code with the project folder as workspace. This is fundamental because:
- The File Explorer (left panel) will show the entire project structure.
- Source Control (
Ctrl+Shift+G) will automatically detect the Git repository. - The Integrated Terminal (
Ctrl+`) will open in the project directory. - GitHub Copilot will have full project context for better suggestions.
Tip: You can also clone directly from VS Code with Ctrl+Shift+P > Git: Clone and paste the repository URL.
6. Install GitHub Copilot
GitHub Copilot is the most tightly integrated AI assistant for VS Code. It's not just autocompletion: with Agent mode, it can execute complex tasks autonomously, edit multiple files, run terminal commands and much more.
Step-by-step installation:
- Open VS Code and access the extensions panel:
Ctrl+Shift+X. - Search for "GitHub Copilot" in the search box.
- Install the official GitHub Copilot extension (by GitHub). This extension includes both inline autocompletion and Copilot Chat.
- Upon installation, VS Code will ask you to sign in to GitHub. Click Sign In and authorise the application in your browser.
- Once authenticated, verify that the Copilot icon (a double-sparkle symbol) appears in the VS Code status bar at the bottom.
Selecting the AI model:
One of Copilot's most powerful features is the ability to select from multiple AI models. To change the model:
- Open Copilot Chat:
Ctrl+Shift+I(or click the Copilot icon). - At the top of the chat panel, click the current model name.
- A dropdown will show the available models. Choose based on your needs.
7. AI Agents: available models
As of today (February 2026), GitHub Copilot provides access to multiple AI models that you can select depending on the task at hand:
| Model | Provider | Type | Ideal for |
|---|---|---|---|
| Claude Opus 4.6 | Anthropic | Autonomous agent | Large projects, migrations, complex debugging |
| Claude Sonnet 4 | Anthropic | Balanced agent | Daily development, code review |
| GPT-4o | OpenAI | Multimodal | Varied tasks, visual analysis, prototyping |
| o3 | OpenAI | Reasoning | Algorithms, optimisation, advanced logic |
| Gemini 2.5 Pro | Multimodal | Massive context, complete repositories | |
| Claude Haiku 3.5 | Anthropic | Ultra-fast | Autocompletion, inline suggestions |
What is Agent mode?
Agent mode is the most significant evolution of copilots. Unlike simple chat where the user asks and the AI replies, in Agent mode the AI can:
- 🔍 Search the workspace: explore files, find patterns, understand the project structure.
- ✏️ Edit files: create new files, modify existing code, refactor.
- 💻 Run commands in the terminal: install dependencies, run tests, compile.
- 🔄 Iterate: if it finds an error, it analyses and fixes it autonomously.
- 📋 Plan: breaks down complex tasks into steps and executes them sequentially.
In essence, the agent becomes an autonomous programming companion that can carry out tasks from start to finish.
8. Workflow with agents
Once we have everything configured, the typical workflow with AI agents is as follows:
Step 1: Open the project
We open VS Code in the project directory. The explorer shows the file structure and Git detects the repository.
cd C:\Users\MyUser\Documents\GitHub\my-project
code .Step 2: Start Copilot Agent
We open the Copilot Chat panel with Ctrl+Shift+I. We select the desired model (for example, Claude Opus 4.6 for complex tasks) and enable Agent mode at the top of the chat.
Step 3: Describe the task
We tell the agent what we want to do. The more detailed the description, the better the result. For example:
"Create a new blog article following the standard format
of existing articles. The article should be about how to set up
a development environment with VS Code and AI agents. Include images
and register the article in the AI category."Step 4: The agent works
The agent will analyse the project, look for patterns in existing articles, create the necessary files, generate images and register everything where it belongs. During the process you can see:
- The searches it performs in the workspace.
- The files it reads to understand the structure.
- The files it creates or modifies.
- The commands it runs in the terminal.
- The questions it may ask if it needs clarification.
Step 5: Review and commit
Once the agent finishes, we review the changes in the Source Control tab (Ctrl+Shift+G). VS Code shows a diff of all modified files. If everything looks good:
# Check the status of changes
git status
# Stage all changes
git add .
# Commit with a descriptive message
git commit -m "feat: new article - VS Code development environment with Copilot and AI agents"
# Push to the remote repository
git push origin main9. Tips and best practices
Based on the experience of working with AI agents in VS Code, here are some practical tips:
- Be specific in your instructions: The clearer you are with the agent, the better the results. Specify format, style and project conventions.
- Choose the right model: For quick tasks use Sonnet or Haiku. For complex, multi-file tasks, Claude Opus 4.6 is the best choice.
- Always review changes: Agents are powerful but not infallible. Reviewing the diff before committing is essential.
- Use
.gitignore: Make sure sensitive files (keys, local configurations) are excluded from the repository. - Commit frequently: Making small, frequent commits makes it easier to revert changes if something goes wrong.
- Useful additional extensions:
- GitLens — Advanced Git history visualisation.
- Prettier — Automatic code formatting.
- Error Lens — Shows errors inline in the editor.
- Remote - SSH — Development on remote machines.
- Integrated Terminal: Take advantage of VS Code's terminal maintaining the workspace context. It's more efficient than using an external terminal.
- Essential shortcuts:
Ctrl+Shift+I— Open Copilot Chat / Agent.Ctrl+Shift+G— Source Control (Git) panel.Ctrl+Shift+X— Extensions panel.Ctrl+`— Integrated Terminal.Ctrl+Shift+P— Command Palette (search any action).
10. Conclusion
Setting up a development environment with VS Code, Git and AI agents is a minimal time investment that enormously multiplies productivity. The ability to have an autonomous agent that can search, edit, run and iterate on your code completely changes the way you work.
The workflow described in this article is exactly what was used to create it: an AI agent (Claude Opus 4.6 via GitHub Copilot) analysed the project structure, created the images, wrote the content and registered the article in the corresponding categories. All from within VS Code, with Git backing up every step.
The combination of VS Code + GitHub Copilot + AI Agents is, as of today, one of the most powerful tools for any developer or technical professional.
28 February 2026
All trademarks, software and logos are the property of their respective owners.
Pedro Pagán Pallarés
Industrial Automation Expert and AI Researcher.