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

# GitHub Integration — Search PRs, Issues & Docs with AI

> Connect GitHub to Hyper via GitHub App to index pull requests, issues, and markdown files across repos and query them through AI agents.

GitHub is where your team's engineering decisions are made — in pull request reviews, issue discussions, and the markdown documentation living alongside your code. When you connect GitHub to Hyper, it indexes PRs, issues, and markdown files across your selected repositories, giving AI agents rich context about what your team has built, debated, and decided. Hyper supports multiple GitHub accounts and lets you choose which repositories to sync, keeping your memory layer focused on the projects that matter.

## Connect GitHub

<Steps>
  <Step title="Open Settings in the Hyper desktop app">
    Launch the Hyper desktop app and click **Settings** in the navigation, then select **Connections**.
  </Step>

  <Step title="Click Connect next to GitHub">
    Find GitHub in the list of available integrations and click **Connect**.
  </Step>

  <Step title="Install the Hyper GitHub App">
    You'll be directed to authorize the **Hyper GitHub App** on your GitHub account. This is a GitHub App installation — not a personal access token. Using a GitHub App gives Hyper precisely scoped access and is the secure, recommended approach for team use.
  </Step>

  <Step title="Select repositories to sync">
    During the GitHub App installation, choose which repositories Hyper can access — either all repositories on your account or a specific subset. You can update this selection later from your GitHub App settings.
  </Step>

  <Step title="Wait for the initial sync to complete">
    Hyper begins indexing PRs, issues, and markdown files from your selected repositories. Sync progress is visible in **Settings → Connections**.
  </Step>

  <Step title="Add more GitHub accounts (optional)">
    To connect additional GitHub accounts (for example, a personal account alongside an organization account), return to **Settings → Connections** and click **Connect** next to GitHub again.
  </Step>
</Steps>

<Info>
  Hyper uses a **GitHub App** installation rather than a personal access token. GitHub Apps have granular, auditable permission scopes and can be installed at the organization level — making them suitable for team-wide deployments.
</Info>

## What Hyper Syncs

| What's synced           | Details                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------- |
| **Pull requests**       | Title, description, comments, review discussions, and state                           |
| **Issues**              | Title, body, comments, labels, and state                                              |
| **Markdown files**      | All `.md` and `.mdx` files in the repository tree                                     |
| **Incremental updates** | New commits trigger re-sync via commit comparison — only changed files are re-indexed |
| **Multi-repo**          | You select which repositories to sync at install time                                 |
| **Multiple accounts**   | Each GitHub account is a separate connection                                          |
| **Source links**        | Each item links back to `https://github.com/{owner}/{repo}/blob/main/{path}`          |

<Note>
  Hyper reads repository content only — it never creates, edits, or closes PRs, issues, or files on your behalf.
</Note>

## Search GitHub with AI Agents

Once your repositories are indexed, your AI agents can search PRs, issues, and markdown files using powerful filters or natural language.

**Supported search filters:**

| Filter      | Example        | What it does                     |
| ----------- | -------------- | -------------------------------- |
| `author:`   | `author:alice` | Items created by a specific user |
| `state:`    | `state:open`   | Filter by open or closed state   |
| `is:pr`     | `is:pr`        | Pull requests only               |
| `is:issue`  | `is:issue`     | Issues only                      |
| `is:merged` | `is:merged`    | Merged pull requests             |
| `is:draft`  | `is:draft`     | Draft pull requests              |

**Example agent queries:**

```text theme={null}
Find open PRs by alice related to authentication
Search GitHub issues about database connection timeouts
Show me merged PRs in the api-service repo from last sprint
Find draft PRs in the frontend repo
Read PR #342 in owner/repo
Search markdown files mentioning "rate limiting" across all repos
Find closed issues labeled "bug" authored by bob
```

**What agents can do:**

| Action                | Description                                                                  |
| --------------------- | ---------------------------------------------------------------------------- |
| **Search PRs**        | Query pull requests with state, author, and type filters                     |
| **Search issues**     | Query issues with status, author, and label filters                          |
| **Search markdown**   | Full-text search across all indexed `.md` and `.mdx` files                   |
| **Read by reference** | Fetch a specific PR, issue, or file using `owner/repo#number` or a file path |

<Accordion title="How Hyper handles large repositories">
  For repositories with many files, Hyper performs an initial full crawl and then switches to incremental updates based on commit comparisons. Only files changed in new commits are re-indexed, keeping sync fast regardless of repository size.
</Accordion>

## Reconnect GitHub

If the GitHub App installation is suspended or revoked, Hyper will display a **Reconnect** prompt in **Settings → Connections**.

<Steps>
  <Step title="Go to Settings → Connections">
    Open the Hyper desktop app and navigate to **Settings → Connections**.
  </Step>

  <Step title="Click Reconnect next to the affected GitHub account">
    Each GitHub account has its own connection entry. Click **Reconnect** for the one that needs re-authorization.
  </Step>

  <Step title="Re-install or re-authorize the GitHub App">
    Follow the GitHub App authorization flow. Your previously indexed data is preserved — Hyper resumes sync from the latest commit.
  </Step>
</Steps>

## Disconnect GitHub

To remove a GitHub account from Hyper, go to **Settings → Connections**, find the GitHub entry, and click **Disconnect**. To fully revoke access, also uninstall the Hyper GitHub App from your GitHub account's settings page.

<Warning>
  Disconnecting GitHub removes all indexed PR, issue, and markdown data for that account from Hyper's memory layer. Other connected GitHub accounts are unaffected.
</Warning>
