Getting started
Quick setup
$ npx @vibator/create-gateFollow the wizard and then install the packages with:
$ npm installPlugins and rules configuration are written in the .vibator.json file, and each tool has its own configuration under .vibator/ folder.
If you are done, jump to the Run it section.
Install it yourself
To start from nothing and write your own rules, install Vibator as a dev dependency:
$ npm install --save-dev vibator$ pnpm add -D vibator$ yarn add -D vibator$ bun add -d vibatorTypeScript is optional
typescript is an optional peer dependency, used by the ts namespace for AST-based and type-aware rules. Supported versions are 5.4 up to 6.x; the rules resolve and use your project's own installation.
Write your first rule
Vibator ships no rules. A rule lives in the project's .vibator/ folder, which loads automatically, or in a package listed under plugins. A rule reads the project through the vibator namespace and returns findings. See the rule definition for the full shape.
Scaffold the config
.vibator.json at the project root is optional and configures the rules you load. Write a starter file:
$ npx vibator initSee the configuration reference for every field.
Run it
$ npx vibator # run every enabled rule
$ npx vibator --write # run each rule's fix, then recheck
$ npx vibator list # every rule, its severity and title
$ npx vibator explain <rule> # the guideline behind a rule
$ npx vibator --only <ids> # run only these rule ids
$ npx vibator --reporter sarif # pretty (default), json, or sarifAdopt on an existing codebase
To check only new work, scope the run:
$ npx vibator --since origin/main # everything this branch touched
$ npx vibator --changed # every uncommitted change
$ npx vibator --staged # files staged for the next commit