CLI Reference
Use the CLI to compile, format, lint, and type-check Vue files from a terminal or CI job.
For apps, install the vize npm package and start with the package scripts below. For LSP, IDE management, check-server, and profiling, use the Rust binary installation.
The npm package also exports shared configuration helpers. See the command comparison to choose an entry point, or follow User Workflows for a task-oriented walkthrough.
Application Package Scripts
For apps, install from npm and wire stable commands into project scripts:
vp install -D vize typescript-native@npm:[email protected]
The native compiler belongs to the project; Vize does not bundle or download it. The alias keeps
TypeScript 6 available for other tools. See Type Checking for canonical and
explicit-path alternatives before using vize check or vize ready.
{
"scripts": {
"vize:build": "vize build src",
"vize:fmt": "vize fmt --write src",
"vize:lint": "vize lint --preset happy-path src",
"typecheck": "tsc --runExternalCode --noEmit -p tsconfig.json",
"typecheck:tsrs": "tsrs --runExternalCode --noEmit -p tsconfig.json",
"vize:ready": "vize ready src"
}
}
vp run vize:lint
tsc --runExternalCode --noEmit -p tsconfig.json
tsrs --runExternalCode --noEmit -p tsconfig.json
vp run vize:ready
Type-check with the content mapper. tsrs is a drop-in of the same tsconfig.json. vize check remains the packaged checker. Use vp exec vize ... for one-off debugging; prefer named scripts for documented workflows and CI.
Rust Binary Installation
For v1 alpha, use the prebuilt GitHub release binaries or the Nix entry point. The Rust CLI is not a supported crates.io install channel yet.
nix run github:ubugeeei-prod/vize#vize -- --help
You can also download platform-specific binaries from GitHub Releases.
For local development inside this repository, install the workspace build:
cargo install --path crates/vize --force --locked
npm Package Scripts vs Rust CLI
| Need | Recommended entry point |
|---|---|
| Package scripts for build, format, lint, check, ready, and upgrade | vp run vize:* from the npm package |
Project-backed type checking across .vue, .ts, .tsx, and .d.ts |
TypeScript 7.1 tsc --runExternalCode, or tsrs. See Type Checking |
LSP, IDE setup, check-server, and profiling artifacts |
Rust vize binary |
| Shared Vite plugin, npm package command, and Rust CLI settings | Vite config |
Commands
vize [COMMAND]
When invoked without a command, vize defaults to build.
| Command | Description |
|---|---|
build |
Compile Vue SFC files |
fmt |
Format Vue SFC files |
lint |
Lint Vue SFC files |
check |
Type check Vue SFC, TS, TSX, and .d.ts inputs |
explain |
Print the documentation page for a diagnostic code |
doctor |
Analyze whole-application health |
inspector |
Create playground compiler inspector payloads |
clean |
Remove Vize-generated cache artifacts |
lib |
Pull versioned UI/composable sources (guide) |
plugin |
Inspect experimental plugin API v2 plans |
ready |
Run fmt, lint, check, and build |
upgrade |
Update the installed CLI |
check-server |
Start the Unix JSON-RPC typecheck server |
content-mapper |
Start the TypeScript content-mapper server |
musea |
Musea subcommands and scaffolding |
lsp |
Start the language server |
ide |
Install or manage editor integrations |
Build
vize build src/**/*.vue
vize build --ssr
vize build --profile src
vize build compiles .vue and .tsrx files. A TSRX module goes through the TSRX compiler, which reports every syntax error and every construct or target it does not support yet at its line and column; a refused module never gets compiled code (with --continue-on-error it gets the same empty fallback module as any failed file). Its TypeScript is erased as in .vue scripts (.js output) unless --script-ext preserve keeps it (.ts output). The default pattern (./**/*.vue) selects .vue files only.
Key options:
| Option | Description |
|---|---|
-o, --output |
Source-relative output below the common input root; rejects collisions |
-f, --format |
Output format: js, json, stats |
--ssr |
Enable SSR compilation |
--vapor |
Compile in Vapor mode |
--template-syntax |
standard (default), strict, or quirks handling of invalid syntax |
--custom-renderer |
Treat lowercase non-HTML tags as custom renderer elements |
--custom-elements <PATTERN> |
Tag patterns compiled as custom elements; repeat for multiple patterns |
--script-ext |
preserve or downcompile |
--declaration |
Emit .d.ts files for the built SFCs (alias: --dts) |
--declaration-dir |
Declaration output directory (default: the build output directory) |
-j, --threads |
Thread count override |
--profile |
Print timing profile |
--continue-on-error |
Keep compiling and report failures at the end |
--verbose |
Print every compile error in full instead of one hinted block per kind |
<style lang="scss">, sass, less and stylus blocks are compiled with the preprocessor installed in your project (sass or sass-embedded, less, stylus) before they are scoped, as Vite does. Preprocessor errors point to the line in the .vue file. If Node or the package is missing, the block is emitted as written and the build reports a warning.
Scoped CSS preserves native nesting when a nested rule depends on a parent selector list. This retains the list's inherited specificity, including through :is(), :where() and grouping rules. JSON build output can therefore contain nested CSS; a host CSS pipeline can lower it for its configured browser targets. Do not expand each parent branch separately, which can change the cascade.
Format
vize fmt --check src
vize fmt --write src
Default discovery formats Vue, JavaScript/TypeScript, TSRX and JSON/JSONC files. YAML and Markdown formatting is not implemented: .yaml, .yml, .md and .markdown are excluded from defaults, and explicit selection reports an error without changing their bytes. Key options:
| Option | Description |
|---|---|
--check |
Report files that would change |
-w, --write |
Write formatted output |
--single-quote |
Toggle string quote style |
--jsx-single-quote |
Toggle JSX attribute quote style |
--quote-props |
Choose object property quote policy |
--trailing-comma |
Choose all, es5 or none trailing commas |
--arrow-parens |
Choose always or avoid for sole arrow parameters |
--bracket-spacing |
Toggle spaces inside object literal braces |
--bracket-same-line |
Keep a multi-line tag's > on its last attribute line |
--end-of-line |
Choose lf, crlf, cr or source-detected auto |
--print-width |
Maximum line width |
--tab-width |
Indentation width |
--use-tabs |
Toggle tabs vs spaces |
--no-semi |
Omit semicolons |
--semi[=true|false] |
Override semicolons; cannot be combined with --no-semi |
--sort-attributes |
Sort template attributes |
--attribute-sort-order |
Choose alphabetical or as-written within groups |
--single-attribute-per-line |
Put one attribute per line |
--vue-indent-script-and-style |
Indent the contents of script and style blocks |
--max-attributes-per-line |
Wrap after a given attribute count |
--normalize-directive-shorthands |
Normalize v-bind: / v-on: / v-slot: shorthands |
--sort-blocks |
Toggle canonical SFC block ordering |
--self-close-void-elements |
Toggle /> on HTML void elements |
--normalize-css-quotes |
Re-quote CSS, SCSS and Less strings using --single-quote |
--normalize-inline-styles |
Lay out plain static style declarations |
--normalize-v-for-parens |
Parenthesize multiple v-for aliases |
--reindent-preprocessor-styles |
Re-indent SCSS and Less blocks by nesting depth |
--preset |
Apply vize, prettier, compact or documentation formatter defaults |
--profile |
Print timing profile |
From JavaScript
Code generators can format their output through the vize package instead of running the command:
import { format, formatSync } from "vize";
const { code, changed } = await format(source, { filename: "src/generated/routes.ts" });
filename names the file the source is written to. The file is never read or written. Its extension selects the formatter, as vize fmt selects it. Its directory selects the configuration, as vize fmt run from that directory would find it. The returned code is the bytes vize fmt --write would write. Options use the config names (semi, printWidth, sortImports, preset, …), and each one given overrides the configured value, as a flag does. config: "path/to/vite.config.ts" reads that config instead of discovering one, and config: false formats with defaults only. Ignore patterns select files for the command and do not apply here.
format runs on a worker thread and returns a promise, so many files can be formatted concurrently without blocking the event loop while a Vite config is evaluated. formatSync is the same call for code that cannot await. Both throw with the formatter's message when the source does not parse, the file type is not one vize fmt formats (standalone CSS, YAML and Markdown are left to other formatters), or the configuration is invalid.
Lint
vize lint src
vize lint --preset opinionated src
vize lint --help-level short src
Default discovery lints Vue, HTML, JavaScript/TypeScript, JSX/TSX and TSRX files. Each markup region of a .tsrx module runs through the same markup rules as a JSX/TSX render root; script rules do not check the host TypeScript of a .tsrx module yet. Syntax errors, and constructs the lowering does not support yet, are parser/tsrx errors. The Node API (lint, lintPatinaSfc) and the language server lint .tsrx modules the same way. Key options:
| Option | Description |
|---|---|
--fix |
Apply safe autofixes from rules that provide text edits, then report remaining diagnostics |
-f, --format |
Output format: text, rich (localize with --locale ja or zh), ansi, plain, json, stylish, markdown, html, or agent |
--max-warnings |
Fail when warnings exceed the limit |
--no-warn-ignored |
Do not warn about explicitly named files that ignores excludes, like ESLint's --no-warn-ignored |
--no-inline-config |
Ignore eslint-disable comments in source files, like ESLint's --no-inline-config |
--report-unused-disable-directives |
Report eslint-disable template comments that suppressed nothing, as vue/comment-directive errors |
-q, --quiet |
Show summary only |
--help-level |
full, short, or none |
--locale |
Message language: en, ja, or zh |
--preset |
happy-path, ecosystem, opinionated, essential, incremental, or nuxt |
--cross-file |
Enable opt-in cross-file checks |
--cross-file-tree |
Print the provide/inject tree when cross-file linting is enabled |
--cross-file-complexity |
Print the cross-file complexity score and hotspots when cross-file linting is enabled |
--type-aware |
Enable the type-aware rules configured in your lint settings |
--strict-reactivity |
Enable native checker-backed reactivity-loss linting |
--profile |
Print timing profile |
--slow-threshold |
Slow file threshold for profile output |
Presets are intended for staged adoption:
| Preset | Use it when |
|---|---|
essential |
You want correctness-oriented diagnostics in CI |
happy-path |
You want the default recommended bundle |
ecosystem |
You want happy-path plus Router, Pinia, Nuxt, and i18n ecosystem rules |
opinionated |
You want stronger conventions, script rules, and type-aware candidates |
incremental |
You only want explicitly configured rules |
nuxt |
You want opinionated rules with Nuxt component assumptions |
Examples:
vize lint --preset essential --max-warnings 0 src
vize lint --preset opinionated --help-level short src
vize lint --cross-file --cross-file-tree src
vize lint --strict-reactivity src
vize lint --format agent src
Check
The recommended typecheck is TypeScript 7.1 or newer with Vize's content mapper. tsrs can run the same project. The commands are in Type Checking.
vize check is the packaged checker. It type-checks Vue SFCs with
TypeScript's native compiler
(Project Corsa, the Go port that ships as TypeScript 7). Vize generates virtual TypeScript for each
SFC, runs project diagnostics natively through corsa-bind,
and maps every result back to the original .vue location. Flags and config keys that mention
"Corsa" refer to that native TypeScript compiler.
vize check
vize check src
vize check --tsconfig tsconfig.app.json
vize check --profile src
When no explicit paths are given, vize check uses tsconfig.json files / include /
exclude if available. Explicit inputs may be files, directories, or globs and can include .vue,
.ts, .tsx, and .d.ts.
Key options:
| Option | Description |
|---|---|
-s, --socket |
Connect to a running check-server |
--tsconfig |
Override tsconfig.json |
-f, --format |
Output format: text or json |
--show-virtual-ts |
Print generated virtual TypeScript |
--save-virtual-ts-for |
Save one file's virtual TypeScript next to it; repeatable |
--max-warnings |
Fail when warnings exceed the limit |
--no-check-props |
Skip prop type checks |
--no-check-emits |
Skip emit type checks |
--no-check-template-bindings |
Skip template binding checks |
--verbose |
Print every diagnostic in full instead of one hinted block per kind |
-q, --quiet |
Show summary only |
--profile |
Write profile artifacts under node_modules/.vize |
--corsa-path |
Override the native TypeScript (Corsa) executable path |
--tsrs-path |
Use an experimental tsrs executable |
--servers |
Parallel Corsa CLI servers (1–32); auto-tuned when omitted |
--checkers |
Checker workers per Corsa process (default 1) |
--declaration |
Emit .d.ts output |
--declaration-dir |
Output directory for emitted declarations |
Vize uses a native TypeScript executable installed by the selected project; it does not bundle
or download a compiler. Use --corsa-path to select an explicit executable. The shared config key
is typeChecker.corsaPath;
typeChecker.tsgoPath remains only as a compatibility alias. --tsrs-path and
typeChecker.tsrsPath select tsrs as the runtime for this packaged checker. To type-check with
tsrs itself, use the content mapper command in Type Checking.
Project-wide template values and Vue ambient types should be visible through TypeScript project
configuration. Include generated files such as auto-imports.d.ts, components.d.ts, or your own
declare module "vue" augmentations in the tsconfig.json include globs, then select that project
with --tsconfig when needed:
{
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.d.ts"]
}
Doctor
vize doctor
vize doctor src
vize doctor src packages/shared --format json
vize doctor builds one application graph across Vue SFCs and script modules and reports
whole-app problems that a single-file linter cannot see:
- dependency injection (
provide/inject) and cross-component prop contracts - duplicate element IDs and server/client boundaries
- reactivity flow, asynchronous mutation risks, and setup-context ownership
- circular imports
Findings point at the authored .vue source. Discovery follows your ignore files, stays inside the
workspace root, stops with an error when a file cannot be parsed, and never writes files.
Key options:
| Option | Description |
|---|---|
--root |
Workspace boundary and base for report paths; defaults to the current directory |
-f, --format |
Output format: text (default), versioned json, or sarif for code hosts |
--exit-zero |
Return success even when a proven error would normally block |
--tui |
Explore the report in an interactive terminal view |
--public-sfc |
Also enforce the public component SFC contract (off by default) |
Exit status 0 means the gate passed, 1 means a certain or high-confidence error, and 2 means
discovery, parsing, analysis, serialization, or output failed. Warnings and lower-confidence findings
affect the health score but do not block by default. See Doctor diagnostics for precise
filter, changed-file, scoring, and automation contracts. The deterministic --format json report
carries explicit format and scoring versions and is the preferred interface for CI and AI tooling:
vize doctor src --format json > doctor-report.json
Inspector
vize inspector src/App.vue
vize inspector "src/**/*.vue" --target ssr
vize inspector src --format json --output inspector-payload.json
vize inspector src --format agent --output inspector-agent.json
vize inspector packages one or more .vue files into the payload consumed by the playground
compiler inspector. The browser then inspects Vue output, Vize output, Virtual TS, VIR, and the
cross-file graph, then produces a permalink plus a prefilled pull request link.
Use --format agent when another local tool or AI agent needs the same repro without opening the
browser. The report contains the exact payload, playground URL, summary metrics, and import graph.
Key options:
| Option | Description |
|---|---|
-f, --format |
Output format: url, json, agent, or compare |
--target |
Compiler target: dom, ssr, or vapor |
--playground-url |
Playground base URL for generated links |
--max-files |
Limit files included in a batch payload |
--custom-renderer |
Enable custom renderer comparison |
--template-syntax |
Choose standard, strict, or quirks |
-o, --output |
Write the URL or JSON payload to a file |
See Compiler Inspector for the contributor workflow.
Clean
vize clean
vize clean --dry-run
vize clean --scope node-modules
vize clean --scope project
vize clean --force
vize clean path/to/project
vize clean deletes the caches and reports Vize writes under .vize and node_modules/.vize:
profile output, Musea reports and snapshots, lint sessions, config schemas, cached config
evaluations, legacy project LSP logs, and the generated TypeScript project used by vize check.
The LSP writes its current log to vize/logs/lsp.log inside the operating system's user cache
directory (for example $XDG_CACHE_HOME or ~/.cache on Linux, ~/Library/Caches on macOS,
and %LOCALAPPDATA% on Windows). It does not create a log in the project's node_modules.
Set VIZE_LSP_LOG_FILE to an absolute file path to retain a particular editor session's log.
If the cache directory is unavailable, the override is relative or empty, or the file cannot
be opened, logging continues on stderr only. vize clean does not remove user-cache logs.
| Option | Description |
|---|---|
--dry-run |
Print what would be removed |
--scope node-modules / project |
Clean only node_modules/.vize or only .vize |
--force |
Also remove unknown entries by deleting the whole folder |
-q, --quiet |
Suppress status output |
Plugin
vize plugin inspect
vize plugin inspect --config path/to/vite.config.ts
vize plugin inspect evaluates vite.config.* and prints, as JSON, the canonical plugin plan
that vue.plugins resolves to: plugin order, ownership claims, capabilities, options,
permissions, cache inputs and the per-product admission status. Plugin API v2 is experimental
(status).
Every other command refuses a plan that contains a capability some product consuming it does not implement yet;
inspect still reports it so you can see why.
Ready
vize ready src
vize ready --output dist src
vize ready runs fmt --write, lint, check, and build in order, stopping at the first failing step.
Interactive stderr shows numbered stages and elapsed completion times; CI and redirected stderr keep plain stage logs. Progress honors the terminal's color and Unicode profile.
Key options:
| Option | Description |
|---|---|
-o, --output |
Output directory for the build step |
--ssr |
Enable SSR compilation for build |
--script-ext |
preserve or downcompile |
--tsconfig |
tsconfig.json for the check step |
--no-check-props, --no-check-emits, --no-check-template-bindings |
Skip those type checks |
Upgrade
vize upgrade
vize upgrade --dry-run
By default, vize upgrade updates the npm package through Vite+, which uses your project's package manager:
vp install -D vize@latest
Use --source cargo only for explicit local Cargo installs.
Musea
vize musea --help
vize musea serve --port 6006
vize musea new
The musea subcommand currently focuses on scaffolding and experimental entry points. For
day-to-day gallery development, prefer @vizejs/vite-plugin-musea. The npm package also exposes a
convenience vize musea command that runs Vite with the Musea plugin installed (vp exec vize musea, or add --build for a production build).
LSP and IDE
vize lsp
vize lsp --port 9527
vize ide vscode
vize ide zed
vize lsp starts the language server directly. vize ide adds editor-specific install and
management commands for the VS Code and Zed integrations.
Global Options
vize --help
vize --version
vize <command> --help
Project commands (build, fmt, lint, check, and ready) also accept
-c, --config <path> to read a specific Vite config and --no-config to ignore project settings.
These commands evaluate the Vite config through Node and cache the result in
node_modules/.vize/config-cache. A cached result is used only while every input of that
evaluation is unchanged: the imported files, files and directories read through node:fs, the
resolved node_modules packages, the environment variables read, and the Node executable. Set
VIZE_CONFIG_CACHE=0 to always evaluate, for example when the config depends on a command
or network result.