Veil UI

CLI

The veil-ui command line tool.

The CLI reads your components.json, fetches components from the registry, resolves their dependencies and writes the files into your project.

Commands

CommandDescription
veil-ui initConfigure a project
veil-ui add <components...>Add components and dependencies
veil-ui list [query]List available components
veil-ui search <query>Search the registry
veil-ui view <component>Show a component's files
veil-ui doctorDiagnose the setup

Add options

FlagDescription
--overwriteOverwrite existing files without prompting
--no-installSkip installing npm dependencies
--dry-runPrint the files that would be written
--registry <url>Use a different registry
--cwd <path>Run in another directory

How resolution works

Adding a component also adds its registry dependencies. button, for example, depends on utils, so the CLI writes both files and installs @radix-ui/react-slot and class-variance-authority.

Files are placed according to components.json:

  • registry:ui → aliases.ui
  • registry:lib → aliases.lib
  • registry:block → aliases.components/<name>/

@veil-ui/utils imports are rewritten to your configured utils alias, so the copied component compiles without any Veil UI package installed.

components.json

KeyDescription
styleRegistry style, currently default
rscWhether the project uses React Server Components
tailwind.cssPath to the global stylesheet
aliases.uiWhere UI components are written
aliases.libWhere helpers are written
registryRegistry base URL

Using a local registry

pnpm dev # starts the docs app on :3000
npx veil-ui add card --registry http://localhost:3000/r

On this page