A CLI with helper commands for managing ColidyUI components inside a Next.js project.
- Initialization of the ColidyUI components into a Next.js project (
init
command). - Installation of specific or all components (
install
command). - Uninstallation of components (
uninstall
command).
To install the ColidyUI CLI, use npm:
npm install -g @colidy/ui
# or
npx @colidy/ui
To initialize ColidyUI inside your Next.js project, run:
colidyui init
This command checks for required files (tailwind.config.ts
, tsconfig.json
, globals.css
) and sets up the necessary configurations.
To install a specific ColidyUI component, use:
colidyui install <component_name>
You can also install multiple components at once by separating their names with commas:
colidyui install component1,component2
To uninstall a specific ColidyUI component, use:
colidyui uninstall <component_name>
To list all available ColidyUI components, run:
colidyui components
-
Config Management:
- The script checks and manages a local
colidy.config.json
file to store configurations like the directory for component installation. - Provides functions to get, update, and validate the configuration.
- The script checks and manages a local
-
Component Installation:
- Fetches the list of components from a GitHub repository.
- Validates component names and dependencies.
- Installs components into the specified directory, handles dependencies, and logs the process.
-
Component Uninstallation:
- Removes a specified component from the project directory.
-
Command Structure:
- The CLI uses
commander
to define commands (init
,install
,uninstall
) and their respective actions.
- The CLI uses