BetaViberTest is in active development — expect breaking changes.
Overview
DocsCLI Referencescan

vibertest scan

Analyze a JavaScript/TypeScript project for code quality issues. This is the primary command — it runs all enabled rules, scores the project 0-100, and outputs a detailed report.

Usage#

Terminalbash
$ vibertest scan [path] [options]

If no path is provided, ViberTest scans the current directory.

Arguments#

ArgumentDescriptionDefault
[path]Directory to scan.

Options#

FlagDescriptionDefault
-r, --rules <rules>Comma-separated list of rule IDs to runall enabled
-f, --format <format>Output format: "terminal" or "json"terminal
-o, --output <path>File path to write JSON report
-s, --silentSuppress terminal output (useful with --format json)false

Examples#

Basic Scan#

Scan the current directory with all default rules:

Terminalbash
$ vibertest scan .

Scan a Subdirectory#

Only scan the src/ folder:

Terminalbash
$ vibertest scan ./src

Run Specific Rules#

Only run security-related rules:

Terminalbash
$ vibertest scan . --rules hardcoded-secrets,security-antipatterns

Export JSON Report#

Generate a machine-readable JSON report:

Terminalbash
$ vibertest scan . --format json --output report.json

Silent Mode#

Suppress all terminal output — useful in CI pipelines where you only care about the exit code and JSON artifact:

Terminalbash
$ vibertest scan . --format json --silent --output report.json

Exit Codes#

CodeMeaningWhen
0Success — no issuesClean scan, all rules pass
1Issues foundAt least one rule flagged an issue
2ErrorScan failed (malformed config, internal error)

Analyzed File Extensions#

ViberTest analyzes files with these extensions:

.ts.tsx.js.jsx

How Scanning Works#

When you run vibertest scan, the following pipeline executes:

  1. 1
    Config Resolution

    Searches for .vibertestrc.json, .vibertestrc.yaml, or other config formats via cosmiconfig. Merges with defaults.

  2. 2
    File Collection

    Collects all matching files using fast-glob, respecting ignore patterns. Default ignores: node_modules, dist, build, .next, coverage, .turbo, .git.

  3. 3
    Rule Execution

    Runs all enabled rules against collected files. Each rule produces zero or more issues with severity, message, file path, and suggestion.

  4. 4
    Scoring

    Calculates the 0-100 score using exponential decay with diminishing returns. Assigns a letter grade (A-F).

  5. 5
    Reporting

    Outputs results to terminal (colorized, grouped by file) or writes a JSON report to disk.