Build-time tokens (Style Dictionary). It
builds tokens.dtcg.json, tokens.json and tokens.flat.json.
Which file
1. Fetch in CI
Pin the version.
/7/ rather than /latest/: a build should not change because somebody
published while it was running, and two builds of the same commit should produce the same bytes.Bump the number as a deliberate commit, like any other dependency.--fail matters — without it curl writes the error body to your tokens file and the build continues
with garbage.
2. Configure Style Dictionary
Many brands
A build-time pipeline generates one output per brand, so loop:Discovering brands and versions
Rather than hard-coding the list, ask the API:servingUrls.version is the newest published version, so “pin to whatever is newest at
build time, and record it” is a few lines.
The API is not yet reachable with a machine credential — see
Authentication. Until it is, a CI integration means a user-backed token,
which is not something to put in a shared pipeline. Hard-coding the list is the honest
recommendation today.
Other DTCG tools
Anything that reads the DTCG format works the same way — fetchtokens.dtcg.json and point the tool
at it. $extends and $ref are the two places to be careful, because Livry preserves them without
applying them; if your tool emits either, Livry will store it faithfully and ignore it. See
Tokens.