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 list Replace defaults with named rules; comma-separated and repeatable
--ignore rule list Remove named rules 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

Text diagnostics use FILE:LINE:COL: message [rule]. JSON output is one array of diagnostic objects.

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. Include and define options are accepted but ignored because lucisv does not preprocess.

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.