snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
98
apps/v4/content/docs/changelog/2026-06-github-registries.mdx
Normal file
98
apps/v4/content/docs/changelog/2026-06-github-registries.mdx
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
title: June 2026 - GitHub Registries
|
||||
description: Turn any public GitHub repository into a shadcn registry.
|
||||
date: 2026-06-01
|
||||
---
|
||||
|
||||
**You can now turn any public GitHub repository into a registry.**
|
||||
|
||||
Add a `registry.json` file at the root of the repository, define the items you
|
||||
want to distribute, and users can install them directly from GitHub with the
|
||||
`shadcn` CLI.
|
||||
|
||||
```bash
|
||||
npx shadcn@latest add <username>/<repo>/<item>
|
||||
```
|
||||
|
||||
For example, to install the `project-conventions` item from the `acme/toolkit` repository:
|
||||
|
||||
```bash
|
||||
npx shadcn@latest add acme/toolkit/project-conventions
|
||||
```
|
||||
|
||||
GitHub registries are source registries. You do not need to run `shadcn build`,
|
||||
publish generated item JSON files or set up a registry server. The CLI reads the
|
||||
root `registry.json`, resolves `include` entries, finds the requested item and
|
||||
installs the files declared by that item.
|
||||
|
||||
## Distribute anything
|
||||
|
||||
Registry items are not limited to components. A GitHub registry can distribute
|
||||
components, hooks, utilities, design tokens, feature kits, project conventions,
|
||||
agent instructions, testing setup, CI workflows, release workflows, templates,
|
||||
codemods, migration kits and other project files.
|
||||
|
||||
For example, a repository can expose a `project-conventions` item that installs
|
||||
shared docs, editor settings and agent instructions:
|
||||
|
||||
```json title="registry.json" showLineNumbers
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema/registry.json",
|
||||
"name": "acme-toolkit",
|
||||
"homepage": "https://github.com/acme/toolkit",
|
||||
"items": [
|
||||
{
|
||||
"name": "project-conventions",
|
||||
"type": "registry:item",
|
||||
"files": [
|
||||
{
|
||||
"path": "AGENTS.md",
|
||||
"type": "registry:file",
|
||||
"target": "~/AGENTS.md"
|
||||
},
|
||||
{
|
||||
"path": ".editorconfig",
|
||||
"type": "registry:file",
|
||||
"target": "~/.editorconfig"
|
||||
},
|
||||
{
|
||||
"path": "docs/conventions.md",
|
||||
"type": "registry:file",
|
||||
"target": "~/docs/conventions.md"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
GitHub registry addresses work with the same commands as other registry
|
||||
addresses.
|
||||
|
||||
List items from a GitHub registry:
|
||||
|
||||
```bash
|
||||
npx shadcn@latest list acme/toolkit
|
||||
```
|
||||
|
||||
Search items:
|
||||
|
||||
```bash
|
||||
npx shadcn@latest search acme/toolkit --query conventions
|
||||
```
|
||||
|
||||
View an item:
|
||||
|
||||
```bash
|
||||
npx shadcn@latest view acme/toolkit/project-conventions
|
||||
```
|
||||
|
||||
Install an item:
|
||||
|
||||
```bash
|
||||
npx shadcn@latest add acme/toolkit/project-conventions
|
||||
```
|
||||
|
||||
See the [GitHub Registries](/docs/registry/github) docs for the full guide.
|
||||
Reference in New Issue
Block a user