Installation
Install and run the registry template locally.
After forking the template, install dependencies with Vite+ and start the local docs app.
vp install
vp devOpen the local URL from Vite+ to preview your docs, registry catalog, and install pages.
Customize the Registry
Update registry/config.ts before publishing your fork. This file controls the public registry identity, namespace, description, homepage, repository URL, and generated install URLs.
Add Registry Items
Scaffold new installable items under registry/items/** with the starter script.
bun --bun ./scripts/new.ts --type registry:ui --name example-card --description "A compact card component."You can also run bun --bun ./scripts/new.ts for an interactive prompt. Use --target for registry:page, registry:file, custom alias installs such as @ui/ai/prompt-input.tsx, or targeted registry:item files.
The scaffold creates the item source, _registry.mdx metadata and usage docs, and an optional _preview.tsx preview. Public documentation pages live directly in registry/docs/.
Verify Changes
Run the registry doctor after item changes, check the files you touched, and build before publishing.
bun --bun ./scripts/doctor.ts
vp check --fix <touched-file>
vp buildDeploy to Cloudflare Pages
The build prerenders the registry site into dist/client, including /registry.json,
/r/registry.json, every /r/<name>.json item, the home page, docs pages, Markdown pages,
llms.txt, and sitemap.xml. Cloudflare Pages can serve that directory directly without a
Worker runtime.
Use these Cloudflare Pages settings:
Build command: bun run build
Build output directory: dist/clientFor manual deployment:
bun run build
bunx wrangler pages deploy dist/clientStatic deployments should install registry items from the explicit /r/<name>.json URLs.
Protect the Home Page
Static Pages deployments cannot use a private key from application code for real access control. Protect the home page with Cloudflare Access instead:
Application type: Self-hosted
Application domain: <your-pages-domain>
Path: /
Policy: Allow your team, email list, or identity provider groupKeep registry JSON routes such as /registry.json and /r/* outside that Access rule if they
should stay installable by the shadcn CLI.