
Before you start
GitOps clones your manifest repository and the repositories it indexes using the Git credentials you configure under Workspace Settings › GitHub, GitLab or Other Git. 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 in Workspace Settings (a GitHub App or a personal access token under GitHub, GitLab or Other Git), 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 as long as the manifest does not list them.
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:
Confluence entries reuse the site URL and API token you set under Workspace Settings › 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.
Authority rules
Any entry can set anauthority block. It assigns authority labels to the library’s content, the same way the Authority section of the library settings does.
GitOps saves these rules also while authority labels are off, so you can prepare them before you turn the feature on. The rules change query results only after an admin turns on Enable authority labels under Workspace Settings → Access → Authority labels. The manifest declares rules only. Classes and the Enable authority labels setting stay in the dashboard.
repos.yaml
defaultsets the library rule: a class name, orexcludedto hide the whole library.- Each item in
ruleshas exactly oneprefixorglob, and exactly oneclassorexcluded: true. - A pattern that starts with
https://orhttp://matches the page URL. Any other pattern matches the page path. - A prefix matches whole path segments:
/draftsmatches/drafts/planbut not/drafts-old/plan. - The usual precedence applies: an exclusion always wins, then the most specific rule wins.
- The manifest owns only the rules it created. A sync adds, changes and removes only those rules.
- The dashboard shows a GitOps badge on these rules, and you cannot edit or delete them there. Change them in the manifest.
- Rules you make in the dashboard are left alone. If a manifest rule has the same match and pattern as a dashboard rule, the manifest takes that rule over.
- Remove the
authorityblock, and the next sync deletes the rules the manifest owned for that library. - Remove the whole entry with pruning off, and the library keeps its rules, but you can edit them in the dashboard again.
- Remove the whole entry with pruning on, and the sync deletes the library together with all of its rules.
gitops.
The manifest is validated strictly: an unknown 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 Workspace Settings › GitOps, fill in the manifest repository, and save.
The manifest repository is cloned with the Git credentials from Workspace Settings (GitHub, GitLab or Other Git), so private repositories work without any extra credentials. If you have not configured a GitHub App or personal access token for the host, the sync reports a clear error.
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.