> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chappiesdk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chappie SDK: Native ChatGPT Assistant for iOS

> Add a native, streaming ChatGPT assistant to your iOS or macOS app in minutes. Chappie handles auth, context, and tool execution so you can focus on your app.

Chappie is a Swift SDK that lets you embed a ChatGPT-powered assistant directly into your iOS or macOS app. It handles the full lifecycle — signing users in with their ChatGPT account, managing conversation context, streaming responses in real time, and executing host-defined tools — all with a clean, Swift-native API.

<CardGroup cols={2}>
  <Card title="Installation" icon="box" href="/installation">
    Add Chappie to your Xcode project via Swift Package Manager
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Go from zero to a streaming assistant in under 10 minutes
  </Card>

  <Card title="Authentication" icon="key" href="/authentication/overview">
    Sign users in with their ChatGPT account using one SwiftUI view
  </Card>

  <Card title="Harnesses" icon="terminal" href="/concepts/harnesses">
    Declare your app's context, tools, and capabilities to the model
  </Card>
</CardGroup>

## How Chappie works

Chappie connects your app to the ChatGPT/Codex backend using your user's existing ChatGPT account — no OpenAI Platform API keys required. Users authenticate once via a device-code flow, and Chappie stores their credentials securely in Keychain. From there, you create a `ChappieClient` to send messages, stream responses, and call host-defined tools.

<Steps>
  <Step title="Add the package">
    Add `ChappieSDK` via Swift Package Manager from `https://github.com/b-nnett/chappie-sdk`.
  </Step>

  <Step title="Sign the user in">
    Drop `ChappieSignIn` into your SwiftUI view. It shows a guided onboarding sheet and handles the full device-code OAuth flow with ChatGPT.
  </Step>

  <Step title="Define a harness">
    Create a `ChappieHarness` that describes your app's surface — its name, capabilities, and any tools the model can call.
  </Step>

  <Step title="Send messages and stream responses">
    Use `client.send(_:)` for one-shot replies or `client.stream(_:)` for real-time streaming. Chappie maintains the conversation transcript automatically.
  </Step>
</Steps>

## Explore the SDK

<CardGroup cols={3}>
  <Card title="Streaming" icon="bolt" href="/concepts/streaming">
    WebSocket streaming with automatic SSE fallback
  </Card>

  <Card title="Host Tools" icon="wrench" href="/guides/host-tools">
    Let the model call Swift functions in your app
  </Card>

  <Card title="Context Management" icon="database" href="/guides/context-management">
    Snapshot, compact, and resume conversations
  </Card>

  <Card title="Runtime Store" icon="floppy-disk" href="/guides/runtime-thread-store">
    Persist transcripts across app launches
  </Card>

  <Card title="Models & Usage" icon="chart-bar" href="/concepts/models-and-usage">
    Select models and monitor usage limits
  </Card>

  <Card title="Configuration" icon="gear" href="/configuration/overview">
    Tune backoff, transport, and Keychain settings
  </Card>
</CardGroup>
