Skip to content

CLI reference

Form Behavior
lucisv [OPTIONS] <file|dir>... Format in place
lucisv format [OPTIONS] <file|dir>... Explicit formatter spelling
lucisv check [OPTIONS] <file|dir>... Run lint rules
lucisv [OPTIONS] -f <filelist> Process files named by an EDA filelist
lucisv - Read stdin and write stdout

The subcommand is recognized only as the first argument. To format a file named check, use lucisv format check or lucisv ./check.

Option Value Effect
--check — Do not write; exit 1 if formatting would change
--diff — Do not write; print a unified diff and exit 1 on change
--stdout — Print formatted output instead of rewriting
--exclude pattern Skip matching paths during directory walks; repeatable
-f file Add files named by an EDA filelist; repeatable
--stdin-filename path Name stdin for diagnostics and config discovery
--no-gitignore — Disable .gitignore processing
--no-cache — Disable formatter cache reads and writes
--cache-dir path Relocate the formatter cache
--threads integer Set worker count; output remains deterministic
--lines ranges Format selected 1-based inclusive item ranges; repeatable
--line-length 40..400 Override maximum line width
--indent 1..8 Override indentation width
--no-config — Ignore lucisv.toml and .lucisv.toml
-h, --help — Print help
-V, --version — Print version
Option Value Effect
--select rule/class list Replace defaults with named rules or error, warning, style; comma-separated and repeatable
--ignore rule/class list Remove named rules or severity classes from the enabled set
--output-format text or json Select human or machine-readable diagnostics
--fix — Apply safe fixes and rewrite files
--unsafe-fixes — Allow unsafe fixes when a rule provides them
--waiver-file <PATH> path Read Verible-format waiver directives from this file; repeatable. Adds to [lint] waivers from lucisv.toml. Relative to the working directory. A missing file or an unparsable directive is an error (exit 2)
--rules-doc — Print registry-generated rule and option documentation and exit; takes no files

Text diagnostics use FILE:LINE:COL: severity: message [rule]. JSON output is one array of diagnostic objects, each carrying severity. JSON output is lint-only; formatter errors remain text on stderr.

An EDA .f filelist accepts one source path per line, nested -f entries, +incdir+, +define+, # or // comments, and $VAR/${VAR} expansion. Paths resolve relative to the filelist that names them. The CLI accepts include and define options without preprocessing. The server uses include directories for include navigation; neither front end expands cross-file macros while parsing.

Filelist paths bypass --exclude and .gitignore, just like direct command-line files. Duplicates are processed once. Unknown options, unset variables, and missing listed files warn without changing the exit code; an unreadable filelist is an error.

Directory walks read .gitignore in each directory. Deeper rules override shallower rules; the last matching line wins. Supported syntax includes comments, blank lines, * within a component, anchored /, directory-only trailing /, and ! negation. **, ?, character classes, escapes, global excludes, and tracked-file exceptions are not implemented.

Code Meaning
0 Success; no pending check/diff changes, no lint findings, or all findings fixed
1 Formatting would change in --check/--diff, or lint findings remain
2 Invalid arguments, I/O failure, configuration error, or formatting failure

An error outranks “would change.” Every file involved in an error is left untouched.