Files
awesome-copilot/cookbook/copilot-sdk
Anthony Shaw 5eb7adb376 Fix Go cookbook recipes to use correct SDK API
All 5 Go recipes and their markdown docs used incorrect API patterns
that don't match the real github.com/github/copilot-sdk/go v0.1.23:

- copilot.NewClient() -> copilot.NewClient(nil) (*ClientOptions param)
- client.Start() -> client.Start(ctx) (context.Context required)
- copilot.SessionConfig -> &copilot.SessionConfig (pointer required)
- session.On(func(event copilot.Event)) -> session.On(func(event copilot.SessionEvent))
- Type assertions -> event.Type string check + *event.Data.Content deref
- session.WaitForIdle() -> session.SendAndWait(ctx, ...) (WaitForIdle doesn't exist)
- copilot.SystemMessage -> copilot.SystemMessageConfig

All 5 recipes verified to compile against SDK v0.1.23.
2026-02-11 06:20:23 -08:00
..
2026-02-02 14:01:22 +11:00
2026-02-02 14:01:22 +11:00
2026-02-02 14:01:22 +11:00

GitHub Copilot SDK Cookbook

This cookbook collects small, focused recipes showing how to accomplish common tasks with the GitHub Copilot SDK across languages. Each recipe is intentionally short and practical, with copypasteable snippets and pointers to fuller examples and tests.

Recipes by Language

.NET (C#)

Node.js / TypeScript

Python

Go

How to Use

  • Browse your language section above and open the recipe links
  • Each recipe includes runnable examples in a recipe/ subfolder with language-specific tooling
  • See existing examples and tests for working references:
    • Node.js examples: nodejs/examples/basic-example.ts
    • E2E tests: go/e2e, python/e2e, nodejs/test/e2e, dotnet/test/Harness

Running Examples

.NET

cd dotnet/cookbook/recipe
dotnet run <filename>.cs

Node.js

cd nodejs/cookbook/recipe
npm install
npx tsx <filename>.ts

Python

cd python/cookbook/recipe
pip install -r requirements.txt
python <filename>.py

Go

cd go/cookbook/recipe
go run <filename>.go

Contributing

  • Propose or add a new recipe by creating a markdown file in your language's cookbook/ folder and a runnable example in recipe/
  • Follow repository guidance in CONTRIBUTING.md

Status

Cookbook structure is complete with 4 recipes across all 4 supported languages. Each recipe includes both markdown documentation and runnable examples.