Skip to main content
VectorLint runs from the command line. This page is the complete reference for every command, flag, output format, and exit code.

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.
Review a single file:
Review multiple files or a glob pattern:

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.
If a target file already exists, 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.
By default, validate uses RulesPath from your project configuration. Override the rules directory:
Exits with code 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 fields
  • filter_decisions: the deterministic surface/hide decision for each candidate, with reasons
  • surfaced_violations: the candidates that passed all confidence checks
Use these to compare how different models respond to the same rules and content, or to tune 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:
Each issue includes 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:
Use this to plug VectorLint into an existing Vale-based pipeline.

rdjson

reviewdog-compatible JSON (also used by GitHub Actions annotations). The shape is:
Use this when running VectorLint in reviewdog or a reviewdog-compatible CI setup.

Exit codes

The default command exits non-zero only when a finding surfaces at error 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.