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-onor--drift-budget. - Put shared exclusions in
vibgrate.config.tsrather 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.