Command-Line Interface (CLI)
Learn how to use the PureKit UI CLI to enhance your development workflow.
Installation
The PureKit UI CLI is a command-line tool that helps you quickly scaffold new components. It's designed to be used within a project that already has PureKit UI installed. You can run it directly with npx.
Usage
To add a new component, run the `add` command followed by the component's name. For example, to add a new `Button` component:
This command will create a new folder for your component, typically at src/components/purekit-ui
. If your project doesn't have a `src` directory, it will be placed in components/purekit-ui
.
Available Commands
add <ComponentName>
Scaffolds a single component by name.
add --all
Scaffolds all available components into your project.
--list
Shows an interactive list of all available components and prompts you to choose one to generate.
Template Structure
The CLI uses templates to generate component files. These templates are located in the packages/cli/src/templates
directory. Each component template consists of a component file and a props.js
file, which defines the default props for the component.