Docs

Configuration

Configuration

Configure Velyx for your Laravel project, adjust project settings, and align the component workflow with your application structure.

velyx.json

After running init, Velyx creates a configuration file in your project root.

{
  "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"
  }
}

Options

This is the complete configuration shape used by the Velyx CLI. The CLI reads these keys from `velyx.json` through its config manager.

Key Description Default
version Configuration version written from the installed Velyx CLI package version. CLI version
theme Selected color theme. Supported values: neutral, gray, slate, stone, zinc. neutral
packageManager Package manager used in command output and dependency prompts. Auto-detected
css.entry Main CSS file detected during init. Used when injecting the Velyx CSS import. validation.cssFile.path or ""
css.velyx Generated Velyx theme/token file. Used by the CLI when resolving the theme path. resources/css/velyx.css
js.entry Main JavaScript entry detected during init. Used to auto-import component JavaScript. validation.jsFile.path or ""
components.path Directory where copied Blade components are written. resources/views/components/ui

How the CLI uses it

Add command

Reads `components.path` to place Blade files, `js.entry` to inject component JavaScript, `css.velyx` for theme CSS, and `packageManager` for dependency install commands.

List command

Requires `velyx.json` to exist before listing or searching registry components, so the command only runs inside initialized projects.

Custom Paths

Edit paths manually if your Laravel app uses a custom structure.

{
  "css": {
    "entry": "public/css/style.css",
    "velyx": "resources/css/design-tokens.css"
  },
  "js": {
    "entry": "resources/js/main.js"
  },
  "components": {
    "path": "resources/views/ui/components"
  }
}