shadcn CLI
Install Hewn through the shadcn CLI and MCP with a namespaced registry.
Hewn publishes a shadcn-schema registry alongside the native
Hewn CLI registry. Use it when you already standardize on
components.json, the shadcn CLI, or the shadcn MCP.
The native hewn CLI and /r/*.json payloads are unchanged. The shadcn
output lives at /r/shadcn/ and is generated from the same packages/ui
source.
Configure the namespace
Add @hewnui to components.json under registries. The URL always
comes from this deployment’s site origin — do not hard-code a domain:
{
"registries": {
"@hewnui": "https://hewnui.dev/r/shadcn/{name}.json"
}
}
Or register it with the CLI:
Replace <site-url> with the origin shown above (or your preview URL).
Point the UI alias at a folder that can hold nested component packages (the
registry installs into @ui/<name>/… and shared @ui/utils, @ui/providers,
@ui/theme):
Install components
npx shadcn@latest add @hewnui/button
npx shadcn@latest add @hewnui/dialog @hewnui/data-table
Shared foundation items resolve automatically via registryDependencies:
| Item | Type | Role |
|---|---|---|
utils | registry:lib | cn helper |
providers | registry:lib | theme / material / radius / motion providers |
styles | registry:lib | shared field and overlay classes |
motion-presets | registry:lib | Motion springs + LazyMotion loader |
tokens | registry:theme | pack CSS, radius, glass, @theme bridge |
npm packages listed on each item (react-aria-components, motion,
@tanstack/react-table, …) are installed by the shadcn CLI.
Wire CSS and providers
After the first install, import the theme layer in your global CSS (Tailwind v4):
Wrap the app with the copied providers (theme is required). Import each file
from @/components/hewn/providers/:
shadcn MCP
With the same components.json registries entry, the shadcn MCP can list and
inspect @hewnui/* items. Catalog discovery uses
/r/shadcn/registry.json; individual items use /r/shadcn/{name}.json.
Native CLI still available
Prefer copy-via-Hewn tooling? Use hewn CLI and the
original /r/*.json registry — both channels stay in sync from
packages/ui.