Git repositories

Git repositories

Manage the Git repositories that feed ctx| search, Chat, MCP, and the knowledge graph.

Repositories are the primary source of truth for ctx|. Adding a repository gives the backend a Git URL to track, starts ingestion, and makes that code available to search, Chat, MCP, and knowledge graph extraction.

ctx| repositories list

What a Repository Enables

Each repository belongs to one organization and contributes to four surfaces:

  • Codesearch: cloned and indexed by Zoekt for fast text, file, and symbol retrieval.
  • Chat: available to the conversation graph as source material.
  • MCP: available to ctx_advisor and repo explorer tools for agent clients.
  • Knowledge graph: analyzed into extracted nodes and claims during ingestion.

Repository state is visible in the app as pending indexing, indexing, or indexed. The UI polls while indexing is in progress.

Core Workflows

Data Model

At the API level, a repository includes:

FieldMeaning
idStable repository ID, prefixed with repo_.
orgIdInternal organization ID that scopes the repository.
nameHuman-readable name, usually owner/repo for GitHub sources.
gitUrlClone URL used by ingestion.
indexReadyWhether the default checkout has completed search indexing.
lastIngestedHashLast commit hash processed by ingestion, when known.
zoektRepoIdInternal search index ID for the default checkout.

The public UI works from the organization slug in the path:

/:orgSlug/repositories
/:orgSlug/repositories/github/setup

The versioned REST API is scoped the same way:

/:orgSlug/api/v1/repositories