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

# Distributed Multi-Repository Setup

> Setup Simili Bot across multiple repositories with team autonomy (Pattern C)

# Distributed Multi-Repository Setup

Set up Simili Bot across multiple repositories with each team managing their own configuration while sharing a unified organization knowledge base. This is **Pattern C**.

## Prerequisites

1. Multiple GitHub repositories to manage.
2. Qdrant API Key & URL.
3. Gemini API Key.
4. Organization-level GitHub secrets configured.

***

## Setup steps

<Steps>
  <Step title="Base configuration (optional)">
    Create a shared configuration repository (e.g., `simili-config`) with a `base-config.yaml` to store common settings like Qdrant URL and collection.

    ```yaml theme={null}
    qdrant:
      url: "https://your-cluster.qdrant.io:6333"
      collection: "org-issues"
    defaults:
      cross_repo_search: true
    ```
  </Step>

  <Step title="Organization-level secrets">
    Add `ORG_QDRANT_URL`, `ORG_QDRANT_API_KEY`, and `ORG_GEMINI_API_KEY` to your organization-level secrets so all repos can access the same knowledge base securely.
  </Step>

  <Step title="Configure repositories">
    In each repository, create `.github/simili.yaml` extending the shared base:

    ```yaml theme={null}
    extends: "https://raw.githubusercontent.com/your-org/simili-config/main/base-config.yaml"
    repositories:
      - org: "your-org"
        repo: "backend"
        description: "REST APIs for the backend service"
    ```
  </Step>

  <Step title="Create workflows">
    In each repository, create `.github/workflows/simili-bot.yml` using the organization secrets:

    ```yaml theme={null}
    steps:
      - uses: similigh/simili-bot@v0.2.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          QDRANT_URL: ${{ secrets.ORG_QDRANT_URL }}
          QDRANT_API_KEY: ${{ secrets.ORG_QDRANT_API_KEY }}
          GEMINI_API_KEY: ${{ secrets.ORG_GEMINI_API_KEY }}
    ```
  </Step>

  <Step title="Test cross-repo search">
    Open issues with similar topics across different repositories. Simili Bot should identify them as related, even across repository boundaries, providing a unified view of your organization's issues.
  </Step>
</Steps>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cross-repo search doesn't work">
    Ensure `cross_repo_search: true` is enabled in your base configuration and all repositories are indexing to exactly the same Qdrant collection.
  </Accordion>

  <Accordion title="Configuration not found">
    Verify the `extends` URL is correct and publicly accessible. Ensure you are using the **Raw** GitHub URL.
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Modular configuration" icon="sliders" href="/configuration/modular-config" />

  <Card title="Config inheritance" icon="network-wired" href="/guides/config-inheritance" />
</CardGroup>
