Reference
CLI
Use the shadcn CLI to resolve Ein UI registry items and copy their source into your project.
The model
The CLI is a source distribution workflow. It writes files and dependencies into your app; Ein UI is not a runtime package you import from `node_modules`.
npx shadcn@latest add @einui/glass-card
Command reference
init
Create or configure shadcn in a project.
Usage
npx shadcn@latest init
Example
npx shadcn@latest init
add
Copy one or more registry items into your project.
Usage
npx shadcn@latest add [items...]
Example
npx shadcn@latest add @einui/glass-card @einui/glass-button
diff
Compare a local item with its registry source.
Usage
npx shadcn@latest diff [item]
Example
npx shadcn@latest diff @einui/glass-card
Register Ein UI once
Add this fragment to the existing `components.json`. The namespace expands {@einui/name} into the remote registry URL.
components.jsonjson
"registries": {"@einui": "https://ui.eindev.ir/r/{name}.json"}
The full project configuration stays yours. The registry only tells shadcn where to resolve Ein UI items.
When a command fails
- Confirm the namespace URL uses
https://ui.eindev.ir/r/{name}.json. - Confirm the item name exists in the registry catalog.
- If files already exist, inspect the diff before replacing local changes.
- Install dependency errors reported by the item, then run the command again.