The PureKit UI CLI is a command-line tool that helps you quickly scaffold new components for your project.
npm install @purekit-ui/cliThe PureKit UI CLI is a command-line tool that helps you quickly scaffold new components for your project.
To use the CLI, you don't need to install it globally. You can run it directly using npx:
``bash`
npx @purekit-ui/cli add
The primary command for the CLI is add, which allows you to generate a new component based on predefined templates.
The CLI provides the following commands:
Scaffolds a single component by its name.
-
Example:
`bash`
npx @purekit-ui/cli add Button
Scaffolds all available components into your project.
Example:
`bash`
npx @purekit-ui/cli add --all
Displays an interactive list of all available components, allowing you to select one to generate.
Example:
`bash`
npx @purekit-ui/cli --list
This will create a new component directory named Button inside src/components/purekit-ui. If your project doesn't have a src directory, it will be placed in components/purekit-ui.
The CLI generates components from a set of templates located in the packages/cli/src/templates directory. Each template includes:
- A component file (e.g., Component.jsx).props.js` file that defines the default props for the component.
- A
These templates ensure that all generated components follow a consistent structure.