Registry Format
regpick uses a registry format compatible with shadcn-ui v2. However, it extends the way you can serve and define registries to allow more flexible local development and directory-based structures.
Supported Registry Sources
Section titled “Supported Registry Sources”You can provide a registry source in three ways:
- HTTP URL: A fully qualified remote URL serving a
registry.json(e.g.,https://ui.shadcn.com/r). - Local File: A path to a local
.jsonfile containing the registry definition (e.g.,./my-registry/registry.json). - Local Directory: A path to a local directory (e.g.,
./tebra-icon-registry/registry). When a directory is provided,regpickwill scan it for.jsonfiles, treating each file as a single component definition (a “fat item”). This is great for keeping your registry definitions split into smaller, manageable files.
[!NOTE]
regpicknatively understands both single largeregistry.jsonarrays as well as directories containing multiple.jsonfiles.
Registry Item Structure (shadcn v2 compatible)
Section titled “Registry Item Structure (shadcn v2 compatible)”Whether it’s inside an array in registry.json or as a standalone file in a directory, an item looks like this:
{ "name": "button", "title": "Button", "description": "A button component.", "type": "registry:component", "dependencies": ["@radix-ui/react-slot"], "devDependencies": [], "registryDependencies": [], "files": [ { "path": "ui/button.tsx", "type": "registry:component", "target": "components/ui/button.tsx" } ]}Key properties
Section titled “Key properties”name: The unique identifier for the component.type: Used to determine the target installation folder based on yourtargetsByTypeconfiguration.dependencies&devDependencies: Packages thatregpickwill automatically prompt to install.files: The source files for the component.path: The path relative to the registry root (or the file itself if local).target(optional): IfpreferManifestTargetis enabled in your config,regpickwill use this path instead of the one inferred fromtargetsByType.url(optional): A remote URL for the file content.regpickautomatically converts GitHub web URLs (blob/...) to raw content URLs.content(optional): You can embed the file contents directly as a string to avoid additional network/file reads.
GitHub Integration
Section titled “GitHub Integration”regpick natively supports GitHub URLs. You can use standard “web” links to files in your manifest, and they will be automatically resolved to their raw counterparts:
{ "name": "my-component", "files": [ { "url": "https://github.com/user/repo/blob/main/src/component.tsx" } ]}This works for both the registry source itself and individual file URLs within the registry.
The pack Command
Section titled “The pack Command”To make it incredibly easy to create your own registries, regpick includes a pack command.
regpick pack ./src/components/uiHow pack works:
Section titled “How pack works:”[!WARNING] The static analysis used by
packis designed for simple imports. It may miss dynamically resolved modules or complexrequirestatements. Always verify the generatedregistry.json.
- It recursively scans the specified directory for
.tsand.tsxfiles. - It reads each file and uses static analysis to automatically extract external
importstatements, transforming them into thedependenciesarray. - It bundles all these components into a single valid
registry.jsonfile inside your current working directory. - The generated
registry.jsonis fully shadcn-compatible and can be immediately distributed or uploaded.