Skip to main content
VelinStyle v1.3.0
⌂ Home
  1. Docs
  2. CLI & Extend
  3. CLI

CLI 1.2.2

Build custom CSS, manage icons, print HTML blueprints, compile design tokens, and scan your project for security and accessibility issues — all from the command line. Deutsch: CLI

Version history

3 releasesv1.3.0

CLI reference — production, security, motion, experience, and core commands.

1.3.0NewMotion clip commands

`motion create` · `atelier` · `transition` · `sequence` · providers / PixVerse setup.

`velinstyle security doctor|scan|audit|publish|ci|deps|secrets|report`.

`build --production` / `production`, `atelier list|scaffold` (beta).

Maturity: Core CLI (build, scan, perf, tokens, docs, search index) is stable tooling in 1.2.0. plan / review / page scaffold / meta / Knowledge Graph are beta / foundation — not a finished AI design system. Studio stays planned.

When to use

When not

Installation

Install VelinStyle globally or run it on-demand with npx:

# Install the published package
npm install -D @birdapi/velinstyle

# Or run without installing
npx @birdapi/velinstyle
# binary name: velinstyle

Commands Overview

All available commands at a glance:

CommandDescription
velinstyle initCreate a velinstyle.config.js configuration file
velinstyle buildBuild custom CSS with selected layers
velinstyle themesList available themes
velinstyle add <name>Add a single component CSS file
velinstyle icons <subcommand>Manage icon providers
velinstyle scan [path]Security, a11y, PII, and CSS scanner (stable tooling)
velinstyle prefix [path]Codemod utility classes to velin-* (optional --write, --map)
velinstyle blueprint [name]Print a documented HTML blueprint; add --strict to fail on unknown velin-* classes
velinstyle create landing [dir]Scaffold a runnable landing (validated classes, optional vendor copy)
velinstyle serve [dir]Static HTTP preview (default port 4173)
velinstyle doctorCheck CSS/JS/icons/themes/config; Windows-safe config import smoke
velinstyle check [path]Aggregate gate: doctor + blueprint --strict + scan + review (exit ≠ 0 on failure). Alias: validate
velinstyle scaffold "prompt" betaPlan-first page HTML or recipe fragments (list-intents, --json, -o); --atelier Library compose (beta)
velinstyle plan "prompt" betaEmit page plan JSON (no HTML); --atelier Library plan (beta)
velinstyle atelier <num|id>Pull curated Atelier Library showcase; --format blade|vue|react = wrappers only
velinstyle review [file] betaDesign / a11y / SEO / conversion review gate
velinstyle meta betaBuild velin-agent.json + llms.txt (agent meta / KG seed)
velinstyle perf <sub>Performance audit / suggest / fix
velinstyle tokens validateValidate tokens.json
velinstyle tokens buildGenerate :root CSS variables from a tokens.json file
velinstyle docs generateAuto-generate Markdown API reference (--scope meta for agent docs)
velinstyle search indexBuild JSON search index for VelinSearch (extension)
velinstyle layout <sub>Responsive layout audit, suggest, fix for HTML files

Init

Creates a velinstyle.config.js file in the current directory. The interactive prompt lets you select which CSS layers to include:

velinstyle init

This generates a config file with your chosen layers, theme, output path, and scan settings.

Build

Builds a custom CSS bundle based on the layers defined in your config file.

# Build using velinstyle.config.js
velinstyle build

# Specify output file
velinstyle build --output dist/styles.css
velinstyle build -o dist/styles.css

# Minify the output
velinstyle build --minify

# Marketing lite layers
velinstyle build --preset lite -o ./velinstyle-lite.css --minify

# Production Builder (content-aware — preferred for go-live)
velinstyle build --production --explain
velinstyle production . -o ./dist/velin-production
OptionAliasDescription
--output-o / --outOutput file (layer build) or directory (with --production)
--minifyMinify the generated CSS
--preset litetokens + reset + base + layout + components + utilities (no content scan)
--productionContent-aware Production Builder (CSS/JS/themes/icons + report)
--explainWith production: list removed assets

Production

Alias command for the Production Builder. See Production Builder guide.

velinstyle production [path] --out ./dist/velin-production --explain --watch --report ./report.json

Velin Experience

Velin Experience is the product layer behind the velinstyle entrypoint — Output Contract, Event Bus, Registry-driven Help, Themes/Modes. The full CLI surface renders through Experience; the binary is only the door. Raw stdout stays for pipes / CI (--json, --sarif, blueprint without -o).

velinstyle doctor .
velinstyle themes
velinstyle skills list
velinstyle dashboard
velinstyle doctor . --record
velinstyle replay .velin/records/doctor-….json --output markdown

Guide: Velin Experience. Production Content Scanner treats .blade.php as first-class (scan your project, not only HTML).

Velin Security Suite

Velin Security Suite is the CLI surface; Velin Security Engine (core/security/) holds the Registry and rules. Auto-detect repo vs consumer; focused subcommands for CI, deps, secrets, and publish gates.

velinstyle security doctor .
velinstyle security deps .
velinstyle security publish
velinstyle security report --out ./.velin/security/report

Guide: Velin Security Suite · since 1.2.3.

Velin Motion

Page Motion is the Motion Design System — full Registry (presets, timelines, transitions, physics stubs, composers, triggers, policies, blueprints) plus a first-class Trigger Engine. Studio-ready data model; Studio UI later.

velinstyle motion list
velinstyle motion doctor .
velinstyle motion analyze .
velinstyle motion blueprint landing -o motion.html
velinstyle motion demo

Clip Motion (1.3.0) — image→clip via package @birdapi/velinstyle-motion (local HTML/CSS or optional PixVerse AI). Separate from Page Motion.

AI animations are produced by external providers. PixVerse is a supported provider.

velinstyle motion providers
velinstyle motion setup pixverse
velinstyle motion create hero.png --preset cinematic --yes
velinstyle motion create logo.png --ai --yes
velinstyle motion atelier ./assets --count 10 --yes
velinstyle motion presets --clips
velinstyle motion usage

Guides: Velin Motion · Motion Clips.

Windows notes

On Windows, velinstyle build loads velinstyle.config.js via pathToFileURL so drive-letter paths do not throw ERR_UNSUPPORTED_ESM_URL_SCHEME. Run velinstyle doctor to smoke-test the config import. Prefer relative vendor paths (vendor/velinstyle/) over absolute /dist/... sprite URLs.

Unknown CLI verbs print Unknown command '…' with suggestions and exit 1 (they no longer dump full help with a success-looking exit).

create landing copies vendor into the target directory and aims for a zero-warning scan (no inline styles; proper label for/id). Prefer bootFromDOM / runtime tree-shake in production; the scaffold falls back to the vendor components bundle offline.

Icons

Manage icon providers and generate optimized icon bundles.

Subcommands

# List all available icon providers
velinstyle icons list

# Add icons from several providers (downloads into icons/svg/ in the package)
velinstyle icons add lucide --icons menu,search,check
velinstyle icons add heroicons --icons arrow-left --variant outline

# Rebuild the combined sprite used by the framework
velinstyle icons build

# Remove every SVG that was downloaded from one provider, then rebuild
velinstyle icons remove heroicons
velinstyle icons build

Run these commands from the root of a VelinStyle clone (or ensure icons/svg/ resolves to your project). After icons build, referenced sprites are updated for local development.

SubcommandDescription
listList all available icon providers
add <provider>Add icons from a provider (--icons names, --variant style)
remove <provider>Remove a previously added provider
buildBuild the final icon bundle from all added providers

Blueprint

Print copy-paste HTML wired for VelinStyle classes and tokens. Run velinstyle blueprint list for the machine-readable list, then emit one fragment with blueprint <id> (stdout or -o).

velinstyle blueprint list
# Example output shape (IDs only — exact order may vary):
#   alert-stack
#   breadcrumb-bar
#   card-grid
#   footer-simple
#   form-contact
#   form-login
#   hero-section
#   layout-dashboard
#   modal
#   navbar-header
#   pagination-bar
#   search-field
#   sidebar-layout
#   table-responsive
#   bottom-nav-mobile
#   cookie-consent
#   empty-state
#   filter-bar
#   notification-center
#   onboarding
#   pricing-table
#   settings-panel

velinstyle blueprint hero-section -o snippets/hero.html
velinstyle blueprint sidebar-layout -o snippets/sidebar.html

Tokens build

Reads JSON with a tokens map (keys become --kebab-case custom properties) and prints CSS or writes --output.

velinstyle tokens build --input tokens.json --output src/tokens-from-json.css
Note: Default input path is tokens.json in the current working directory if --input is omitted.

Blueprint catalog

Run velinstyle blueprint list for the authoritative list. Each id prints a static HTML fragment you can paste into a page or Storybook.

IDDescription
modalAccessible modal shell (role="dialog", header, footer actions)
form-loginLogin form with Velin field classes and validation hooks
layout-dashboardDashboard shell: header, aside, main regions
alert-stackStack of status alerts (info / success / warning)
breadcrumb-barHorizontal breadcrumb trail
card-gridResponsive card grid (auto-fit)
footer-simpleSimple footer with links and copyright
form-contactContact form (name, email, message)
hero-sectionHero block with heading, lead text, CTAs
navbar-headerTop navigation bar with brand and links
pagination-barPagination control strip
search-fieldSearch input with button
sidebar-layoutTwo-column layout: sidebar + content
table-responsiveWrapped responsive table
bottom-nav-mobileMobile tab bar shell (pairs with <velin-bottom-nav>)
cookie-consentCookie consent banner with actions
empty-stateEmpty state with icon, text, and CTA
filter-barFilter chips and search row
notification-centerNotification list panel
onboardingOnboarding step layout
pricing-tablePricing tier comparison grid
settings-panelSettings form sections

Prefix

Mechanical migration of class / className attributes in HTML, Vue, JSX, and TSX. Dry-run by default; use --write to apply.

velinstyle prefix ./src
velinstyle prefix ./src --write
velinstyle prefix ./src --bootstrap-display --write
velinstyle prefix ./src --map ./velinstyle-prefix-map.json --write

See also Migration guide.

Scaffold beta

Compose blueprint HTML from a text prompt (no API key). Full pages use the page registry; fragments use recipe intents. Guide: Prompt scaffolding.

velinstyle scaffold list-intents
velinstyle scaffold "Navbar with logo and search" -o nav.html
velinstyle scaffold "Steuerberater Landingpage mit Kontaktformular" -o out.html --json
velinstyle scaffold --atelier 04,07 -o compose.html --from ./atelier/library

Atelier compose (beta): --atelier builds a page from curated Atelier Library ids (not Velin Studio — Studio stays planned). Package guide: framework docs/guides/atelier-cli.md.

Atelier pull

Pull a curated Library showcase by number or id (3636-calendar). SEO variants like 3600-… are not matched.

velinstyle atelier list
velinstyle atelier 36 -o ./velin-atelier/36-calendar
velinstyle atelier 04 --format vue -o ./src/atelier/04-pricing
Limitation: --format blade|vue|react writes an integration shell that mounts the original vanilla showcase. It does not rewrite into idiomatic Blade/Vue/React. Native framework blocks and Velin Studio Builder are planned. Atelier Library ≠ Studio.

Plan beta

Emit structured page plan JSON (sections, constraints) without rendering HTML. Foundation for Design Intelligence — coverage still expanding. With --atelier, emits Library compose plan refs (beta).

velinstyle plan "SaaS pricing page with FAQ" --json -o plan.json
velinstyle plan --atelier 04,07 -o atelier-plan.json

Review beta

Heuristic review gate (design, a11y, SEO, performance, conversion, prompt score). Not a substitute for human WCAG or security review.

velinstyle review out.html --prompt "SaaS pricing page with FAQ" --json

Meta beta

Build agent context artifacts. Knowledge Graph embeds are a seed catalog, not a complete design system. Guide: Velin-Meta.

velinstyle meta
velinstyle meta --base-url https://velinstyle.info
velinstyle meta page docs/components/buttons.html --write
velinstyle docs generate --scope meta

Performance audit

See Performance audit guide.

velinstyle perf audit ./public
velinstyle perf suggest ./public
velinstyle perf fix ./public --write

Docs generate

Extract Markdown API tables from source (components, tokens, utilities, CLI manifest, scanner rules). Output: docs/generated/ in the framework repo — browse snapshot locally.

npm run docs:generate
velinstyle docs generate
velinstyle docs generate --scope components
velinstyle docs generate --scope tokens

Scopes: all, components, attributes, tokens, utilities, cli, rules, a11y, meta.

Search index (extension)

Build dist/search-index.json for VelinSearch. Merged with site pages via python tools/build-search-index.py.

velinstyle search index --out dist/search-index.json
velinstyle search index --extra-html ../velinstyle-site/docs

Layout audit

Static checks for flex, grid, containers, and mobile visibility. Full guide: Responsive layout.

velinstyle layout audit ./src
velinstyle layout suggest page.html
velinstyle layout fix page.html --dry-run
velinstyle layout fix page.html --write

Scan

stable tooling — complementary to beta plan/review; use in CI.

A built-in scanner that walks HTML, CSS, and JavaScript for security, accessibility, and CSS hygiene. Use --severity to set the minimum level shown (errors always fail CI when present). --fix applies a small set of safe transforms; --fix-dry-run lists candidate files without writing.

In the framework repository, npm run test:contrast verifies OKLCH token pairs (4.5:1 / 7:1) — complementary to velinstyle scan.

Trusted Types & XSS: The scanner flags common XSS footguns (javascript: URLs, eval, raw innerHTML, inline handlers, unsafe target="_blank"). It does not parse CSP or Trusted Types policies — use HTTP headers plus the guidance in Security and getTrustedPolicy() for runtime hardening.
# Scan current directory
velinstyle scan

# Scan a specific path
velinstyle scan ./src

# Output as JSON (useful for CI/CD)
velinstyle scan --format json

# Auto-fix issues where possible
velinstyle scan --fix

# Filter by severity
velinstyle scan --only pii --fix

velinstyle scan --severity error

# Preview auto-fix targets without writing
velinstyle scan --fix-dry-run

# Default lang when fixing missing <html lang> (BCP 47)
velinstyle scan --fix --fix-lang en
OptionDescription
--format jsonOutput results as JSON (for CI ingestion)
--fixAutomatically fix issues where the scanner can do so safely (writes files)
--fix-dry-runList files that would be modified by --fix; no writes
--fix-lang <code>Default language tag for the HTML lang auto-fix (default de)
--severityFilter by level: error, warning, or info
CI exit code: scan exits with code 1 when findings at or above the configured severity include errors. Review auto-fix output in a branch before relying on --fix on main.

Scanner rules

Severities label findings in text/JSON output. --severity sets the minimum level included (warning hides info only). Filter with --only security, --only a11y, --only pii, --only css, --only wc. Round-3 rules include a11y/duplicate-id, css/unknown-velin-class, wc/invalid-attribute, HTML document.write, and a11y/target-size-min. Performance checks run via velinstyle perf audit (see Performance table). Review remains beta / heuristic — pair with axe/Lighthouse for ship gates.

Full reference: generated/rules/scanner.md (auto-synced from cli/scanner-rules-data.js in the framework repo).

Security

Rule IDCategorySeverityFixable (--fix)
security/no-inline-handlerSecurityWarningno
security/no-javascript-urlSecurityErrorno
security/safe-external-linkSecurityWarningyes — adds rel="noopener noreferrer"
security/no-meta-refreshSecurityErrorno
security/no-inline-styleSecurityWarningno
security/no-data-html-uriSecurityErrorno
security/dangerous-targetSecurityWarningno
security/integrity-missingSecurityInfono
security/csp-metaSecurityInfono
security/no-raw-innerhtmlSecurityWarningno
security/no-document-writeSecurityErrorno
security/no-evalSecurityErrorno
security/no-function-constructorSecurityErrorno
security/postmessage-wildcardSecurityWarningno

PII

Rule IDCategorySeverityFixable (--fix)
pii/hardcoded-emailPIIWarningyes — masks to placeholder (--fix)
pii/mailto-in-sourcePIIInfono
pii/hardcoded-secretPIIErrorno
pii/localstorage-piiPIIWarningno

Accessibility

Rule IDCategorySeverityFixable (--fix)
a11y/html-langAccessibilityErroryes — sets lang on <html> (--fix-lang)
a11y/img-altAccessibilityErrorno
a11y/img-decorativeAccessibilityWarningno
a11y/velin-icon-labelAccessibilityWarningno
a11y/sparkline-labelAccessibilityWarningno
a11y/skeleton-textAccessibilityWarningno
a11y/button-labelAccessibilityWarningno
a11y/input-labelAccessibilityWarningno
a11y/skip-linkAccessibilityWarningyes — inserts skip link when id="main" exists
a11y/landmark-mainAccessibilityWarningno
a11y/heading-orderAccessibilityWarningno
a11y/interactive-aria-hiddenAccessibilityErrorno
a11y/iframe-titleAccessibilityErrorno
a11y/autocomplete-authAccessibilityWarningno
a11y/invalid-describedbyAccessibilityWarningno

CSS

Rule IDCategorySeverityFixable (--fix)
css/var-fallbackCSSInfono
css/z-index-tokenCSSWarningyes — maps raw integers toward --velin-z-* tokens
css/no-importantCSSInfono
css/vendor-prefixCSSInfono

Performance

Rule IDCategorySeverityFixable (--fix)
perf/img-missing-dimensionsPerformanceWarningno
perf/img-no-lazyPerformanceInfono
perf/script-no-deferPerformanceWarningno
perf/large-inline-stylePerformanceInfono
perf/font-display-swapPerformanceInfono
perf/unused-velin-importPerformanceInfono

Configuration

The velinstyle.config.js file controls all CLI behaviour. Here is the full structure:

export default {
  layers: ['tokens', 'reset', 'base', 'a11y', 'layout', 'components', 'utilities', 'security', 'helpers'],
  theme: null,
  output: './velinstyle-custom.css',
  minify: true,
  scan: {
    enabled: true,
    severity: 'warning',
    fix: false,
    ignore: ['node_modules', 'dist'],
  },
};
KeyTypeDefaultDescription
layersstring[]all layersCSS layers to include in the build
themestring | nullnullTheme name to apply (e.g. 'neon', 'ocean')
outputstring'./velinstyle-custom.css'Output file path
minifybooleantrueWhether to minify the output CSS
scan.enabledbooleantrueEnable the scanner
scan.severitystring'warning'Minimum severity: error, warning, or info
scan.fixbooleanfalseAuto-fix issues when possible
scan.ignorestring[]['node_modules', 'dist']Directories to skip during scanning