C++ Dependencies Without the Headache: vcpkg + Copilot CLI - C++ Team Blog
Skip to main content
Dev Blogs
AI
All .NET posts
.NET MAUI<br>ASP.NET Core<br>Blazor<br>Entity Framework
C++<br>C#<br>F#<br>TypeScript
NuGet<br>Servicing<br>.NET Blog in Chinese
Microsoft for Developers<br>Agent Framework<br>Develop from the cloud<br>Xcode<br>ISE Developer<br>TypeScript<br>PowerShell<br>Python<br>Java<br>Java Blog in Chinese<br>Go<br>Microsoft Edge Dev<br>Microsoft 365 Developer<br>Microsoft Entra Identity Developer<br>Microsoft Entra PowerShell
Visual Studio<br>Visual Studio Code<br>Aspire
All things Azure<br>Azure SDK<br>Azure VM Runtime Team<br>Microsoft Azure<br>Azure Cosmos DB<br>Azure DocumentDB<br>Azure Data Studio<br>Azure SQL<br>DevOps<br>DirectX<br>Microsoft Foundry<br>Power Platform
OData<br>Unified Data Model (IDEAs)
Windows Command Line<br>#ifdef Windows<br>Inside MSIX<br>MIDI and music<br>React Native<br>The Old New Thing<br>Windows Developer
Augustin Popa
Senior Product Manager
C++ dependency setup and maintenance still slows down many teams. In my Pure Virtual C++ 2026 session, I show a terminal-first workflow that ends with a working CLI app that formats and prints programming quotes, built with CMake and Microsoft C++ (MSVC) Build Tools. All of this is powered by GitHub Copilot CLI, which does the work of generating the code and project files, identifying appropriate open-source library dependencies, installing the vcpkg package manager, and integrating the libraries into the project.
What is GitHub Copilot CLI?
GitHub Copilot CLI is the command-line implementation for GitHub Copilot, allowing you to run agents in a terminal window. You can use it as an AI chat interface, give it work to do semi- or fully autonomously, optionally across multiple parallel subagents. For C++ developers, Copilot CLI is a valuable tool for work you would be comfortable doing in the command line yourself, from generating code to compiling projects and debugging issues. You can persist and manage Copilot sessions, customize your environment with plugins, custom agents, MCP servers, skills, hooks, and models, and seamlessly switch from working in the command line to using Copilot in another environment like Visual Studio Code (VS Code). Once you get into the groove, using it feels as natural as a web browser or an IDE.
Check out the Pure Virtual C++ video
What this demo covers
This walkthrough will show you the following:
You can use Copilot to help you install the tools you need, including the vcpkg package manager. Copilot can also help you identify appropriate library dependencies, describe what each one does, and integrate them into your project.
vcpkg removes manual dependency wiring. You declare dependencies once in vcpkg.json, and restore is part of your normal configure/build flow.
Copilot helps you complete multi-step setup work without context-switching between docs and terminal commands.
You can work with Copilot on additional instructions, like setting an appropriate builtin-baseline to pin dependencies for reproducible builds while retaining the flexibility to upgrade later without introducing ABI-breaking changes in your dependency graph.
This walkthrough starts from the first prompt and ends with a successful build: start in an empty folder, stay in the terminal, and avoid hand-managed include and link paths.
Read-along Walkthrough
This section is written so you can follow along with the video demo.
Step 0: Configure Copilot CLI environment
Before you get started, make sure your environment is set up and ready to go:
Install GitHub Copilot CLI with your preferred package manager or a script.
Make sure you have CMake and a compiler installed on your system. In this video I used CMake with MSVC Build Tools on Windows.
Choose your preferred terminal application. On Windows, I recommend Windows Terminal, which supports multiple color-coded, custom-named tabs as I show in the video.
Create and navigate to a directory to work in (e.g. mkdir quotecli). Add a subfolder called data with a quotes.json file that looks something like this:<br>"quotes": [<br>{ "text": "Any sufficiently advanced technology is indistinguishable from magic.", "author": "Arthur C. Clarke" },<br>{ "text": "Simplicity is prerequisite for reliability.", "author": "Edsger W. Dijkstra" },<br>{ "text": "Controlling complexity is the essence of computer programming.", "author": "Brian Kernighan" },<br>{ "text": "That brain of mine is something more than merely mortal, as time will show.", "author": "Ada Lovelace" },<br>{ "text": "First, solve the problem. Then, write the code.", "author": "John Johnson" },<br>{ "text": "The most important property of a program is whether it accomplishes the intention of its user.", "author": "C.A.R. Hoare" },<br>{ "text": "Programs must be written for people to read, and only incidentally for machines to execute.", "author": "Harold Abelson" },<br>{ "text": "Premature optimization is the root of all evil.", "author": "Donald Knuth" }
Run Copilot in your terminal from your working directory root by typing copilot.
Install the C++...