Skip to content
ricochet

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.

ricochet-config.toml
[repositories]
allow_overrides = true
r = { CRAN = "https://cran.rpkgs.com", MY_REPO = "https://my.repo.example.com" }
python = ["https://pypi.org"]
FieldDescription
allow_overridesWhen true, individual content items can define their own package sources in _ricochet.toml. Default true.
rA table of named repository URLs. Keys must consist of uppercase letters and underscores only (e.g. CRAN, RSPM).
pythonAn array of index URLs passed to uv sync --index. Order matters — earlier entries take priority.

How package sources are resolved depends on the [repositories] configuration:

Server [repositories] set?allow_overridesBehavior
NoLock file sources are used. Items may set their own overrides.
YesfalseServer repositories are enforced for all items. Item-level overrides are ignored.
YestrueServer repositories are merged with item-level overrides. Item sources take precedence on conflict.

R package repository overrides are passed to renv via the RENV_CONFIG_REPOS_OVERRIDE environment variable during environment restoration.

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.