Skip to main content

Initialize Vibgrate Config with vg init

Use vg init to create the .vibgrate directory and config file for repeatable, shareable scans. Optionally create a baseline during init and commit the config.

Difficulty
Beginner
Duration
12 minutes
Steps
5

Running vg init sets up Vibgrate in your project: it creates the .vibgrate directory and a config file so that scans are repeatable and your team shares the same settings. This is the recommended first step once you have decided to adopt Vibgrate in a repository.

Prerequisites

  • Vibgrate CLI installed
  • A project repository to initialize

Steps

1. Run vg init

From the project root, initialize Vibgrate.

vg init

This creates the .vibgrate directory and a config file in your project.

2. Inspect the .vibgrate directory

The .vibgrate directory holds Vibgrate's project-local state and artifacts. Initialization creates it so later commands have a consistent home.

3. Review the config file

Vibgrate is configured with vibgrate.config.ts, where you set thresholds, toggle scanners, and define exclusions. Open the generated config to see the defaults you can adjust.

4. Initialize with a baseline

If you want to start tracking drift deltas immediately, initialize and create a baseline in one step.

vg init --baseline

5. Commit the config

Commit the config file so every teammate and CI run uses the same settings. Then run a scan to confirm the config is picked up.

vg

Verification

After vg init, the .vibgrate directory and a config file exist in your project. A subsequent vg scan runs with those settings. If you used --baseline, a baseline snapshot is created for delta comparison.

Next Steps

  • Configure exclusions and thresholds in vibgrate.config.ts.
  • Set up ignore patterns to skip irrelevant paths.
  • Track drift over time with vg baseline.

Prerequisites

  • Vibgrate CLI installed
  • A project repository

Steps

  • 1
    Run vg init
  • 2
    Inspect the .vibgrate directory
  • 3
    Review the config file
  • 4
    Initialize with a baseline
  • 5
    Commit the config

Category

Vibgrate