Guides
A registry is a folder of static JSON. Host one for your team's own components and install them with the same commands, checks and lockfile.
The CLI reads two kinds of file: registry.json at the root, and items/<id>.json for each item. Any static host works, and so does a directory on disk.
my-registry/
├── registry.json # index: every item's id, name, type, version
└── items/
├── brand-button.json # full item: metadata + inlined file contents + hashes
└── promo-card.jsonIn this repository, source items live in registry/default/<type>/<id>/ with an item.json, and node scripts/build-registry.mjs produces the files above, inlining each source file with its SHA-256 hash. The same layout and builder work for your own items. See Contributing for the item.json format.
Pass --registry to add, update, diff, list, search or info to use another registry for that run:
npx nativra-cli add promo-card --registry https://ui.acme.devnpx nativra-cli list --registry ./packages/ui-registryTo make it permanent, change the url of the default entry in nativra.json. Every command without --registry then uses it.
Register additional sources by name:
npx nativra-cli registry add acme https://ui.acme.devnpx nativra-cli registry listTop-level ids passed to add always resolve from default. Named registries are used for registryDependencies that name them, so an item in one registry can depend on items in another:
{
"id": "promo-card",
"name": "Promo Card",
"type": "block",
"registryDependencies": [
{ "id": "card" },
{ "id": "brand-button", "registry": "acme" }
]
}