Run GitHub Copilot CLI in headless mode with the Copilot SDK

Run GitHub Copilot CLI in headless mode with the Copilot SDK

March 16, 2026
ℹ️
Originally published on LinkedIn

I recently updated the FlightLog app ✈️ (built with the GitHub Copilot SDK and Azure Cosmos DB) to use the GitHub Copilot CLI in headless mode – the CLI runs as a separate process, and the app connects to it over TCP.

By default, the SDK spawns the Copilot CLI inside your app process. But it also lets you point to an external CLI running anywhere — a separate server, a sidecar, another container 📦

The instructions have been updated to use Docker Compose 🐳 to start the entire solution with a single command 🚀

Try it out, and let me know how it goes!

Last updated on