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

# GitHub

> Connect your repository so Glassray can read your code to generate a spec - and detect merged fixes.

Connecting GitHub lets Glassray read your repository to generate your [spec](/spec) - and detect when a fix you've merged resolves a [deviation](/deviations). It's how Glassray learns your agents' intent straight from the source.

## Connect

<Steps>
  <Step title="Open Integrations" icon="plug">
    In the dashboard, go to **Settings → Integrations** and click **Connect to GitHub**.
  </Step>

  <Step title="Authorize and grant access" icon="github">
    Authorize Glassray in the popup. Glassray needs the **`repo`** scope to read your code - grant it (and the repositories you want it to see) when prompted.
  </Step>

  <Step title="Pick a repository" icon="code-branch">
    Choose the repo and branch Glassray should read - during onboarding, or later from the **Deviations** page (**New spec**).
  </Step>

  <Step title="Glassray generates your spec" icon="sparkles">
    Glassray reads the code and generates the [spec](/spec) (about 3–5 minutes), then starts finding [deviations](/deviations).
  </Step>
</Steps>

## What the connection powers

<CardGroup cols={2}>
  <Card title="Spec generation" icon="file-lines">
    Glassray reads your repo to build the [spec](/spec) - the rubric it judges traces against.
  </Card>

  <Card title="Fix detection" icon="circle-check">
    When you merge a fix, Glassray detects the matching commit or pull request and marks the [deviation](/deviations) **fixed**.
  </Card>
</CardGroup>

<Info>
  Prefer not to connect your repository? You can [bring your own spec](/spec#bring-your-own-spec) instead.
</Info>
