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

# GitCafe

> Connect GitCafe so the Sazabi agent can search your code, work on it in sandboxes, and open pull requests.

## Supported capabilities

Core integration

* **Core integration**: [GitCafe](https://docs.sazabi.com/catalogs/integrations/gitcafe.md#core-integration) — Connect GitCafe so the Sazabi agent can search your code, work on it in sandboxes, and open pull requests.

Each connection method has its own setup and permissions. Connecting one method does not enable the others.

## Core integration

## About

Connecting GitCafe gives the Sazabi agent access to the repositories a dedicated GitCafe account can see. GitCafe is a **forge** integration: the agent can search and read code, clone and push in sandboxes, and open pull requests.

> [!WARNING]
>
> **Limited release**
>
> GitCafe is in limited release and is not yet enabled for every organization. [Contact support](https://docs.sazabi.com/manage/support.md) to request access.

## Prerequisites

* A **dedicated GitCafe account** for Sazabi, added to your GitCafe organization with access to the repositories Sazabi should see. Sazabi acts as this account, so its name is what people see on Sazabi's comments and reviews.
* A **personal access token** from that account with these permissions:
  * Code: read and write
  * Repository metadata: read
  * Pull requests, reviews, and comments: write
  * Attachments: write
  * Repository webhooks: write
  * Credentials: delegate-write
* Organization admin access in Sazabi.

Credential delegate-write lets Sazabi give each sandbox its own one-hour token limited to the project's GitCafe repositories, so the stored token never enters a sandbox.

## Set up in the dashboard

**Step 1**

### Create the token in GitCafe

Sign in to GitCafe as the dedicated account and create a personal access
token with the permissions above. Copy it; GitCafe shows it once.

**Step 2**

### Open the GitCafe integration

In the dashboard, go to [**Settings > Integrations > GitCafe**](https://app.sazabi.com/settings/integrations/gitcafe).

**Step 3**

### Paste the token

Paste the **Personal access token** and connect. Sazabi checks the token
against the GitCafe API and records which account it belongs to before
saving.

**Step 4**

### Link repositories

Under [**Settings > Code**](https://app.sazabi.com/settings/code-search),
link the GitCafe repositories the project should use. Linking a repository
registers a webhook on it, so pushes, pull requests, reviews, and CI runs
reach Sazabi as they happen.

## Set up with the CLI

You can also connect GitCafe with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md). GitCafe is an API-key provider with one credential field, `apiToken`. Read the token from an environment variable rather than pasting it inline:

```bash theme={"system"}
export GITCAFE_TOKEN=...   # the dedicated account's personal access token
sazabi integrations connect gitcafe \
  --credentials "{\"apiToken\":\"$GITCAFE_TOKEN\"}"
```

## Mentions and personal accounts

Mention the dedicated account on a pull request, for example `@<account handle> why does this test fail?`, and Sazabi answers in the same conversation. Inline comments get a reply in their review thread.

Sazabi acts only on mentions from organization members who connected a personal GitCafe account under [**Settings > Connected accounts > GitCafe**](https://app.sazabi.com/settings/connected-accounts/gitcafe). Anyone else gets a reply explaining how to connect. When you have a personal account connected, pull requests and comments Sazabi writes for you are authored as you; cloning and code search always use the organization integration.

## Verify

Open [**Settings > Integrations > GitCafe**](https://app.sazabi.com/settings/integrations/gitcafe) and confirm the connection reads **connected**. Then ask the agent, in a thread for a project with a linked GitCafe repository, to find a file you know exists there.

## Troubleshooting

**Token rejected on connect**: confirm the token belongs to the dedicated account and has the permissions above.

**Connection shows needs attention**: the token expired or was revoked in GitCafe. Create a new token and reconnect.

**A mention gets "Sazabi couldn't act on this mention"**: connect your personal GitCafe account under [**Settings > Connected accounts > GitCafe**](https://app.sazabi.com/settings/connected-accounts/gitcafe), then mention the account again.

**Pushes or pull requests are not picked up**: relink the repository under [**Settings > Code**](https://app.sazabi.com/settings/code-search), which registers its webhook again.

## Further reading

> [card] [Integrations](https://docs.sazabi.com/catalogs/integrations.md)
>
> Browse the full integration catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.