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

# Multi-Repo Support

> Work across multiple repositories simultaneously with Blocks

Blocks can search, analyze, and make changes across multiple repositories in a single session. It automatically identifies relevant repositories from your workspace, the platform you're using (GitHub, GitLab, Bitbucket, Slack, Linear), and any repo names you mention explicitly.

When in doubt, being explicit is always faster:

```
@blocks search only in 'backend-api' and 'auth-service' for...
```

## Example Use Cases

### Cross-repo search

```
@blocks find all places where we're using the old authentication API across all repos
```

Blocks searches all connected repositories and returns matching files, line numbers, and links.

### Coordinated changes

```
@blocks update the user model interface in both the backend and frontend repos to add the new 'role' field
```

Blocks modifies files across repositories and opens a separate PR in each. All PRs created in the same session are linked to that session for easy tracking.

### Architecture analysis

```
@blocks explain how the user authentication flow works from the React frontend through the API gateway to the auth service
```

Blocks traces code paths across repository boundaries and explains how the services interact.

### Consistency checking

```
@blocks check if our error handling patterns are consistent between the backend and frontend repos
```

Blocks identifies inconsistencies across repos and suggests a unified approach.

## Repository Context in Different Platforms

### In GitHub, GitLab, or Bitbucket

When you mention `@blocks` in an issue or PR, Blocks has access to the current repository by default. You can reference other connected repos explicitly, and Blocks can create PRs in any accessible repo.

### In Slack

All connected repos are in scope. Best for cross-repo questions and status updates.

### In Linear

All connected repos are in scope. Blocks can create PRs across repos and reference them back in the Linear issue.

## Limitations

### Permissions

Blocks can only access repositories you've explicitly granted access to. In organization workspaces, permissions are managed at the workspace level.

### Performance

Large operations across many repos take longer. Narrow the scope with explicit repo names or more specific queries if you need faster results.

### Coordinating PRs

When Blocks creates multiple PRs for a single change, review them together before merging. Use [Plan Mode](/using-blocks/features/plan-mode) for complex multi-repo changes where you want to confirm the approach first.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Blocks Can't Access a Repository">
    Grant Blocks access to the repository:

    1. Go to Dashboard → Settings → Integrations
    2. Select your provider (GitHub, GitLab, or Bitbucket)
    3. Click "Configure" to add more repositories and approve permissions
  </Accordion>

  <Accordion title="Blocks Searches Wrong Repositories">
    Be explicit about which repos to search:

    ```
    @blocks search only in 'backend-api' and 'auth-service' repos for...
    ```
  </Accordion>

  <Accordion title="Multi-Repo Operation Too Slow">
    Narrow the scope:

    * Specify which repositories to work with
    * Break large operations into smaller chunks
    * Use more specific queries to reduce search space
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/using-blocks/getting-started">
    Learn the basics of using Blocks
  </Card>

  <Card title="Plan Mode" icon="clipboard-list" href="/using-blocks/features/plan-mode">
    Plan complex multi-repo changes before implementing
  </Card>

  <Card title="Organization Workspaces" icon="users" href="/using-blocks/workspaces/organization-workspaces">
    Manage team access to multiple repositories
  </Card>
</CardGroup>
