CLI Reference

Complete guide to Velyx CLI commands

CLI Reference

Complete reference for all Velyx CLI commands.

Commands

velyx init

Initialize Velyx in your Laravel project.

npx velyx init
pnpm dlx velyx init
yarn dlx velyx init
bunx --bun velyx 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 <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 add button
pnpm dlx velyx add button
yarn dlx velyx add button
bunx --bun velyx add button

npx velyx add card input modal
pnpm dlx velyx add card input modal
yarn dlx velyx add card input modal
bunx --bun velyx add card input modal

npx velyx add --all
pnpm dlx velyx add --all
yarn dlx velyx add --all
bunx --bun velyx 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 list
pnpm dlx velyx list
yarn dlx velyx list
bunx --bun velyx list

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

npx velyx list --json
pnpm dlx velyx list --json
yarn dlx velyx list --json
bunx --bun velyx 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 velyx init before using velyx add, velyx list, or velyx search.

Configuration File

The velyx.json file created by 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 init --base-color slate
pnpm dlx velyx init --base-color slate
yarn dlx velyx init --base-color slate
bunx --bun velyx init --base-color slate

Add multiple components

npx velyx add button card input modal
pnpm dlx velyx add button card input modal
yarn dlx velyx add button card input modal
bunx --bun velyx add button card input modal

Add all components

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

Search for components

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

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

Get JSON output

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

Next Steps