Liking cljdoc? Tell your friends :D

Setup Guides

These guides walk you through configuring the Copilot SDK for your specific use case — from personal side projects to production platforms serving thousands of users.

Architecture at a Glance

Every Copilot SDK integration follows the same core pattern: your application talks to the SDK, which communicates with the Copilot CLI over JSON-RPC. What changes across setups is where the CLI runs, how users authenticate, and how sessions are managed.

flowchart TB
    subgraph YourApp["Your Application"]
        SDK["SDK Client"]
    end

    subgraph CLI["Copilot CLI"]
        direction TB
        RPC["JSON-RPC Server"]
        Auth["Authentication"]
        Sessions["Session Manager"]
        Models["Model Provider"]
    end

    SDK -- "JSON-RPC<br/>(stdio or TCP)" --> RPC
    RPC --> Auth
    RPC --> Sessions
    Auth --> Models

    style YourApp fill:#0d1117,stroke:#58a6ff,color:#c9d1d9
    style CLI fill:#161b22,stroke:#3fb950,color:#c9d1d9

The setup guides below help you configure each layer for your scenario.

Who Are You?

🧑‍💻 Hobbyist

You're building a personal assistant, side project, or experimental app. You want the simplest path to getting Copilot in your code.

Start with:

  1. Local CLI — Use the CLI already signed in on your machine
  2. Bundled CLI — Package everything into a standalone app

🏢 Internal App Developer

You're building tools for your team or company. Users are employees who need to authenticate with their enterprise GitHub accounts or org memberships.

Start with:

  1. GitHub OAuth — Let employees sign in with their GitHub accounts
  2. Backend Services — Run the SDK in your internal services

If scaling beyond a single server: 3. Scaling & Multi-Tenancy — Handle multiple users and services

🚀 App Developer (ISV)

You're building a product for customers. You need to handle authentication for your users — either through GitHub or by managing identity yourself.

Start with:

  1. GitHub OAuth — Let customers sign in with GitHub
  2. BYOK — Manage identity yourself with your own model keys
  3. Backend Services — Power your product from server-side code

For production: 4. Scaling & Multi-Tenancy — Serve many customers reliably

🏗️ Platform Developer

You're embedding Copilot into a platform — APIs, developer tools, or infrastructure that other developers build on. You need fine-grained control over sessions, scaling, and multi-tenancy.

Start with:

  1. Backend Services — Core server-side integration
  2. Scaling & Multi-Tenancy — Session isolation, horizontal scaling, persistence

Depending on your auth model: 3. GitHub OAuth — For GitHub-authenticated users 4. BYOK — For self-managed identity and model access

Decision Matrix

Use this table to find the right guides based on what you need to do:

What you needGuide
Simplest possible setupLocal CLI
Ship a standalone app with CopilotBundled CLI
Users sign in with GitHubGitHub OAuth
Use your own model keys (OpenAI, Azure, etc.)BYOK
Run the SDK on a serverBackend Services
Serve multiple users / scale horizontallyScaling & Multi-Tenancy

Configuration Comparison

flowchart LR
    subgraph Auth["Authentication"]
        A1["Signed-in CLI<br/>(local)"]
        A2["GitHub OAuth<br/>(multi-user)"]
        A3["Env Vars / Tokens<br/>(server)"]
        A4["BYOK<br/>(your keys)"]
    end

    subgraph Deploy["Deployment"]
        D1["Local Process<br/>(auto-managed)"]
        D2["Bundled Binary<br/>(shipped with app)"]
        D3["External Server<br/>(headless CLI)"]
    end

    subgraph Scale["Scaling"]
        S1["Single User<br/>(one CLI)"]
        S2["Multi-User<br/>(shared CLI)"]
        S3["Isolated<br/>(CLI per user)"]
    end

    A1 --> D1 --> S1
    A2 --> D3 --> S2
    A3 --> D3 --> S2
    A4 --> D2 --> S1
    A2 --> D3 --> S3
    A3 --> D3 --> S3

    style Auth fill:#0d1117,stroke:#58a6ff,color:#c9d1d9
    style Deploy fill:#0d1117,stroke:#3fb950,color:#c9d1d9
    style Scale fill:#0d1117,stroke:#f0883e,color:#c9d1d9

Prerequisites

All guides assume you have:

  • Copilot CLI installed (Installation guide)
  • One of the SDKs installed (official SDKs):
    • Node.js: npm install copilot-sdk-supercharged
    • Python: pip install github-copilot-sdk
    • Go: go get github.com/jeremiahjordanisaacson/copilot-sdk-supercharged/go
    • .NET: dotnet add package GitHub.Copilot.SDK
    • See the Getting Started tutorial for all 20 supported languages, including community SDKs for Java, Rust, Ruby, PHP, Swift, Kotlin, C++, and more.

If you're brand new, start with the Getting Started tutorial first, then come back here for production configuration.

Next Steps

Pick the guide that matches your situation from the decision matrix above, or start with the persona description closest to your role.

Can you improve this documentation? These fine people already did:
Jeremiah Isaacson & Patrick Nikoletich
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close