CLI tool for installing LaraUI components in Laravel projects
amsiam/lara-ui-cli is a Laravel package for cli tool for installing laraui components in laravel projects.
It currently has 0 GitHub stars and 2 downloads on Packagist (latest version 1.0.0).
Install it with composer require amsiam/lara-ui-cli.
Discover more Laravel packages by amsiam
or browse all Laravel packages to compare alternatives.
Last updated
A CLI tool for adding LaraUI components to your Laravel project. Similar to shadcn/ui CLI, this tool fetches components from the LaraUI registry and installs them directly into your project.
composer require amsiam/lara-ui-cli --dev
php artisan ui:init
This will:
lara-ui.json configuration fileresources/css/lara-ui.cssapp.css to import the styles# Add specific components
php artisan ui:add button card input
# Add all components
php artisan ui:add all
# Interactive selection
php artisan ui:add
<x-ui::button variant="primary">Click me</x-ui::button>
<x-ui::card>
<x-ui::card-header>
<x-ui::card-title>Hello</x-ui::card-title>
</x-ui::card-header>
<x-ui::card-content>
Content here
</x-ui::card-content>
</x-ui::card>
ui:initInitialize LaraUI in your project.
php artisan ui:init [--force] [--yes] [--registry=]
| Option | Description |
|--------|-------------|
| --force | Overwrite existing configuration |
| --yes | Skip prompts, use defaults |
| --registry= | Custom registry URL (default: GitHub) |
Examples:
# Default initialization (uses official LaraUI registry)
php artisan ui:init
# Use custom registry
php artisan ui:init --registry=https://your-domain.com/components
# Quick setup with defaults
php artisan ui:init --yes
# Custom registry with defaults
php artisan ui:init --yes --registry=http://localhost:8000/packages/laraui
ui:addAdd components to your project.
php artisan ui:add [components...] [--all] [--force] [--deps] [--path=]
| Option | Description |
|--------|-------------|
| --all | Install all available components |
| --force | Overwrite existing files |
| --deps | Skip dependency installation |
| --path= | Custom installation path |
Examples:
# Add specific components
php artisan ui:add button card dialog
# Add all components
php artisan ui:add all
# Interactive multi-select
php artisan ui:add
# Force overwrite existing
php artisan ui:add button --force
# Custom path
php artisan ui:add button --path=resources/ui
ui:listList available components.
php artisan ui:list [--category=] [--installed] [--available] [--json] [--refresh]
| Option | Description |
|--------|-------------|
| --category= | Filter by category (core, forms, feedback, etc.) |
| --installed | Show only installed components |
| --available | Show only not-installed components |
| --json | Output as JSON |
| --refresh | Refresh the registry cache |
ui:diffCheck for updates to installed components.
php artisan ui:diff [component] [--all]
| Option | Description |
|--------|-------------|
| component | Specific component to check |
| --all | Check all installed components |
After running ui:init, a lara-ui.json file is created in your project root:
{
"registry": "https://raw.githubusercontent.com/amsiam/lara-ui/main",
"aliases": {
"components": "resources/views/components/ui",
"utils": "app/View/Components/LaraUi"
},
"tailwind": {
"css": "resources/css/app.css"
},
"prefix": "ui"
}
| Key | Description | Default |
|-----|-------------|---------|
| registry | URL of the component registry | GitHub raw URL |
| aliases.components | Where Blade views are installed | resources/views/components/ui |
| aliases.utils | Where PHP classes are installed | app/View/Components/LaraUi |
| tailwind.css | Path to your main CSS file | resources/css/app.css |
| prefix | Component prefix (e.g., x-ui::) | ui |
You can host your own component registry by setting the registry URL:
{
"registry": "https://your-domain.com/lara-ui"
}
The registry must have a registry.json file and the component files at the expected paths.
Initialization (ui:init)
Adding Components (ui:add)
Component Ownership
After installing components, ensure you have these packages:
# Required for class merging
composer require gehrisandro/tailwind-merge-laravel
MIT License