vibgrate init — Initialise Your Project

Everything you need to know about the vibgrate init command: creating the .vibgrate directory, generating a default config file, and optionally establishing your first baseline.

Vibgrate Docs

Vibgrate Help

Usage

vibgrate init [path] [--baseline] [--yes]

What It Does

vibgrate init sets up Vibgrate in your project by creating:

  • A .vibgrate/ directory for scan artifacts and baselines
  • A vibgrate.config.ts file with sensible defaults

This is typically the first command you run when adopting Vibgrate.

Flags

FlagDescription
--baselineCreate an initial drift baseline after init
--yesSkip confirmation prompts

Examples

Basic initialisation

vibgrate init .

This creates .vibgrate/ and vibgrate.config.ts in the current directory.

Initialise with baseline

vibgrate init . --baseline

This runs a full scan after initialisation and saves the result as your first baseline at .vibgrate/baseline.json.

Non-interactive mode

vibgrate init . --yes --baseline

Skips all confirmation prompts — ideal for CI setup scripts.

Generated Config File

The generated vibgrate.config.ts looks like this:

import type { VibgrateConfig } from '@vibgrate/cli';

const config: VibgrateConfig = {
  exclude: ['legacy/**'],
  thresholds: {
    failOnError: {
      eolDays: 180,
      frameworkMajorLag: 3,
      dependencyTwoPlusPercent: 50,
    },
    warn: {
      frameworkMajorLag: 2,
      dependencyTwoPlusPercent: 30,
    },
  },
  scanners: {
    platformMatrix: { enabled: true },
    dependencyRisk: { enabled: true },
    dependencyGraph: { enabled: true },
    toolingInventory: { enabled: true },
    buildDeploy: { enabled: true },
    tsModernity: { enabled: true },
    breakingChangeExposure: { enabled: true },
    fileHotspots: { enabled: true },
    securityPosture: { enabled: true },
    securityScanners: { enabled: true },
    serviceDependencies: { enabled: true },
  },
};

export default config;

You can also use vibgrate.config.js or vibgrate.config.json if you prefer.

Best Practices

  • Run vibgrate init once on your main branch, then commit the config file
  • Add .vibgrate/scan_result.json to .gitignore (it changes on every scan)
  • Keep .vibgrate/baseline.json in version control so CI can compare against it
  • Use --baseline on first init to establish your starting point

Related Commands