{"id":37747774,"url":"https://github.com/github/copilot-sdk","last_synced_at":"2026-07-02T00:01:39.412Z","repository":{"id":332676895,"uuid":"1133883850","full_name":"github/copilot-sdk","owner":"github","description":"Multi-platform SDK for integrating GitHub Copilot Agent into apps and services","archived":false,"fork":false,"pushed_at":"2026-06-26T01:32:10.000Z","size":23492,"stargazers_count":9451,"open_issues_count":194,"forks_count":1272,"subscribers_count":93,"default_branch":"main","last_synced_at":"2026-06-26T06:02:32.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-14T00:23:22.000Z","updated_at":"2026-06-26T03:21:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/github/copilot-sdk","commit_stats":null,"previous_names":["github/copilot-sdk"],"tags_count":110,"template":false,"template_full_name":null,"purl":"pkg:github/github/copilot-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcopilot-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcopilot-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcopilot-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcopilot-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/copilot-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcopilot-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35027341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T14:18:44.239Z","updated_at":"2026-07-02T00:01:39.398Z","avatar_url":"https://github.com/github.png","language":"Java","funding_links":[],"categories":["🚀 AI Tools for Vim, Neovim, and Terminal","13. Developer Tools \u0026 Integrations","Repos","Agentic Frameworks","Agent Frameworks","Java","人工智能"],"sub_categories":["终端助手"],"readme":"# GitHub Copilot CLI SDKs\n\n![GitHub Copilot SDK](./assets/RepoHeader_01.png)\n\n[![NPM Downloads](https://img.shields.io/npm/dm/%40github%2Fcopilot-sdk?label=npm)](https://www.npmjs.com/package/@github/copilot-sdk)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/github-copilot-sdk?label=PyPI)](https://pypi.org/project/github-copilot-sdk/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/GitHub.Copilot.SDK?label=NuGet)](https://www.nuget.org/packages/GitHub.Copilot.SDK)\n[![Go Reference](https://img.shields.io/badge/Go-Reference-00ADD8?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/github/copilot-sdk/go)\n[![crates.io](https://img.shields.io/crates/v/github-copilot-sdk?label=crates.io)](https://crates.io/crates/github-copilot-sdk)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github/copilot-sdk-java?label=Maven%20Central)](https://central.sonatype.com/artifact/com.github/copilot-sdk-java)\n\nAgents for every app.\n\nEmbed Copilot's agentic workflows in your application with the GitHub Copilot SDK for Python, TypeScript, Go, .NET, Java, and Rust.\n\nThe GitHub Copilot SDK exposes the same engine behind Copilot CLI: a production-tested agent runtime you can invoke programmatically. No need to build your own orchestration—you define agent behavior, Copilot handles planning, tool invocation, file edits, and more.\n\n## Available SDKs\n\n| SDK                      | Location                                                                | Cookbook                                                                                              | Installation                                                                                                                                                                                                                               | API docs                                                                       |\n| ------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |\n| **Node.js / TypeScript** | [`nodejs/`](./nodejs/)                                                  | [Cookbook](https://github.com/github/awesome-copilot/blob/main/cookbook/copilot-sdk/nodejs/README.md) | `npm install @github/copilot-sdk`                                                                                                                                                                                                          |                                                                                |\n| **Python**               | [`python/`](./python/)                                                  | [Cookbook](https://github.com/github/awesome-copilot/blob/main/cookbook/copilot-sdk/python/README.md) | `pip install github-copilot-sdk`                                                                                                                                                                                                           |                                                                                |\n| **Go**                   | [`go/`](./go/)                                                          | [Cookbook](https://github.com/github/awesome-copilot/blob/main/cookbook/copilot-sdk/go/README.md)     | `go get github.com/github/copilot-sdk/go`                                                                                                                                                                                                  | [API docs](https://pkg.go.dev/github.com/github/copilot-sdk/go)               |\n| **.NET**                 | [`dotnet/`](./dotnet/)                                                  | [Cookbook](https://github.com/github/awesome-copilot/blob/main/cookbook/copilot-sdk/dotnet/README.md) | `dotnet add package GitHub.Copilot.SDK`                                                                                                                                                                                                    |                                                                                |\n| **Rust**                 | [`rust/`](./rust/)                                                      | —                                                                                                     | `cargo add github-copilot-sdk`                                                                                                                                                                                                             | [API docs](https://docs.rs/github-copilot-sdk/latest/github_copilot_sdk/)     |\n| **Java**                 | [`java/`](./java/) | [Cookbook](https://github.com/github/awesome-copilot/blob/main/cookbook/copilot-sdk/java/README.md)                                                                                                   | Maven coordinates\u003cbr\u003e`com.github:copilot-sdk-java`\u003cbr\u003eSee instructions for [Maven](./java/README.md#maven) and [Gradle](./java/README.md#gradle) | [API docs](https://javadoc.io/doc/com.github/copilot-sdk-java/latest/) |\n\nSee the individual SDK READMEs for installation, usage examples, and API reference.\n\n## Getting Started\n\nFor a complete walkthrough, see the **[Getting Started Guide](./docs/getting-started.md)**.\n\nQuick steps:\n\n1. **(Optional) Install the Copilot CLI**\n\nFor Node.js, Python, and .NET SDKs, the Copilot CLI is bundled automatically and no separate installation is required.\nFor Go, Java, and Rust, [install the CLI manually](https://github.com/features/copilot/cli) or ensure `copilot` is available in your PATH. Go and Rust also expose application-level CLI bundling features.\n\n2. **Install your preferred SDK** using the commands above.\n\n3. **See the SDK README** for usage examples and API documentation.\n\n## Architecture\n\nAll SDKs communicate with the Copilot CLI server via JSON-RPC:\n\n```\nYour Application\n       ↓\n  SDK Client\n       ↓ JSON-RPC\n  Copilot CLI (server mode)\n```\n\nThe SDK manages the CLI process lifecycle automatically. You can also connect to an external CLI server—see the [Getting Started Guide](./docs/getting-started.md#connecting-to-an-external-cli-server) for details on running the CLI in server mode.\n\n## FAQ\n\n### Do I need a GitHub Copilot subscription to use the SDK?\n\nYes, a GitHub Copilot subscription is required to use the GitHub Copilot SDK, **unless you are using BYOK (Bring Your Own Key)**. With BYOK, you can use the SDK without GitHub authentication by configuring your own API keys from supported LLM providers. For standard usage (non-BYOK), refer to the [GitHub Copilot pricing page](https://github.com/features/copilot#pricing), which includes a free tier with limited usage.\n\n### How does billing work for SDK usage?\n\nBilling for the GitHub Copilot SDK is based on the same model as the Copilot CLI, with each prompt being counted towards your usage allowance. For more information on Copilot usage billing, see [Usage in GitHub Copilot](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing).\n\n### Does it support BYOK (Bring Your Own Key)?\n\nYes, the GitHub Copilot SDK supports BYOK (Bring Your Own Key). You can configure the SDK to use your own API keys from supported LLM providers (e.g. OpenAI, Azure AI Foundry, Anthropic) to access models through those providers. See the **[BYOK documentation](./docs/auth/byok.md)** for setup instructions and examples.\n\n**Note:** BYOK uses key-based authentication only. Microsoft Entra ID (Azure AD), managed identities, and third-party identity providers are not supported.\n\n### What authentication methods are supported?\n\nThe SDK supports multiple authentication methods:\n\n- **GitHub signed-in user** - Uses stored OAuth credentials from `copilot` CLI login\n- **OAuth GitHub App** - Pass user tokens from your GitHub OAuth app\n- **Environment variables** - `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, `GITHUB_TOKEN`\n- **BYOK** - Use your own API keys (no GitHub auth required)\n\nSee the **[Authentication documentation](./docs/auth/README.md)** for details on each method.\n\n### Do I need to install the Copilot CLI separately?\n\nNo — for Node.js, Python, and .NET SDKs, the Copilot CLI is bundled automatically as a dependency. You do not need to install it separately.\n\nFor Go, Java, and Rust SDKs, the CLI is **not** bundled by default. Install the CLI manually or ensure `copilot` is available in your PATH. Go and Rust also expose application-level CLI bundling features.\n\nAdvanced: You can override the CLI binary or connect to an external server. See the individual SDK README for language-specific options.\n\n### What tools are enabled by default?\n\nBy default, the SDK exposes the Copilot CLI's first-party tools, similar to running the CLI with `--allow-all`. Tool execution is still governed by each SDK's permission handler, so applications can approve, deny, or customize tool calls. You can customize tool availability by configuring the SDK client options to enable and disable specific tools. Refer to the individual SDK documentation for details on tool configuration and to the Copilot CLI documentation for the list of available tools.\n\n### Can I use custom agents, skills or tools?\n\nYes, the GitHub Copilot SDK allows you to define custom agents, skills, and tools. You can extend the functionality of the agents by implementing your own logic and integrating additional tools as needed. Refer to the SDK documentation of your preferred language for more details.\n\n### Are there instructions or SDK guidance for Copilot to speed up development?\n\nYes, check out the custom instructions and SDK-specific guidance:\n\n- **[Node.js / TypeScript](https://github.com/github/awesome-copilot/blob/main/instructions/copilot-sdk-nodejs.instructions.md)**\n- **[Python](https://github.com/github/awesome-copilot/blob/main/instructions/copilot-sdk-python.instructions.md)**\n- **[.NET](https://github.com/github/awesome-copilot/blob/main/instructions/copilot-sdk-csharp.instructions.md)**\n- **[Go](https://github.com/github/awesome-copilot/blob/main/instructions/copilot-sdk-go.instructions.md)**\n- **[Rust](./rust/README.md)** (SDK guidance; custom instructions not yet published)\n- **[Java](https://github.com/github/awesome-copilot/blob/main/instructions/copilot-sdk-java.instructions.md)**\n\n### What models are supported?\n\nAll models available via Copilot CLI are supported in the SDK. The SDK also exposes a method which will return the models available so they can be accessed at runtime.\n\n### Is the SDK production-ready?\n\nThe GitHub Copilot SDK is generally available and follows semantic versioning. See [CHANGELOG.md](./CHANGELOG.md) for release notes.\n\n### How do I report issues or request features?\n\nPlease use the [GitHub Issues](https://github.com/github/copilot-sdk/issues) page to report bugs or request new features. We welcome your feedback to help improve the SDK.\n\n## Quick Links\n\n- **[Documentation](./docs/README.md)** – Full documentation index\n- **[Getting Started](./docs/getting-started.md)** – Tutorial to get up and running\n- **[Setup Guides](./docs/setup/README.md)** – Architecture, deployment, and scaling\n- **[Authentication](./docs/auth/README.md)** – GitHub OAuth, BYOK, and more\n- **[Features](./docs/features/README.md)** – Hooks, custom agents, MCP, skills, and more\n- **[Troubleshooting](./docs/troubleshooting/debugging.md)** – Common issues and solutions\n- **[Cookbook](https://github.com/github/awesome-copilot/blob/main/cookbook/copilot-sdk)** – Practical recipes for common tasks across all languages\n- **[More Resources](https://github.com/github/awesome-copilot/blob/main/collections/copilot-sdk.md)** – Additional examples, tutorials, and community resources\n\n## Unofficial, Community-maintained SDKs\n\n⚠️ Disclaimer: These are unofficial, community-driven SDKs and they are not supported by GitHub. Use at your own risk.\n\n| SDK         | Location                                                 |\n| ----------- | -------------------------------------------------------- |\n| **Clojure** | [copilot-community-sdk/copilot-sdk-clojure][sdk-clojure] |\n| **C++**     | [0xeb/copilot-sdk-cpp][sdk-cpp]                          |\n\n[sdk-cpp]: https://github.com/0xeb/copilot-sdk-cpp\n[sdk-clojure]: https://github.com/copilot-community-sdk/copilot-sdk-clojure\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fcopilot-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fcopilot-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fcopilot-sdk/lists"}