rattler_index
rattler_index creates or updates conda channel indexes by writing
repodata.json, optional compressed repodata, and optional sharded repodata for
packages stored on a local filesystem or in S3.
CLI Usage
Index a local channel:
rattler-index --config ./rattler-config.toml fs ./channel
Index an S3 channel:
rattler-index --config ./rattler-config.toml s3 s3://my-bucket/my-channel
The --config flag points at the same TOML configuration file used by pixi. It
configures S3 credentials, concurrency, and per-channel index options under the
[index-config] section.
When --config is omitted, rattler-index falls back to its built-in defaults
(write-zst = true, write-shards = true, no advertised repodata revisions,
from-index-json revision assignment, no channel metadata).
Per-channel index configuration
Index options live in [index-config] and follow the same shape as
[repodata-config]:
a flat default block with optional per-channel overrides keyed by URL or
absolute path. The most specific entry wins; less-specific entries supply
fallback values, and [index-config] itself is the final fallback.
# Defaults applied when no per-channel entry matches
[]
= true
= true
= ["v3"]
= "from-index-json"
# Per-host: applies to every channel under this bucket
[]
= "../packages/"
# Per-channel: most specific entry wins, then falls back to the host entry,
# then to [index-config]
[]
= false
= "latest"
[]
= "../conda-forge"
# Local directory keys are absolute paths
[]
= "../packages/"
Matching rules:
- Keys are compared against the canonical channel target — the full URL for
remote channels (
s3://...) or the canonicalized absolute path for local channels. - Match is on path-component boundaries:
s3://my-bucketmatchess3://my-bucket/stagingbut nots3://my-bucket-other/staging. - All matching keys are layered onto
[index-config]in shortest-to-longest order, so the most specific entry overrides earlier values field by field.
Supported fields
| Field | Type | Description |
|---|---|---|
write-zst |
boolean | Writes repodata.json.zst. Defaults to true. |
write-shards |
boolean | Writes repodata_shards.msgpack.zst and shard files. Defaults to true. |
repodata-revisions |
array | Repodata revisions to enable. Each entry is a string ("v3", "legacy"). The indexer fills revision package counts and timestamps while writing repodata. |
package-revision-assignment |
string | Controls which repodata-revisions bucket a freshly indexed package lands in. from-index-json (default) reads the revision from each package's info/index.json, so legacy packages stay in the legacy maps and v3-tagged packages go to the v3 bucket. latest is an opt-in override that forces every package into the newest configured revision — useful for migrating a whole channel onto v3 in one shot. A future revision-assignment mode will pick based on a package's timestamp so repodata can be deterministically recreated. |
base-url |
string | Writes info.base_url in generated repodata.json and sharded repodata metadata. May be relative or absolute. |
channel-relations.base |
string | A single channel reference with higher priority than this channel, written to info.channel_relations.base. |
channel-relations.overrides |
string | A single channel reference with lower priority than this channel, written to info.channel_relations.overrides. |
channel-relations.base and channel-relations.overrides follow
CEP-42 channel relationship metadata
and must not point to the same channel.
Common configurations
Advertise v3 repodata for all channels:
[]
= ["v3"]
Advertise v3 repodata and assign every package to the newest configured revision for one specific channel:
[]
= ["v3"]
= "latest"
Declare CEP-42 channel relationships:
[]
= "../conda-forge"
= "../fallback"
The generated repodata.json then contains the metadata under info, for
example:
The same channel metadata is also written into the sharded repodata index when
write-shards is enabled.