marketplace:index
Builds the marketplace index, one index.json with every released feature’s contract and every published SPL model. marketplace:search, feature:info and the marketplace web app read it. Run it with --local during development to index your workspace offline.
Example
Index the default organisation from the forge.
splent marketplace:index
Index the workspace offline.
splent marketplace:index --local
Build the published index in CI from a curated list of sources.
splent marketplace:index --registry registry.toml --output ./public/index.json
Options
| Option | Description |
|---|---|
--org ORG |
Forge organisation to index. Repeatable. Defaults to SPLENT_DEFAULT_ORG, then splent-io. |
--repo ORG/REPO |
An extra repository to index, such as a third-party feature outside the organisations. Repeatable. |
--registry FILE |
A registry.toml that lists the organisations and repositories to index. |
--local |
Index the editable features and SPL models of the workspace instead of the forge and the marketplace. Features need no network. |
--output PATH |
Where to write the index. Defaults to .splent_cache/marketplace/index.json. |
--no-pypi |
Skip the PyPI check, which is faster. |
What it does
- Features. For every
splent_feature_*repository it reaches, it takes the latest semver tag, downloadspyproject.tomlat that tag and turns[tool.splent.contract]into an entry. The entry also lists the settings declared under[tool.splent.config], each with its default, whether only the deployment can supply it (<SET>) and its comment (see Architecture). A repository without a released tag is reported and skipped. - SPL lines. It reads every line from the marketplace’s public
GET /api/v1/splsatSPLENT_MARKETPLACE_URL(https://marketplace.splent.ioby default) and indexes each at the DOI it publishes. The model is read by that DOI, from.splent_cache/spls/or UVLHub, so unpublished edits in a working copy never reach the index. The line’s version fillsuvl.version. - Models. It parses each model (mandatory and optional features, alternative groups, constraints). A model that cannot be fetched is indexed without one, with a warning, and never fails the build.
- Relations. It computes
used_by(reverse dependencies) and the collisions, features that provide the same route, service or model. - Writes the index atomically, so an interrupted write leaves the previous index readable.
The forge is the one the CLI is configured for, git.splent.io by default (see Tokens). Set SPLENT_FORGE_TOKEN, or GITHUB_TOKEN, to raise the API rate limit and reach private repositories.
With --local
It indexes every SPL model the workspace knows, meaning the working copies in splent_spl_*/, the models in .splent_cache/spls/, the ones products pin by DOI, and the one the CLI ships a pin for (sample_splent_spl). A model missing from disk is downloaded by DOI when possible. When that fails the SPL is indexed without its parsed model and ` could not fetch UVL for
The registry file
[registry]
orgs = ["splent-io"]
repos = ["some-org/splent_feature_billing"]
Third-party authors are listed by adding their line here through a reviewed pull request. The marketplace never accepts pushed data.
Special cases
- A rate limit, a refused request or an unreadable marketplace. The build stops before writing anything, so a partial build never replaces a good index.
- An organisation that is not found or your token cannot see. The build stops the same way and exits 1. Names are not normalised, so
splent_iofails wheresplent-ioworks.❌ Org 'splent_io' not found or not accessible. Check the org name and that your token can see it. Index NOT written. - An SPL line with a name that is not lowercase letters, digits and underscores. It is skipped with a warning, since the name becomes part of a cache path.
skipped an SPL line with an invalid name 'Bad-Name' (expected lowercase letters, digits and underscores)
See also
- Marketplace explains how consumers pick the local copy or
SPLENT_INDEX_URL.