Add the registry to your project
The registry extends the shadcn CLI with CS components and utilities. Installation copies their source files directly into your project.
1. Initialize shadcn
Complete this once for a project that does not already have a components.json file.
bash
npx shadcn@latest init2. Add the registry
Add the @cs namespace to components.json. Replace a local URL with the production address for a deployed registry.
json
{
"registries": {
"@cs": {
"url": "https://registry.ceskysoftware.cz/r/{name}.json",
"headers": {
"Authorization": "Bearer ${REGISTRY_TOKEN}"
}
}
}
}3. Store the token locally
Create or update .env.local. The variable name must match the name used in the registry configuration.
dotenv
REGISTRY_TOKEN=your-registry-token4. Install items
Install components and utilities with the shadcn CLI and the @cs namespace. The CLI also installs their declared dependencies.
Components
bash
npx shadcn@latest add @cs/formUtilities
bash
npx shadcn@latest add @cs/action-result