You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(shadcn): add support for registries index (#8128)
* feat(shadcn): add support for registries index
* fix
* fix
* chore: changeset
* feat(shadcn): update handling of add commands
* feat: add support for known registries
* docs: update index docs
Copy file name to clipboardExpand all lines: apps/v4/content/docs/registry/namespace.mdx
+1-77Lines changed: 1 addition & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Registry namespaces are prefixed with `@` and provide a way to organize and refe
41
41
42
42
## Decentralized Namespace System
43
43
44
-
We intentionally designed the namespace system to be decentralized. There is no central registrar for namespaces. You are free to create and use any namespace you want.
44
+
We intentionally designed the namespace system to be decentralized. There is [central registrar](/docs/registry/registrar) for open source namespaces but you are free to create and use any namespace you want.
45
45
46
46
This decentralized approach gives you complete flexibility to organize your resources however makes sense for your organization.
47
47
@@ -615,82 +615,6 @@ Resolution order:
615
615
2.**Circular Dependency Prevention**: Automatically detects and prevents circular dependencies
616
616
3.**Smart Installation Order**: Dependencies are installed first, then the resources that use them
617
617
618
-
We intentionally designed the namespace system to be decentralized. There is no central registrar for namespaces. You are free to create and use any namespace you want.
619
-
620
-
This decentralized approach gives you complete flexibility to organize your resources however makes sense for your organization.
621
-
622
-
You can create multiple registries for different purposes:
The open source registry index is a list of all the open source registries that are available to use out of the box.
7
+
8
+
When you run `shadcn add` or `shadcn search`, the CLI will automatically check the registry index for the registry you are looking for and add it to your `components.json` file.
9
+
10
+
You can see the full list at [https://ui.shadcn.com/r/registries.json](https://ui.shadcn.com/r/registries.json).
11
+
12
+
## Adding a Registry
13
+
14
+
You can submit a PR to add a registry to the index by adding it to the [registries.json](https://github.com/shadcn-ui/ui/blob/main/apps/v4/public/r/registries.json) file.
15
+
16
+
Here's an example of how to add a registry to the index:
1. The registry must be open source and publicly accessible.
28
+
2. The registry must be a valid JSON file that conforms to the [registry schema specification](/docs/registry/registry-json).
29
+
3. The registry is expected to be a flat registry with no nested items i.e `/registry.json` and `/component-name.json` files are expected to be in the root of the registry.
30
+
4. The `files` array, if present, must NOT include a `content` property.
0 commit comments