Getting Started
Foundations
Components
Command Line Interface
CLI tool that copies component source code directly into your project for full ownership and customization.
#Commands
#init
Set up DinachiUI in your project. Creates components.json, injects the color theme, installs base dependencies.
npx @dinachi/cli@latest init#add
Add components to your project. Copies source code and installs dependencies automatically.
npx @dinachi/cli@latest add buttonAdd multiple at once:
npx @dinachi/cli@latest add button input cardInstall all components:
npx @dinachi/cli@latest add --allOverwrite existing files:
npx @dinachi/cli@latest add button --overwrite#Global Install
For shorter commands, install globally:
npm install -g @dinachi/cliThen use dinachi init and dinachi add button directly.
#Configuration
After running init, your project will have a components.json:
json
{
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"css": "src/app/globals.css",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib"
}
}