Package Repositories
R, Python, and Julia rely on external sources for packages. Ricochet can override the default package repositories used when restoring the package environment for a content item.
By default, no overrides are applied — the sources defined in renv.lock, uv.lock, and Manifest.toml are used as-is.
Add a [repositories] section to ricochet-config.toml to set server-wide defaults.
Configuration
Section titled “Configuration”[repositories]allow_overrides = truer = { CRAN = "https://cran.rpkgs.com", MY_REPO = "https://my.repo.example.com" }python = ["https://pypi.org"]| Field | Description |
|---|---|
allow_overrides | When true, individual content items can define their own package sources in _ricochet.toml. Default true. |
r | A table of named repository URLs. Keys must consist of uppercase letters and underscores only (e.g. CRAN, RSPM). |
python | An array of index URLs passed to uv sync --index. Order matters — earlier entries take priority. |
Precedence rules
Section titled “Precedence rules”How package sources are resolved depends on the [repositories] configuration:
Server [repositories] set? | allow_overrides | Behavior |
|---|---|---|
| No | — | Lock file sources are used. Items may set their own overrides. |
| Yes | false | Server repositories are enforced for all items. Item-level overrides are ignored. |
| Yes | true | Server repositories are merged with item-level overrides. Item sources take precedence on conflict. |
How overrides are applied
Section titled “How overrides are applied”R package repository overrides are passed to renv via the RENV_CONFIG_REPOS_OVERRIDE environment variable during environment restoration.
Python
Section titled “Python”Python index overrides are passed as --index arguments to uv sync.
The order of URLs in the python array matters — earlier entries are checked first.