# Connect GitHub to EkLine Docs Agent

import { Steps, Aside } from '@astrojs/starlight/components';

Connect your GitHub organization to EkLine so the Docs Agent can monitor your repositories, review pull requests, and generate documentation automatically.

## Prerequisites

- An EkLine account with an organization. [Sign up](https://ekline.io) if you haven't already.
- Admin access to the GitHub organization you want to connect.

## Install the GitHub App

<Steps>

1. **Open GitHub integration settings.**

   Go to your [EkLine Dashboard](https://ekline.io/dashboard) and navigate to **Settings → Organization → GitHub Integration**.

2. **Start the installation.**

   Click the **Install on another GitHub organization** button. This redirects you to GitHub to authorize the EkLine app.

   <Aside type="note">
   If this is your first GitHub connection, the button reads **Install the GitHub App**.
   </Aside>

3. **Select your GitHub account.**

   On the GitHub authorization page, select the user account you want to use to authorize EkLine.

4. **Select the target organization.**

   Choose the GitHub organization where you want to install the EkLine app.

5. **Choose repository access.**

   GitHub shows two options:

   - **All repositories** — Grants EkLine access to every repository in the organization.
   - **Only select repositories** — Lets you pick specific repositories.

   Select **Only select repositories** and search for the repositories you want EkLine to monitor. You can always change this later in your GitHub organization settings.

   <Aside type="tip">
   Start with a few key documentation repositories. You can add more repositories at any time from the EkLine settings page.
   </Aside>

6. **Complete the GitHub installation.**

   Click the **Install** button. GitHub redirects you back to EkLine to complete the connection.

</Steps>

## Connect the organization in EkLine

<Steps>

1. **Select your organization.**

   On the **GitHub App Setup** page, use the **Select an organization** dropdown to choose the GitHub organization you installed the app on.

2. **Finish the connection.**

   Click the **Connect GitHub** button. EkLine links your GitHub organization and loads the available repositories.

</Steps>

## Configure repositories

After connecting, the GitHub integration settings page shows two sections for adding repositories:

| Section | Purpose |
|---------|---------|
| **Documentation Repositories** | Repositories containing your documentation files. Supports path configuration for targeting specific directories or files. |
| **Code Repositories** | Source code repositories that EkLine uses for context when generating or reviewing documentation. |

### Add documentation repositories

<Steps>

1. **Search and select a repository.**

   Use the search field under **Documentation Repositories** to find and select a repository.

2. **Add documentation paths.**

   Click the **Add Path** button next to the repository. Enter the file or directory path you want EkLine to monitor (for example, `docs/`, `README.md`, or `content/`).

   Click **Save** to confirm. The path appears as a tag that you can remove later.

   <Aside type="tip">
   You can add multiple paths per repository. Use comma-separated values to add several paths at once.
   </Aside>

3. **Enable monitoring.**

   Toggle the **Enable monitoring** switch to let EkLine automatically monitor the repository for documentation changes.

4. **Save your configuration.**

   Click **Save**. A success notification confirms that the GitHub integration has been updated.

</Steps>

### Add code repositories

Use the search field under **Code Repositories** to select source code repositories. These provide EkLine with additional context for documentation generation and review but do not require path configuration.

## Verify the connection

After completing the setup, confirm everything is working:

- The **GitHub App installations** section shows your connected organization.
- Your selected repositories appear under **Documentation Repositories** or **Code Repositories**.
- Documentation paths are displayed as tags next to their repositories.
- The **Enable monitoring** toggle is active for repositories you want to track.

## Next steps

- [Use the GitHub PR bot](/agent/github-integration/) to generate documentation from pull request comments.
- [Set up automatic PR review](/agent/automatic-pr-review) so EkLine detects when PRs need documentation updates.
- [Set up the GitHub Action](/reviewer/quickstart/github-action/) to run automated style checks on every pull request.

---

## Stuck?

Reply to your welcome email or contact support@ekline.io. We read every message.