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.tsfile with sensible defaults
This is typically the first command you run when adopting Vibgrate.
Flags
| Flag | Description |
|---|---|
--baseline | Create an initial drift baseline after init |
--yes | Skip 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 initonce on your main branch, then commit the config file - Add
.vibgrate/scan_result.jsonto.gitignore(it changes on every scan) - Keep
.vibgrate/baseline.jsonin version control so CI can compare against it - Use
--baselineon first init to establish your starting point