Repositories
Connect, index, and pin codebases for Eridian Dev.
A repository is the unit Eridian Dev indexes. Completions, reviews, Q&A, and test generation all retrieve from the same index. Indexing is residency-pinned with the project. Embeddings never leave the pin.
Connect
POST /v1/dev/repositories
Authorization: Bearer eridian_sk_...
Content-Type: application/json
Idempotency-Key: repo-payments-core-connect
{
"project_id": "prj_dev_001",
"name": "payments-core",
"host": "github",
"clone_url": "https://github.example.bank/payments/core.git",
"default_branch": "main",
"include_globs": ["src/**", "internal/**", "go.mod", "package.json"],
"exclude_globs": ["**/*.min.js", "vendor/**", "**/*.generated.ts"]
}
Required scope: dev:write. Supported hosts: github, gitlab, bitbucket, azure_devops, and git_ssh (Enterprise). The clone credential is a project secret. It is not returned on subsequent reads.
Response
{
"id": "repo_payments_core",
"object": "eridian.dev.repository",
"status": "indexing",
"region": "eu-west-1",
"index": {
"commit": null,
"file_count": 0,
"chunk_count": 0
}
}
Poll GET /v1/dev/repositories/repo_payments_core until status is ready. Typical first index for a 400k-line tree is 8 to 20 minutes depending on region.
Indexing
Eridian chunks, embeds, and stores the tree in the project region. Reindex is incremental on push.
POST /v1/dev/repositories/repo_payments_core/index
Authorization: Bearer eridian_sk_...
{
"ref": "refs/heads/main",
"sha": "8f3a2b1c",
"mode": "incremental"
}
| Field | Meaning |
|---|---|
mode | incremental (default) or full |
ref | Git ref to materialize |
sha | Optional pin. If omitted, the tip of ref is used |
A full reindex invalidates completion cache keys that include file hashes. That is expected. See Semantic Caching.
Webhooks from the Git host
Install the Eridian Git app or send push events yourself:
POST /v1/dev/repositories/repo_payments_core/hooks/push
Authorization: Bearer eridian_sk_...
X-Eridian-Git-Event: push
{
"ref": "refs/heads/main",
"after": "8f3a2b1c"
}
Verify host signatures before you forward. Eridian verifies the Git app path. Custom forwarders are your responsibility.
Secrets and generated files
Do not index secrets. Default excludes cover .env, *.pem, id_rsa, and common key globs. Add desk-specific excludes on the repository object. If a secret is committed, rotate it in the source system. Eridian redacts high-entropy tokens in Q&A citations when PII redaction is on, but that is not a substitute for not indexing the file.
Multi-repo programs
A Dev project may hold many repositories. Q&A and review can span them when you pass repository_ids. Cross-repo retrieval never crosses region pins. A eu-west-1 project cannot retrieve from an ap-southeast-1 index.
Disconnect
POST /v1/dev/repositories/repo_payments_core/archive
Authorization: Bearer eridian_sk_...
Archiving drops the index at the next retention clock. Audit events remain. Required scope: dev:write plus dual control on Enterprise when evals_required is true.
See Dev API and Dev Limits.
Production API credentials are issued with an institution workspace. Contact sales if you need access.