Alpha. Vary is under active development and not ready for production use. Syntax, APIs, performance, and behaviour may change between releases.

Using vary check

CLI flags

FlagDescription
-v, --verboseVerbose output
-s, --summaryOne line per file
-W, --warningsWarning mode: all (default), none, error
--fix, --fix-safeApply safe auto-fixes in place
--categoryFilter rules by category (repeatable)
--ruleFilter rules by ID (repeatable)
--jsonMachine-readable JSON output
--explain [RULE]Explain a rule by ID or name; omit value to list all rules
--profileCheck profile: ci, local, great-code, or great-tests
--planOutput an ordered repair plan
--groupGroup output by priority (default) or file
--max-findings NList only the N most important findings. Mechanical findings (those with a fix) are counted in one line, not listed

Output for agents

--json gives every finding four fields beyond the message and span:

FieldMeaning
rank0 correctness and safety, 1 contracts and testing, 2 mutation readiness, 3 mechanical style, 4 judgment style. Lower is more important
blockingtrue for an error
mechanicaltrue when a fix exists, so applying it is the whole job
verifyThe command that shows the finding is resolved

Each fix carries its edits as file, range and replacement, the same edits --fix applies, so one finding can be applied without applying all.

With --max-findings N the top N non-mechanical findings are listed in source order, a budget block (max, shown, omitted, mechanical) says what was left out, and the summary counts still cover every finding:

vary check src/ --json --max-findings 5

Explain a rule

Show why a rule exists, what it detects, and how to fix findings:

vary check --explain VCI001
vary check --explain            # list all rules

This prints the same rationale as vary explain VCI001 but scoped to check rules.

Repair plans

Generate an ordered plan showing which findings have safe fixes and in what order to apply them:

vary check src/ --plan

The plan groups fixes by file and respects dependency order (e.g., import additions before the code that uses them).

CI profile

The ci profile switches to JSON output and treats warnings as errors, suitable for CI pipelines:

vary check src/ --profile ci

You can also set this in vary.toml:

[check]
profile = "ci"

Filtering rules

Run only idiom rules:

vary check src/ --category idioms

Run a single rule:

vary check src/ --rule VCI001

Combine multiple categories:

vary check src/ --category idioms --category contracts

Auto-fix

Rules marked with auto-fix support can be applied automatically:

vary check src/ --fix

Only fixes marked SAFE are applied. The command reports how many fixes were applied and how many were skipped due to conflicts.