CLI
The CLI offers a comprehensive suite of commands to initialize, manage, and improve your NextUI projects. It enables you to add
, remove
, or upgrade
individual components, assess the health of your project, and more.
Installation
Requirements:
Global Installation
To install the CLI
globally, execute one of the following commands in your terminal:
Without Installation
Alternatively, you can use the CLI
without a global installation by running the following command:
Quick Start
Once the CLI
is installed, run the following command to display available commands:
This will produce the following help output:
init
Initialize a new NextUI project using the init
command. This sets up your project with the necessary configurations.
You will be prompted to configure your project:
Install the dependencies to start the local server:
Start the local server:
add
Add components to your NextUI project with the add command. This command manages component dependencies and updates your project configurations.
Without specifying a specific component:
You will be prompted to select the components you wish to add:
To add a specific component:
You will see an output confirming the addition of the component:
upgrade
Upgrade all the NextUI components within your project.
Upgrade specific NextUI components within your project using the upgrade command to ensure they are up to date.
You will be asked to confirm the upgrade:
Upon confirmation, the command will execute and provide an output similar to:
remove
Remove components from your NextUI project with the remove command. This helps in managing the project's component structure and dependencies.
A confirmation prompt will be displayed:
Following confirmation, the output will indicate successful removal:
list
List all installed NextUI components in your project with the list command. This provides a clear overview of what is currently included in your project.
The output will detail each component:
doctor
Diagnose and resolve issues within your project using the doctor command. This ensures your project's health and proper configuration.
Depending on your project's status, you might see:
Or, if issues are detected:
env
Display detailed information about your project's environment settings using the env command. This includes system, dependencies, and configuration details.
The output will reflect your current environment setup:
API Reference
Explore the complete CLI commands and features in the API References.
For updates and source code, visit the GitHub Repository.