
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
A production-ready template for building your own component registry with shadcn/ui compatibility and custom CLI tooling.
This starter kit provides everything you need to create, maintain, and distribute a component registry similar to shadcn/ui. Built with modern tooling and best practices, it enables developers to build their own design systems with seamless CLI integration.
npx your-registry add component CLIThis monorepo is built with Turborepo and follows a modular architecture:
design-registry-starter/
├── apps/
│ └── docs/ # Next.js documentation site
│ ├── app/ # App router pages
│ ├── content/ # MDX documentation
│ └── public/registry/ # Generated component registry
├── packages/
│ ├── ai/ # AI-specific components
│ ├── code-block/ # Code display components
│ ├── editor/ # Editor components
│ ├── shadcn-ui/ # Base shadcn/ui components
│ ├── snippet/ # Code snippet components
│ └── ui/ # Custom UI components
├── scripts/
│ ├── index.ts # CLI entry point
│ ├── generate-registry.js # Registry generation
│ ├── discover-components.js # Component discovery
│ └── register-all-components.js # Batch registration
└── dist/
└── index.js # Built CLI executable
npx your-registry add component)# Clone the repository
git clone https://github.com/your-username/design-registry-starter.git
cd design-registry-starter
# Install dependencies
pnpm install
# Start development server
pnpm dev
The documentation site will be available at http://localhost:3422
Edit package.json to reflect your registry:
{
"name": "your-registry-name",
"description": "Your custom component registry",
"homepage": "https://your-registry.com",
"repository": {
"type": "git",
"url": "https://github.com/your-username/your-registry.git"
},
"bin": {
"your-cli": "dist/index.js"
}
}
Modify scripts/index.ts to customize your CLI:
// Update the registry URL
const url = new URL(
`registry/${packageName}.json`,
'https://your-registry.com/' // Your registry URL
);
Create a new package in packages/:
mkdir packages/your-component
cd packages/your-component
Create the component structure:
packages/your-component/
├── package.json
├── src/
│ └── index.tsx
└── README.md
package.json:
{
"name": "@repo/your-component",
"version": "0.0.1",
"private": true,
"main": "src/index.tsx",
"types": "src/index.tsx"
}
src/index.tsx:
import React from 'react';
import { cn } from '@/lib/utils';
export interface YourComponentProps {
className?: string;
children?: React.ReactNode;
}
export const YourComponent = ({ className, children, ...props }: YourComponentProps) => {
return (
<div className={cn('your-component-styles', className)} {...props}>
{children}
</div>
);
};
export default YourComponent;
Discover all components in your packages:
pnpm discover:components
This script scans packages/ and identifies exportable components.
Create registry JSON files for all components:
pnpm register:all
This generates individual .json files in apps/docs/public/registry/ for each component.
Generate the main registry index:
pnpm generate:registry
This creates apps/docs/public/registry/index.json with all component metadata.
Each component generates a registry file like this:
{
"name": "your-component",
"description": "A custom component for your design system",
"dependencies": ["@radix-ui/react-slot"],
"devDependencies": ["@types/react"],
"registryDependencies": ["utils"],
"files": [
{
"name": "your-component.tsx",
"content": "...component source code..."
}
],
"type": "components:ui"
}
# Build the CLI
pnpm build:cli
# Test the CLI locally
pnpm test:cli
Ensure your registry is complete:
# Discover and register all components
pnpm discover:components
pnpm register:all
pnpm generate:registry
# Build the CLI
pnpm build:cli
# Build the documentation site
pnpm build
# Patch version (bug fixes)
pnpm publish:patch
# Minor version (new features)
pnpm publish:minor
# Major version (breaking changes)
pnpm publish:major
Deploy your docs site to Vercel, Netlify, or your preferred platform:
# For Vercel
vercel --prod
# For Netlify
netlify deploy --prod --dir=apps/docs/out
Once published, users can install components from your registry:
# Install your CLI globally or use with npx
npx your-registry-name add button card dialog
# Or install globally
npm install -g your-registry-name
your-registry-name add button
# Start development server
pnpm dev
# Add new components to packages/
# Run discovery and registration
pnpm discover:components && pnpm register:all
# Generate updated registry
pnpm generate:registry
# Test CLI locally
pnpm test:cli
# Lint code
pnpm lint
# Format code
pnpm format
# Type checking
pnpm build
# Validate registry
pnpm validate:registry
pnpm discover:components
pnpm register:all
pnpm generate:registry
pnpm build:cli
pnpm test:cli
pnpm publish:minor # or patch/major
| Script | Description |
|---|---|
pnpm dev | Start development server |
pnpm build | Build all packages and apps |
pnpm build:cli | Build CLI executable |
pnpm test:cli | Test CLI locally |
pnpm discover:components | Discover components in packages |
pnpm register:all | Generate registry files for all components |
pnpm generate:registry | Build registry index |
pnpm validate:registry | Validate registry structure |
pnpm publish:patch/minor/major | Version bump and publish |
pnpm lint | Lint codebase |
pnpm format | Format code |
Contributions are welcome! Please read our contributing guidelines and submit pull requests for any improvements.
git clone https://github.com/your-username/design-registry-starter.gitpnpm installgit checkout -b feature/amazing-featureThis project is licensed under the MIT License. See the LICENSE file for details.
Ready to build your own component registry? 🚀
Start by cloning this repository and following the setup instructions above. Within minutes, you'll have a fully functional component registry with CLI distribution capabilities!
FAQs
CLI tool for adding components from the Devcn UI Design Registry
The npm package devcn-ui receives a total of 0 weekly downloads. As such, devcn-ui popularity was classified as not popular.
We found that devcn-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.