Skip to main content
Commands

vg build

Build or update the code map incrementally. Maps source code into a graph artifact that powers all downstream queries — vg show, vg ask, vg impact, and more.

Overview

vg build maps your source code into a deterministic graph artifact (.vibgrate/graph.json), enabling all downstream code graph queries. Incremental: only re-processes changed files.


Usage

vg build [paths...]
FlagDefaultDescription
[paths...].Folders or files to map
--only <langs>Restrict to languages (e.g. ts,py,go)
--exclude <glob>Extra ignore glob (repeatable)
--jobs <n>autoWorker count (1 = single-threaded)
--scip <file>auto-detectIngest a SCIP index for precise resolution
--no-scipIgnore any SCIP index
--no-tscSkip the TypeScript resolver (heuristic floor only)
--no-htmlDo not write graph.html
--no-reportDo not write GRAPH_REPORT.md
--no-warmDo not warm the semantic index after building
--grammars <dir>Grammar .wasm directory for offline/air-gapped use
-o, --export <file>Also write the map to a file (format from extension)

Examples

# Map current directory
vg build

# Map specific folders only
vg build src/ lib/

# TypeScript only, single-threaded
vg build --only ts --jobs 1

# Export map to JSON as well
vg build -o map.json

Global Options

All graph commands accept: --cwd <dir>, --graph <file>, --json, --quiet, --local, --deep, --no-cache.


Related

  • vg show — Inspect a node
  • vg ask — Ask the map a question
  • vg serve — Start local MCP for AI assistants

Example use cases

Expand any use case to watch a live replay of the real @vibgrate/cli running against one of our test repositories. Nothing executes in your browser — these are recordings of actual runs, with the scan time shown as of now.

vg build

Related Documentation