Basic usage
The default command reviews one or more files and prints findings to standard output. You must pass at least one path; without one, VectorLint prints help.Commands
vectorlint <paths>
The default command. Reviews the given files against the rules that apply to them and prints findings. Accepts the flags below.
vectorlint init
Generates configuration files for a project. The flags control which files are created; a global config is always ensured.
init exits with an error unless you pass --force.
vectorlint validate
Validates rule and prompt files without running evaluations. Checks YAML frontmatter structure, schema compliance, and prompt completeness, then prints a per-file report and a summary line.
validate uses RulesPath from your project configuration. Override the rules directory:
1 if any validation errors are found; 0 otherwise. Use this to catch malformed rules before they reach a review.
vectorlint --help and vectorlint --version
Flags
The default command (vectorlint <paths>) accepts these flags:
--debug-json artifacts
With --debug-json, VectorLint writes one JSON artifact per evaluation to .vectorlint/runs/<model-tag>/<run-id>.json. Each artifact contains:
raw_model_output: exact JSON the model returned, including all evidence fieldsfilter_decisions: the deterministic surface/hide decision for each candidate, with reasonssurfaced_violations: the candidates that passed all confidence checks
CONFIDENCE_THRESHOLD. The .vectorlint/runs/ directory is gitignored.
Output formats
Control the output shape with--output <format>. The default line format is for humans; the others are for tooling and CI integration.
line (default)
Human-readable terminal output. Each finding shows the rule, its location in the file, the violation, and a suggested fix. The run ends with a global summary and token usage. Findings are colored by severity.
json
Native VectorLint JSON. Use this when you process VectorLint output yourself. The top-level object is:
message (the user-facing summary) and, when the model produced it, analysis (internal model reasoning). evaluationScores carries the per-rule score breakdown.
vale-json
Compatible with tools that consume Vale’s JSON output. The shape is:
rdjson
reviewdog-compatible JSON (also used by GitHub Actions annotations). The shape is:
Exit codes
The default command exits non-zero only when a finding surfaces aterror severity, not for warning-severity findings. This lets warnings pass through CI while errors block a merge.
A check rule surfaces at
error severity when its density score is 1.0 or below, and at warning severity otherwise. A rule may also set severity: error in its frontmatter to force the error level. See CI Integration for gating examples.
Environment variables
VectorLint reads configuration from environment variables in addition to config files. Project-level.env values take precedence over the global config.toml.
For the full environment variable reference, including Azure OpenAI and Amazon Bedrock variables, see Environment variables.
Related
- Installation: install VectorLint globally or run with npx
- Configuration: configure VectorLint for your project
- Handling false positives: adjust
CONFIDENCE_THRESHOLDand strictness - CI Integration: use exit codes and output formats to gate merges