init
Use the init command to initialize configuration and dependencies for a new project.
The init command installs dependencies, adds the cn util and configures CSS variables for the project.
npx headcn@latest initadd
Use the add command to add components and dependencies to your project.
npx headcn@latest add [component]build
Use the build command to generate the registry JSON files.
npx headcn@latest buildThis command reads the registry.json file and generates the registry JSON files in the public/r directory.
To customize the output directory, use the --output option.
npx headcn@latest build --output ./public/registry