
Before you start
GitOps clones your manifest repository and the repositories it indexes using the Git credentials you configure under Settings → Integrations. Connect a GitHub App or a personal access token first; see GitHub Integration. Automatic syncs on every push require the GitHub App (a personal access token cannot receive webhooks).How it works
You commit a manifest file (by defaultrepos.yaml) to a Git repository. Context7 clones that repository using the same Git credentials you already configured under Settings → Integrations (a GitHub App or a personal access token), reads the manifest, and compares it against the repositories it currently has indexed.
For each source in the manifest, Context7 decides what to do:
- Add it if it is in the manifest but not yet indexed.
- Re-index it if its manifest entry changed, for example a different branch, new folder filters, or a changed page limit, or if its last indexing run did not finish.
- Leave it untouched if it already matches. Running a sync with no changes is a safe no-op.
GitOps is the source of truth only for the repositories listed in the manifest. You can still add other repositories manually in the dashboard, and they will be left alone during a sync.
The manifest file
The manifest is a YAML file with a list of sources underrepos. An optional defaults block applies to every entry unless an entry overrides it.
An entry’s type selects which parser handles it. Omit type and the entry is treated as a Git repository, so manifests written before multi-source support keep working unchanged.
repos.yaml
url (or repoUrl). The remaining fields depend on type:
type | Fields |
|---|---|
git (default) | branch, folders, excludeFolders, excludeFiles, indexSourceCode — the same options as the Add Repository form. |
confluence | spaceKey (required), spaceId (Cloud only, resolved automatically from the key when omitted), spaceName, title, description. The whole space is indexed. |
website | maxPages, maxDepth, excludePatterns, title, description. |
llmstxt | maxPages, title, description. The URL must point to an llms.txt, llms-full.txt, or llms-small.txt file. |
openapi | title, description. |
Confluence entries reuse the site URL and API token you set under Settings → Integrations → Confluence, so no credentials go in the manifest. Website, llms.txt, and OpenAPI sources are fetched over public HTTP and need no credentials. Configure Confluence before adding Confluence entries, or the sync reports those entries as failed.
type, a field that does not belong to the entry’s type (a common source of silent mistakes), or a missing required field rejects the whole sync. Nothing changes until the file parses cleanly, so a malformed manifest can never partially apply or wipe your index.
Configuring in the dashboard
Open Settings → Indexing → GitOps, fill in the manifest repository, and save.| Setting | Description |
|---|---|
| Enable GitOps sync | Turns on automatic reconciliation (on startup, on the schedule, and on push). When off, nothing syncs automatically, but you can still run a sync by hand. |
| Manifest repository URL | The Git repository that holds the manifest. |
| Manifest path | Path to the manifest within that repository. Defaults to repos.yaml. |
| Branch | Branch to read the manifest from. Leave blank for the default branch. |
| Sync schedule | How often to reconcile automatically. Choose a preset or enter a custom cron expression. Set to Manual only to disable scheduled syncs. |
| Prune removed repositories | Delete GitOps-managed repositories that are no longer in the manifest. Off by default. |
When syncs happen
A reconcile runs in four situations:- On startup. When the instance boots with GitOps enabled, it reconciles immediately. This is what makes disaster recovery a single step: bring up a fresh instance pointed at the manifest repo and the index rebuilds itself.
- On a schedule. The cron schedule you set acts as a steady fallback that keeps the instance in line with the manifest.
- On push (webhook). If the manifest repository is on a connected GitHub App, every push triggers an immediate sync. See Webhooks below.
- On demand. Click Sync now in the dashboard, or call the API, to reconcile right away.