Command Line Interface
A powerful CLI tool that copies component source code directly into your project, giving you full control and customization.
How it works
Unlike traditional component libraries, DinachiUI CLI copies the actual source code into your project. This gives you full ownership and control over your components.
Full ownership
Code is copied to your project
Zero runtime dependencies
Only peer dependencies for utilities
Complete customization
Modify variants, styles, and behavior
TypeScript support
Full type safety out of the box
Installation
Global Installation
Install once, use everywhere
1npm install -g @dinachi/cliThen use: dinachi add button
NPX Usage
No installation required
1npx @dinachi/cli@latest initAlways uses the latest version
Commands
initInitialize DinachiUI in your project. Creates configuration file and installs dependencies.
1npx @dinachi/cli@latest initadd [component]Add a specific component to your project. Copies source code and installs dependencies.
1npx @dinachi/cli@latest add buttonadd --allInstall all available components at once.
1npx @dinachi/cli@latest add --alladd --overwriteOverwrite existing component files.
1npx @dinachi/cli@latest add button --overwriteConfiguration
After running init, you'll have a components.json file:
1{
2 "style": "default",
3 "rsc": true,
4 "tsx": true,
5 "tailwind": {
6 "config": "tailwind.config.ts",
7 "css": "src/app/globals.css",
8 "baseColor": "slate",
9 "cssVariables": true
10 },
11 "aliases": {
12 "components": "@/components",
13 "utils": "@/lib/utils",
14 "ui": "@/components/ui",
15 "lib": "@/lib",
16 "hooks": "@/hooks"
17 },
18 "iconLibrary": "lucide"
19}Examples
Setup new project
1# Initialize DinachiUI
2npx @dinachi/cli@latest init
3
4# Add components you need
5npx @dinachi/cli@latest add button input card
6
7# Start using them
8import { Button } from '@/components/ui/button'Add all components
1# Install all components at once
2npx @dinachi/cli@latest add --all
3
4# Or install globally for shorter commands
5npm install -g @dinachi/cli
6dinachi add --allUpdate existing component
1# Overwrite existing component with latest version
2npx @dinachi/cli@latest add button --overwrite
3
4# This will replace your existing button component
5# Make sure to backup any customizations first!