Getting Started CLI
CLI
The CLI is inspired by the Shadcn CLI.
init
Use the init
command to initialize uilabs in your project.
The init
command add the uilabs.config.json
file to your project and optionally installs @uilabs/utils
package.
npx uilabs-cli init
You will be asked a few questions to configure uilabs.config.json
:
? Would you like to use TypeScript? › no / yes (default)
? Configure the import alias for components: › @/components
? Would you like to install @uilabs/utils package? › no / yes (default)
? Are you using React Server Components? › no / yes (default)
Options
Usage:
uilabs-cli init [options]
Options:
-d, --defaults use default values i.e yes, Tailwind, @/components, yes and yes. (default: false)
-y, --yes skip confirmation prompt. (default: false)
-c, --cwd <cwd> the working directory. defaults to the current directory.
-h, --help display help for command
add
Use the add
command to add components and dependencies to your project.
npx uilabs-cli add [component-id]
Options
Usage:
uilabs-cli add [options] [components...]
Arguments:
component-id The component ID that you can find in the component installation tab
Options:
-y, --yes skip confirmation prompt. (default: false)
-o, --overwrite overwrite existing files. (default: false)
-c, --cwd <cwd> the working directory. defaults to the current directory.
-p, --path <path> the path to add the component to.
-h, --help display help for command