Skip to main content

Scanning a Monorepo

Run Vibgrate across a monorepo. Learn how to scan the whole tree, target individual packages with --cwd, and exclude folders to keep results meaningful.

Vibgrate Docs

Vibgrate Help

This guide explains how to scan a monorepo with the Vibgrate CLI. Monorepos hold many packages with different upgrade pressures, so this article covers both whole-repo and per-package strategies. It is for developers and platform teams maintaining large multi-package repositories.

Overview

A monorepo can be scanned as a single unit or package by package. Whole-repo scans give you one DriftScore for the entire tree; per-package scans give each team a focused number for the code they own.

Whole-repo scan

From the repository root, run a scan of the current directory:

vg

Keep results meaningful by excluding build output and vendored folders:

vg scan --exclude dist

Per-package scan

Target an individual package with --cwd so you do not have to change shells:

vg scan --cwd packages/api

This is useful when different teams own different packages and each wants its own DriftScore and gate.

Recommendations

  • Run a whole-repo scan for an overall view and a baseline.
  • Run per-package scans in the pipelines that own each package, each with its own --fail-on or --drift-budget.
  • Put shared exclusions in vibgrate.config.ts rather than repeating the flag.

For very large trees, also see the large repositories and performance guides.

Related

See the scanning a single package guide, the excluding paths guide, the scanning large repositories guide, and the scan command reference.

Related Commands