CLI Reference

Reference for Velyx CLI commands, installation flows, and day-to-day component management in Laravel projects.

CLI Reference

Complete reference for all Velyx CLI commands.

Global Options

velyx --version

Display the installed Velyx CLI version.

velyx --version

Alias: velyx -v

Commands

velyx init

Initialize Velyx in your Laravel project.

npx velyx@latest init
pnpm dlx velyx@latest init
yarn dlx velyx@latest init
bunx --bun velyx@latest init

What it does:

  • Creates a velyx.json file in your project root
  • Checks your environment and initializes the UI component setup
  • Prompts for setup values unless you use --defaults

Options:

Option Alias Description Default
--base-color <base-color> -b The base color to use Prompts if not set
--defaults -d Use default configuration false
--force -f Force overwrite of existing configuration false
--cwd <path> -c The working directory Current directory

Base colors: neutral, gray, zinc, stone, slate


velyx add [components...]

Add components to your project.

npx velyx@latest add button
pnpm dlx velyx@latest add button
yarn dlx velyx@latest add button
bunx --bun velyx@latest add button

npx velyx@latest add card input dialog
pnpm dlx velyx@latest add card input dialog
yarn dlx velyx@latest add card input dialog
bunx --bun velyx@latest add card input dialog

npx velyx@latest add --all
pnpm dlx velyx@latest add --all
yarn dlx velyx@latest add --all
bunx --bun velyx@latest add --all

What it does:

  • Copies the component files to your project
  • Prompts you to install any required dependencies
  • Handles file conflicts if they exist

Arguments:

  • components... - The names of components to add (optional if using --all)

Options:

Option Alias Description Default
--cwd <path> -c The working directory Current directory
--all -a Add all available components false

velyx list

List all available components from the registry.

npx velyx@latest list
pnpm dlx velyx@latest list
yarn dlx velyx@latest list
bunx --bun velyx@latest list

npx velyx@latest list --query button
pnpm dlx velyx@latest list --query button
yarn dlx velyx@latest list --query button
bunx --bun velyx@latest list --query button

npx velyx@latest list --json
pnpm dlx velyx@latest list --json
yarn dlx velyx@latest list --json
bunx --bun velyx@latest list --json

What it does:

  • Displays all available components in the registry
  • Shows component descriptions and dependencies
  • Supports searching and filtering

Options:

Option Alias Description Default
--cwd <path> -c The working directory Current directory
--query <query> -q Search query string -
--limit <number> -l Maximum number of items to display All
--offset <number> -o Number of items to skip 0
--json Output as JSON false

Alias: velyx search

You must run npx velyx@latest init before using npx velyx@latest add, npx velyx@latest list, or npx velyx@latest search.

Configuration File

The velyx.json file created by npx velyx@latest init contains:

{
  "version": "x.y.z",
  "theme": "neutral",
  "packageManager": "npm",
  "css": {
    "entry": "resources/css/app.css",
    "velyx": "resources/css/velyx.css"
  },
  "js": {
    "entry": "resources/js/app.js"
  },
  "components": {
    "path": "resources/views/components/ui"
  }
}

You can customize these paths to match your project structure. Learn more in the configuration guide.

Examples

Initialize with a custom theme

npx velyx@latest init --base-color slate
pnpm dlx velyx@latest init --base-color slate
yarn dlx velyx@latest init --base-color slate
bunx --bun velyx@latest init --base-color slate

Add multiple components

npx velyx@latest add button card input dialog
pnpm dlx velyx@latest add button card input dialog
yarn dlx velyx@latest add button card input dialog
bunx --bun velyx@latest add button card input dialog

Add all components

npx velyx@latest add --all
pnpm dlx velyx@latest add --all
yarn dlx velyx@latest add --all
bunx --bun velyx@latest add --all

Search for components

npx velyx@latest list --query button
pnpm dlx velyx@latest list --query button
yarn dlx velyx@latest list --query button
bunx --bun velyx@latest list --query button

npx velyx@latest search --query form
pnpm dlx velyx@latest search --query form
yarn dlx velyx@latest search --query form
bunx --bun velyx@latest search --query form

Get JSON output

npx velyx@latest list --json
pnpm dlx velyx@latest list --json
yarn dlx velyx@latest list --json
bunx --bun velyx@latest list --json

Next Steps