--- id: github-copilot-sdk version: "1.0.11" license: MIT license_treatment: permissive maintenance: active --- # github-copilot-sdk — Python SDK for GitHub Copilot CLI License: permissive · Maintenance: active · Downloads: 5.1M/mo ## What it is and what it does This is a Python SDK that wraps GitHub Copilot CLI and exposes it as a programmatic JSON-RPC client. It lets you build applications that send messages to Copilot, receive streamed responses, and manage sessions—all via async Python code. The SDK handles three transport modes: stdio (spawning a local CLI process), TCP (connecting to a local server), and in-process FFI (loading the runtime's native library directly). It depends on httpx for HTTP, pydantic for data validation, and python-dateutil for timestamp handling. The SDK is actively maintained and requires Python 3.11 or later. It ships as a pure wheel and automatically downloads a pinned Copilot runtime binary on first use (cached locally), though you can override this with environment variables or provide your own binary. Sessions are managed via async context managers for automatic cleanup, and the API supports real-time event streaming, session history retrieval, and custom permission handlers. Type hints are provided throughout. Use it for: - Build a chat application that streams Copilot responses in real-time to end users. - Integrate Copilot into an IDE or editor plugin for programmatic code completion and suggestions. - Automate code review or documentation generation by sending code snippets to Copilot and capturing responses. - Create a multi-turn conversation system that maintains session state and event history across requests. - Deploy Copilot as a backend service by connecting multiple clients to a shared TCP-based runtime server. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python SDK for programmatic control of GitHub Copilot CLI via JSON-RPC, supporting stdio, TCP, and in-process FFI transports with async/await and real-time streaming events. Yes. The SDK is actively maintained, has no known vulnerabilities, supports current Python versions (3.11–3.14), and offers low install friction. It is suitable for production use if you need programmatic access to Copilot. The in-process FFI transport is marked experimental; use stdio or TCP for stability if that matters to your use case. ## Install pip install github-copilot-sdk uv add github-copilot-sdk poetry add github-copilot-sdk ## Installing github-copilot-sdk Before you install: Low install friction with a pure-wheel distribution. Active maintenance as of 2026-08-14 with no known vulnerabilities. Requires Python 3.11+ and downloads a pinned runtime binary on first use (or via explicit `download-runtime` command), which may require network access and disk space. License in practice: MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects. Quickstart: pip install github-copilot-sdk import asyncio from copilot import CopilotClient from copilot.session import PermissionHandler async def main(): async with CopilotClient() as client: async with await client.create_session( on_permission_request=PermissionHandler.approve_all, model="gpt-5" ) as session: await session.send("What is 2+2?") asyncio.run(main()) Python 3.11+ required. SDK downloads a pinned Copilot CLI runtime binary on first use (cached locally); set COPILOT_SKIP_CLI_DOWNLOAD=1 to disable auto-download if providing your own binary via COPILOT_CLI_PATH. Verify before relying: - Whether the runtime download is required for all use cases or only specific transports (e.g., in-process FFI). - Performance characteristics and latency of different transport modes (stdio vs. TCP vs. FFI). - Whether the in-process FFI transport is production-ready despite being marked experimental. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 5.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags github copilot python sdk, copilot cli json-rpc client, programmatic copilot control, copilot async python api, copilot session management, copilot streaming events, copilot ffi transport, copilot-integration, json-rpc-client, async-sdk [View on SkillFed](https://skillfed.io/packages/github-copilot-sdk) · [View on PyPI](https://pypi.org/project/github-copilot-sdk/)