@vibgrate/cli 2026.708.3 → 2026.709.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/DOCS.md CHANGED
@@ -11,35 +11,44 @@ For a quick overview, see the [README](./README.md). This document covers everyt
11
11
  - [How It Works](#how-it-works)
12
12
  - [Choosing a rollout model: one-off vs CI](#choosing-a-rollout-model-one-off-vs-ci)
13
13
  - [Commands Reference](#commands-reference)
14
- - [vg init](#vg-init)
15
- - [vg scan](#vg-scan)
16
- - [Vulnerabilities and exposure attribution](#vulnerabilities-and-exposure-attribution)
17
- - [vg why](#vg-why)
14
+ - [vg baseline](#vg-baseline)
18
15
  - [vg bisect](#vg-bisect)
16
+ - [vg drift](#vg-drift)
17
+ - [vg dsn create](#vg-dsn-create)
19
18
  - [vg fix](#vg-fix)
20
- - [vg baseline](#vg-baseline)
19
+ - [vg init](#vg-init)
20
+ - [vg login](#vg-login)
21
+ - [vg logout](#vg-logout)
22
+ - [vg push](#vg-push)
21
23
  - [vg report](#vg-report)
22
24
  - [vg sbom](#vg-sbom)
23
- - [vg push](#vg-push)
24
- - [vg dsn create](#vg-dsn-create)
25
+ - [vg scan](#vg-scan)
26
+ - [Vulnerabilities and exposure attribution](#vulnerabilities-and-exposure-attribution)
25
27
  - [vg update](#vg-update)
28
+ - [vg why](#vg-why)
26
29
  - [Code Graph Commands](#code-graph-commands)
27
- - [vg build](#vg-build)
28
- - [vg show](#vg-show)
29
30
  - [vg ask](#vg-ask)
31
+ - [vg benchmark](#vg-benchmark)
32
+ - [vg build](#vg-build)
33
+ - [vg bundle](#vg-bundle)
34
+ - [vg embed](#vg-embed)
35
+ - [vg export](#vg-export)
36
+ - [vg facts](#vg-facts)
37
+ - [vg guide](#vg-guide)
30
38
  - [vg impact](#vg-impact)
31
- - [vg path](#vg-path)
32
- - [vg tree](#vg-tree)
33
- - [vg map / vg hubs / vg areas / vg oddities](#vg-map--vg-hubs--vg-areas--vg-oddities)
39
+ - [vg install](#vg-install)
34
40
  - [vg lib](#vg-lib)
41
+ - [vg map / vg hubs / vg areas / vg oddities](#vg-map--vg-hubs--vg-areas--vg-oddities)
42
+ - [vg models](#vg-models)
43
+ - [vg path](#vg-path)
44
+ - [vg savings](#vg-savings)
35
45
  - [vg serve](#vg-serve)
36
- - [vg install](#vg-install)
37
46
  - [vg share](#vg-share)
47
+ - [vg show](#vg-show)
38
48
  - [vg status](#vg-status)
39
- - [vg facts](#vg-facts)
40
49
  - [vg tests](#vg-tests)
41
- - [vg embed](#vg-embed)
42
- - [vg export](#vg-export)
50
+ - [vg tree](#vg-tree)
51
+ - [vg unknowns](#vg-unknowns)
43
52
  - [DriftScore](#driftscore)
44
53
  - [Drift Baselines & Fitness Functions](#drift-baselines--fitness-functions)
45
54
  - [How the Score Is Calculated](#how-the-score-is-calculated)
@@ -160,138 +169,76 @@ Expected results:
160
169
 
161
170
  ## Commands Reference
162
171
 
163
- ### vg init
172
+ ### vg baseline
164
173
 
165
- Initialise Vibgrate in a project.
174
+ Create a drift baseline snapshot for delta comparison.
166
175
 
167
176
  ```bash
168
- vg init [path] [--baseline] [--yes]
177
+ vg baseline [path]
169
178
  ```
170
179
 
171
- | Flag | Description |
172
- | ------------ | ------------------------------------------- |
173
- | `--baseline` | Create an initial drift baseline after init |
174
- | `--yes` | Skip confirmation prompts |
175
-
176
- Creates:
177
-
178
- - `.vibgrate/` directory
179
- - `vibgrate.config.ts` with sensible defaults
180
+ Runs a full scan and saves the result to `.vibgrate/baseline.json`. Use this as the starting point for tracking drift over time.
180
181
 
181
182
  ---
182
183
 
183
- ### vg scan
184
+ ### vg bisect
184
185
 
185
- The primary command. Scans your project for upgrade drift.
186
+ Pinpoint the commit where a dependency crossed a version line. Where `vg why` narrates every version change, `vg bisect` answers one targeted question: *when did we cross this line?* — for example, when a vulnerable dependency was finally patched past the fixed version, or when a major was adopted.
186
187
 
187
188
  ```bash
188
- vg scan [path] [--vulns] [--full] [--format text|json|sarif|md] [--out <file>] [--fail-on warn|error] [--offline] [--package-manifest <file>] [--no-local-artifacts] [--max-privacy] [--baseline <file>] [--drift-budget <score>] [--drift-worsening <percent>] [--changed-only] [--concurrency <n>]
189
+ vg bisect <package> <constraint>
189
190
  ```
190
191
 
191
- | Flag | Default | Description |
192
- |------|---------|-------------|
193
- | `--vulns` | — | Also detect known vulnerabilities (OSV online; offline via `--package-manifest` advisories) |
194
- | `--full` | — | Comprehensive scan: enables `--vulns` and reports banned dependencies when a standards policy exists |
195
- | `--format` | `text` | Output format: `text`, `json`, `sarif`, or `md` |
196
- | `--out <file>` | — | Write output to a file |
197
- | `--fail-on <level>` | — | Exit with code 2 if findings at this level exist |
198
- | `--baseline <file>` | — | Compare against a previous baseline |
199
- | `--changed-only` | — | Only scan changed files |
200
- | `--concurrency <n>` | `8` | Max concurrent npm registry calls |
201
- | `--drift-budget <score>` | — | Fitness gate: fail if drift score is above this budget |
202
- | `--drift-worsening <percent>` | — | Fitness gate: fail if drift worsens by more than % vs baseline |
203
- | `--push` | — | Upload scan artifact to Vibgrate Cloud after a successful scan |
204
- | `--dsn <dsn>` | `VIBGRATE_DSN` env | DSN used for `--push` authentication |
205
- | `--region <region>` | — | Override data residency (`us`, `eu`) during push |
206
- | `--strict` | — | Fail scan command if push fails |
207
- | `--ui-purpose` | — | Enable optional UI-purpose evidence extraction |
208
- | `--offline` | — | Disable network calls and disable upload/push behavior |
209
- | `--package-manifest <file>` | — | JSON or ZIP package-version manifest used for offline/latest lookups (latest bundle: `https://github.com/vibgrate/manifests/latest-packages.zip`) |
210
- | `--no-local-artifacts` | — | Do not write `.vibgrate/*.json` scan artifacts to disk |
211
- | `--max-privacy` | — | Hardened privacy mode with minimal scanners and no local artifacts |
212
-
213
- By default, the scan writes `.vibgrate/scan_result.json`. Use `--no-local-artifacts` or `--max-privacy` to suppress local JSON artifact files.
192
+ `<constraint>` is a version or a semver range. A bare version means "reached or surpassed" — `vg bisect lodash 4.17.21` is the same as `vg bisect lodash '>=4.17.21'`. It reads the same lockfile history `vg why` uses (npm / pnpm / yarn, pip / poetry, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle), offline and without checking out any commit.
214
193
 
215
- For offline drift scoring, pass `--package-manifest <file>` with a downloaded manifest bundle such as `https://github.com/vibgrate/manifests/latest-packages.zip`.
194
+ It reports the commit that first reached the constraint — author, date, and the version before and after or tells you the line was never crossed and shows the latest version in history (so an unadopted fix is obvious). Later flips, such as a downgrade that re-introduced the old version, are listed too.
216
195
 
217
- Examples:
196
+ Add `--assert` to turn it into a CI gate: the command exits non-zero when the current version does not satisfy the constraint, so a pipeline step can block a merge until the fix is adopted.
218
197
 
219
198
  ```bash
220
- # Standard text scan
221
- vg scan
222
-
223
- # JSON output for automation
224
- vg scan --format json --out scan.json
225
-
226
- # CI gate with baseline regression protection
227
- vg scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
228
-
229
- # Upload result in the same command
230
- vg scan --push --strict
199
+ vg bisect lodash 4.17.21 --assert # fails the build until lodash is patched to >= 4.17.21
231
200
  ```
232
201
 
233
- Expected results:
234
-
235
- - Clear score/risk output in terminal (or JSON/SARIF when selected).
236
- - Exit code `2` when configured quality gates are exceeded.
237
- - When `--push` is enabled, artifact upload is attempted after scan completion.
202
+ Exit codes: `0` when the query resolves, `2` when `--assert` finds the constraint unsatisfied, `3` when the package has no version history, `5` for an invalid version or range.
238
203
 
239
204
  ---
240
205
 
241
- ### Vulnerabilities and exposure attribution
242
-
243
- `vg scan --vulns` matches your installed dependencies against the public OSV database and records each known vulnerability — advisory id and CVE, severity, CVSS, and the fixing version — in the scan artifact, as findings, and in SARIF. Supply advisories in a `--package-manifest` bundle to run it offline.
244
-
245
- In a git repository the scan also attributes each finding: the commit, author, and date that introduced the vulnerable version, and how long you have been exposed. These exposure windows aggregate into remediation metrics framed around the EU Cyber Resilience Act (CRA): open counts by severity, mean and maximum time exposed, and per-severity SLA breaches (defaults: critical 7 days, high 30, moderate 90, low 180). The metrics are descriptive — they show whether remediation keeps pace; they are not a compliance certification.
246
-
247
- The scan also reconstructs **closed** exposure windows from history — a vulnerable version that was later bumped out of the affected range or removed from the lockfile entirely — and reports real remediation time (MTTR) from them: measured, not estimated. Offline, a package-version manifest extends this to advisories that are fully fixed today, so a dependency that is clean now but was once vulnerable still counts toward your remediation record.
206
+ ### vg drift
248
207
 
249
- Detection and attribution read each project's lockfile, so they cover npm / pnpm / yarn, pip / poetry / pipenv, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle.
208
+ What is outdated across your dependencies a fast, offline currency check.
250
209
 
251
210
  ```bash
252
- # Online detection against OSV
253
- vg scan --vulns
254
-
255
- # Air-gapped: advisories supplied in the manifest bundle
256
- vg scan --vulns --offline --package-manifest ./package-versions.zip
257
-
258
- # Everything in one run: drift + vulnerabilities + a banned-dependency report
259
- vg scan --full
211
+ vg drift
260
212
  ```
261
213
 
262
- ---
263
-
264
- ### vg why
265
-
266
- Explain a dependency from git history: who added it, every version since, and any open vulnerabilities it carries.
214
+ Reads each project's lockfile and reports which dependencies have drifted behind their latest known version. Offline by default (uses the last-known catalog); add `--online` to check live registries for current latest versions.
267
215
 
268
- ```bash
269
- vg why <package>
270
- ```
216
+ | Flag | Description |
217
+ |------|-------------|
218
+ | `--online` | Check live registries for the latest versions instead of the offline catalog |
219
+ | `--fail-on <level>` | CI gate: exit non-zero when drift is found at this level (`major`, `minor`, or `standards`) |
271
220
 
272
- `vg why` reads your lockfile's history, so it works across npm / pnpm / yarn, pip / poetry, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle projects. For Maven/Gradle the history comes from a resolved `gradle.lockfile`, or a `pom.xml`'s pinned direct-dependency versions (versions managed by a BOM/`dependencyManagement` aren't resolved). Open vulnerabilities and their introduction attribution come from your most recent `vg scan --vulns`.
221
+ Add `--json` for machine-readable output.
273
222
 
274
223
  ---
275
224
 
276
- ### vg bisect
225
+ ### vg dsn create
277
226
 
278
- Pinpoint the commit where a dependency crossed a version line. Where `vg why` narrates every version change, `vg bisect` answers one targeted question: *when did we cross this line?* — for example, when a vulnerable dependency was finally patched past the fixed version, or when a major was adopted.
227
+ Generate an HMAC-signed DSN token for API authentication.
279
228
 
280
229
  ```bash
281
- vg bisect <package> <constraint>
230
+ vg dsn create --workspace <id|new> [--region <region>] [--ingest <url>] [--write <path>]
282
231
  ```
283
232
 
284
- `<constraint>` is a version or a semver range. A bare version means "reached or surpassed" — `vg bisect lodash 4.17.21` is the same as `vg bisect lodash '>=4.17.21'`. It reads the same lockfile history `vg why` uses (npm / pnpm / yarn, pip / poetry, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle), offline and without checking out any commit.
285
-
286
- It reports the commit that first reached the constraint — author, date, and the version before and after — or tells you the line was never crossed and shows the latest version in history (so an unadopted fix is obvious). Later flips, such as a downgrade that re-introduced the old version, are listed too.
287
-
288
- Add `--assert` to turn it into a CI gate: the command exits non-zero when the current version does not satisfy the constraint, so a pipeline step can block a merge until the fix is adopted.
289
-
290
- ```bash
291
- vg bisect lodash 4.17.21 --assert # fails the build until lodash is patched to >= 4.17.21
292
- ```
233
+ | Flag | Default | Description |
234
+ | ------------- | ---------- | --------------------------------------------------------------------------- |
235
+ | `--workspace` | _required_ | Your workspace ID, or `new` to auto-generate a workspace |
236
+ | `--region` | `us` | Data residency region (`us`, `eu`) |
237
+ | `--ingest` | — | Custom ingest API URL (overrides `--region`) |
238
+ | `--write` | — | Write DSN to a file (add to `.gitignore`!) |
293
239
 
294
- Exit codes: `0` when the query resolves, `2` when `--assert` finds the constraint unsatisfied, `3` when the package has no version history, `5` for an invalid version or range.
240
+ When using `--workspace new`, the CLI auto-generates a workspace ID and provisions the DSN
241
+ with the Vibgrate API. Rate limited to 1 new DSN per 5 minutes per IP address.
295
242
 
296
243
  ---
297
244
 
@@ -380,53 +327,50 @@ advisory at or above the threshold or an apply step fails.
380
327
 
381
328
  ---
382
329
 
383
- ### vg baseline
330
+ ### vg init
384
331
 
385
- Create a drift baseline snapshot for delta comparison.
332
+ Initialise Vibgrate in a project.
386
333
 
387
334
  ```bash
388
- vg baseline [path]
335
+ vg init [path] [--baseline] [--yes]
389
336
  ```
390
337
 
391
- Runs a full scan and saves the result to `.vibgrate/baseline.json`. Use this as the starting point for tracking drift over time.
338
+ | Flag | Description |
339
+ | ------------ | ------------------------------------------- |
340
+ | `--baseline` | Create an initial drift baseline after init |
341
+ | `--yes` | Skip confirmation prompts |
342
+
343
+ Creates:
344
+
345
+ - `.vibgrate/` directory
346
+ - `vibgrate.config.ts` with sensible defaults
392
347
 
393
348
  ---
394
349
 
395
- ### vg report
350
+ ### vg login
396
351
 
397
- Generate a human-readable report from a scan artifact.
352
+ Authenticate the CLI with your Vibgrate workspace through the browser. Credentials are stored locally so `vg fix` and `vg push` can reach the hosted planner and Vibgrate Cloud.
398
353
 
399
354
  ```bash
400
- vg report [--in <file>] [--format md|text|json]
355
+ vg login
401
356
  ```
402
357
 
403
- | Flag | Default | Description |
404
- | ---------- | ---------------------------- | -------------------------------------- |
405
- | `--in` | `.vibgrate/scan_result.json` | Input artifact file |
406
- | `--format` | `text` | Output format: `md`, `text`, or `json` |
358
+ | Flag | Default | Description |
359
+ |------|---------|-------------|
360
+ | `--region <region>` | `us` | Data-residency region (`us`, `eu`) |
361
+ | `--ingest <url>` | | Custom ingest API URL (overrides `--region`) |
362
+ | `--no-browser` | — | Print the URL to open instead of launching a browser (headless / SSH) |
407
363
 
408
364
  ---
409
365
 
410
- ### vg sbom
366
+ ### vg logout
411
367
 
412
- Export SBOMs from an existing scan artifact or compare two artifacts.
368
+ Clear stored Vibgrate login credentials from this machine.
413
369
 
414
370
  ```bash
415
- vg sbom export [--in <file>] [--format cyclonedx|spdx] [--out <file>]
416
- vg sbom delta --from <file> --to <file> [--out <file>]
417
- vg sbom vex [--from <file>] [--statement <json>...] [--product <ref>] [--out <file>]
371
+ vg logout
418
372
  ```
419
373
 
420
- | Command | Description |
421
- |---------|-------------|
422
- | `vg sbom export` | Emit CycloneDX or SPDX JSON from a scan artifact |
423
- | `vg sbom delta` | Compare dependencies between two artifacts (added/removed/changed + drift delta) |
424
- | `vg sbom vex` | Emit a spec-compliant OpenVEX document (exploitability statements) for attestation |
425
-
426
- Use this to treat SBOMs as operational intelligence instead of static compliance output.
427
-
428
- `vg sbom vex` is input-agnostic: it assembles a complete OpenVEX document from the statements you supply (`--from <file>` and/or repeatable `--statement`), so it works regardless of which scanner flagged the components. A zero-statement document is valid and honest — it asserts no known affected components.
429
-
430
374
  ---
431
375
 
432
376
  ### vg push
@@ -448,102 +392,167 @@ Upload is always optional. Best-effort by default — use `--strict` in CI if yo
448
392
 
449
393
  ---
450
394
 
451
- ### vg dsn create
395
+ ### vg report
452
396
 
453
- Generate an HMAC-signed DSN token for API authentication.
397
+ Generate a human-readable report from a scan artifact.
454
398
 
455
399
  ```bash
456
- vg dsn create --workspace <id|new> [--region <region>] [--ingest <url>] [--write <path>]
400
+ vg report [--in <file>] [--format md|text|json]
457
401
  ```
458
402
 
459
- | Flag | Default | Description |
460
- | ------------- | ---------- | --------------------------------------------------------------------------- |
461
- | `--workspace` | _required_ | Your workspace ID, or `new` to auto-generate a workspace |
462
- | `--region` | `us` | Data residency region (`us`, `eu`) |
463
- | `--ingest` | — | Custom ingest API URL (overrides `--region`) |
464
- | `--write` | — | Write DSN to a file (add to `.gitignore`!) |
465
-
466
- When using `--workspace new`, the CLI auto-generates a workspace ID and provisions the DSN
467
- with the Vibgrate API. Rate limited to 1 new DSN per 5 minutes per IP address.
403
+ | Flag | Default | Description |
404
+ | ---------- | ---------------------------- | -------------------------------------- |
405
+ | `--in` | `.vibgrate/scan_result.json` | Input artifact file |
406
+ | `--format` | `text` | Output format: `md`, `text`, or `json` |
468
407
 
469
408
  ---
470
409
 
471
- ### vg update
410
+ ### vg sbom
472
411
 
473
- Check for and install updates.
412
+ Export SBOMs from an existing scan artifact or compare two artifacts.
474
413
 
475
414
  ```bash
476
- vg update [--check] [--pm <manager>]
415
+ vg sbom export [--in <file>] [--format cyclonedx|spdx] [--out <file>]
416
+ vg sbom delta --from <file> --to <file> [--out <file>]
417
+ vg sbom vex [--from <file>] [--statement <json>...] [--product <ref>] [--out <file>]
477
418
  ```
478
419
 
479
- | Flag | Description |
480
- | --------- | ------------------------------------------------------ |
481
- | `--check` | Only check for updates, don't install |
482
- | `--pm` | Force a package manager (`npm`, `pnpm`, `yarn`, `bun`) |
483
-
484
- ---
485
-
486
- ---
487
-
488
- ## Code Graph Commands
489
-
490
- Vibgrate includes a full code graph engine — call trees, impact surfaces, semantic search, and AI Context serving. All graph commands read from (or write to) a local graph artifact at `.vibgrate/graph.json`. Build the map once with `vg build`, then query it offline indefinitely.
420
+ | Command | Description |
421
+ |---------|-------------|
422
+ | `vg sbom export` | Emit CycloneDX or SPDX JSON from a scan artifact |
423
+ | `vg sbom delta` | Compare dependencies between two artifacts (added/removed/changed + drift delta) |
424
+ | `vg sbom vex` | Emit a spec-compliant OpenVEX document (exploitability statements) for attestation |
491
425
 
492
- **Global options available on every graph command:**
426
+ Use this to treat SBOMs as operational intelligence instead of static compliance output.
493
427
 
494
- | Flag | Description |
495
- |------|-------------|
496
- | `--cwd <dir>` | Working directory (default: current) |
497
- | `--graph <file>` | Path to graph file (default: `.vibgrate/graph.json`) |
498
- | `--json` | Machine-readable JSON output |
499
- | `--quiet` | Suppress non-error output |
500
- | `--local` | Offline mode — no network calls or downloads |
501
- | `--deep` | Enable deep derivation (for `vg facts`, `vg build`) |
502
- | `--no-cache` | Skip and clear cached data |
428
+ `vg sbom vex` is input-agnostic: it assembles a complete OpenVEX document from the statements you supply (`--from <file>` and/or repeatable `--statement`), so it works regardless of which scanner flagged the components. A zero-statement document is valid and honest — it asserts no known affected components.
503
429
 
504
430
  ---
505
431
 
506
- ### vg build
432
+ ### vg scan
507
433
 
508
- Build or update the code map incrementally.
434
+ The primary command. Scans your project for upgrade drift.
509
435
 
510
436
  ```bash
511
- vg build [paths...]
437
+ vg scan [path] [--vulns] [--full] [--format text|json|sarif|md] [--out <file>] [--fail-on warn|error] [--offline] [--package-manifest <file>] [--no-local-artifacts] [--max-privacy] [--baseline <file>] [--drift-budget <score>] [--drift-worsening <percent>] [--changed-only] [--concurrency <n>]
512
438
  ```
513
439
 
514
- Maps source code into a graph artifact, enabling all downstream queries (`vg show`, `vg ask`, `vg impact`, etc.).
515
-
516
440
  | Flag | Default | Description |
517
441
  |------|---------|-------------|
518
- | `[paths...]` | `.` | Folders or files to map |
519
- | `--only <langs>` | — | Restrict to languages (e.g. `ts,py,go`) |
520
- | `--exclude <glob>` | | Extra ignore glob (repeatable) |
521
- | `--jobs <n>` | auto | Worker count (`1` = single-threaded) |
522
- | `--scip <file>` | auto-detect | Ingest a SCIP index for precise resolution |
523
- | `--no-scip` | — | Ignore any SCIP index |
524
- | `--no-tsc` | — | Skip the TypeScript resolver (heuristic floor only) |
525
- | `--no-html` | | Do not write `graph.html` |
526
- | `--no-report` | — | Do not write `GRAPH_REPORT.md` |
527
- | `--no-warm` | — | Do not warm the semantic index after building |
528
- | `--grammars <dir>` | — | Grammar `.wasm` directory for offline/air-gapped use |
529
- | `-o, --export <file>` | | Also write the map to a file (format from extension) |
442
+ | `--vulns` | | Also detect known vulnerabilities (OSV online; offline via `--package-manifest` advisories) |
443
+ | `--full` | — | Comprehensive scan: enables `--vulns` and reports banned dependencies when a standards policy exists |
444
+ | `--format` | `text` | Output format: `text`, `json`, `sarif`, or `md` |
445
+ | `--out <file>` | | Write output to a file |
446
+ | `--fail-on <level>` | | Exit with code 2 if findings at this level exist |
447
+ | `--baseline <file>` | — | Compare against a previous baseline |
448
+ | `--changed-only` | — | Only scan changed files |
449
+ | `--concurrency <n>` | `8` | Max concurrent npm registry calls |
450
+ | `--drift-budget <score>` | — | Fitness gate: fail if drift score is above this budget |
451
+ | `--drift-worsening <percent>` | — | Fitness gate: fail if drift worsens by more than % vs baseline |
452
+ | `--push` | — | Upload scan artifact to Vibgrate Cloud after a successful scan |
453
+ | `--dsn <dsn>` | `VIBGRATE_DSN` env | DSN used for `--push` authentication |
454
+ | `--region <region>` | — | Override data residency (`us`, `eu`) during push |
455
+ | `--strict` | — | Fail scan command if push fails |
456
+ | `--ui-purpose` | — | Enable optional UI-purpose evidence extraction |
457
+ | `--offline` | — | Disable network calls and disable upload/push behavior |
458
+ | `--package-manifest <file>` | — | JSON or ZIP package-version manifest used for offline/latest lookups (latest bundle: `https://github.com/vibgrate/manifests/latest-packages.zip`) |
459
+ | `--no-local-artifacts` | — | Do not write `.vibgrate/*.json` scan artifacts to disk |
460
+ | `--max-privacy` | — | Hardened privacy mode with minimal scanners and no local artifacts |
461
+
462
+ By default, the scan writes `.vibgrate/scan_result.json`. Use `--no-local-artifacts` or `--max-privacy` to suppress local JSON artifact files.
463
+
464
+ For offline drift scoring, pass `--package-manifest <file>` with a downloaded manifest bundle such as `https://github.com/vibgrate/manifests/latest-packages.zip`.
465
+
466
+ Examples:
467
+
468
+ ```bash
469
+ # Standard text scan
470
+ vg scan
471
+
472
+ # JSON output for automation
473
+ vg scan --format json --out scan.json
474
+
475
+ # CI gate with baseline regression protection
476
+ vg scan --baseline .vibgrate/baseline.json --drift-budget 40 --drift-worsening 5 --fail-on error
477
+
478
+ # Upload result in the same command
479
+ vg scan --push --strict
480
+ ```
481
+
482
+ Expected results:
483
+
484
+ - Clear score/risk output in terminal (or JSON/SARIF when selected).
485
+ - Exit code `2` when configured quality gates are exceeded.
486
+ - When `--push` is enabled, artifact upload is attempted after scan completion.
530
487
 
531
488
  ---
532
489
 
533
- ### vg show
490
+ ### Vulnerabilities and exposure attribution
534
491
 
535
- Explain a single node: what it is, what it calls, what calls it.
492
+ `vg scan --vulns` matches your installed dependencies against the public OSV database and records each known vulnerability — advisory id and CVE, severity, CVSS, and the fixing version — in the scan artifact, as findings, and in SARIF. Supply advisories in a `--package-manifest` bundle to run it offline.
493
+
494
+ In a git repository the scan also attributes each finding: the commit, author, and date that introduced the vulnerable version, and how long you have been exposed. These exposure windows aggregate into remediation metrics framed around the EU Cyber Resilience Act (CRA): open counts by severity, mean and maximum time exposed, and per-severity SLA breaches (defaults: critical 7 days, high 30, moderate 90, low 180). The metrics are descriptive — they show whether remediation keeps pace; they are not a compliance certification.
495
+
496
+ The scan also reconstructs **closed** exposure windows from history — a vulnerable version that was later bumped out of the affected range or removed from the lockfile entirely — and reports real remediation time (MTTR) from them: measured, not estimated. Offline, a package-version manifest extends this to advisories that are fully fixed today, so a dependency that is clean now but was once vulnerable still counts toward your remediation record.
497
+
498
+ Detection and attribution read each project's lockfile, so they cover npm / pnpm / yarn, pip / poetry / pipenv, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle.
536
499
 
537
500
  ```bash
538
- vg show <name>
501
+ # Online detection against OSV
502
+ vg scan --vulns
503
+
504
+ # Air-gapped: advisories supplied in the manifest bundle
505
+ vg scan --vulns --offline --package-manifest ./package-versions.zip
506
+
507
+ # Everything in one run: drift + vulnerabilities + a banned-dependency report
508
+ vg scan --full
539
509
  ```
540
510
 
511
+ ---
512
+
513
+ ### vg update
514
+
515
+ Check for and install updates.
516
+
517
+ ```bash
518
+ vg update [--check] [--pm <manager>]
519
+ ```
520
+
521
+ | Flag | Description |
522
+ | --------- | ------------------------------------------------------ |
523
+ | `--check` | Only check for updates, don't install |
524
+ | `--pm` | Force a package manager (`npm`, `pnpm`, `yarn`, `bun`) |
525
+
526
+ ---
527
+
528
+ ### vg why
529
+
530
+ Explain a dependency from git history: who added it, every version since, and any open vulnerabilities it carries.
531
+
532
+ ```bash
533
+ vg why <package>
534
+ ```
535
+
536
+ `vg why` reads your lockfile's history, so it works across npm / pnpm / yarn, pip / poetry, cargo, composer, bundler, go, pub, hex, NuGet, and Maven/Gradle projects. For Maven/Gradle the history comes from a resolved `gradle.lockfile`, or a `pom.xml`'s pinned direct-dependency versions (versions managed by a BOM/`dependencyManagement` aren't resolved). Open vulnerabilities and their introduction attribution come from your most recent `vg scan --vulns`.
537
+
538
+ ---
539
+
540
+ ## Code Graph Commands
541
+
542
+ Vibgrate includes a full code graph engine — call trees, impact surfaces, semantic search, and AI Context serving. All graph commands read from (or write to) a local graph artifact at `.vibgrate/graph.json`. Build the map once with `vg build`, then query it offline indefinitely.
543
+
544
+ **Global options available on every graph command:**
545
+
541
546
  | Flag | Description |
542
547
  |------|-------------|
543
- | `<name>` | Qualified name, short name, `file:line`, glob, or id |
544
- | `--pick <n>` | Pick the nth candidate when ambiguous |
545
-
546
- Outputs the qualified name, kind, file location, signature, importance score, area, extends relationships, callees, and callers.
548
+ | `--cwd <dir>` | Working directory (default: current) |
549
+ | `--graph <file>` | Path to graph file (default: `.vibgrate/graph.json`) |
550
+ | `--json` | Machine-readable JSON output |
551
+ | `--quiet` | Suppress non-error output |
552
+ | `--local` | Offline mode — no network calls or downloads |
553
+ | `--client <name>` | Identify the AI client (e.g. `claude`) so navigation calls are counted in `vg savings` |
554
+ | `--deep` | Enable deep derivation (for `vg facts`, `vg build`) |
555
+ | `--no-cache` | Skip and clear cached data |
547
556
 
548
557
  ---
549
558
 
@@ -557,6 +566,8 @@ vg ask "<question>"
557
566
 
558
567
  A local ONNX embedding model is downloaded once on first use, then cached and fully offline. Degrades gracefully to lexical-only under `--local` or `--no-semantic`.
559
568
 
569
+ > **Semantic search is opt-in.** The embedding backend (`fastembed`, which pulls a native ONNX runtime) is declared as an **optional dependency**: package managers install it by default, but if it's absent — e.g. you installed with `--omit=optional`, or it failed to build on your platform — `vg ask` and `vg embed` transparently fall back to lexical + structural search. Nothing else in the CLI needs it, so `vg build`, `vg show`, `vg impact`, drift reporting, and MCP serving all run without it. If you never use semantic `ask`, you can install lean: `npm i @vibgrate/cli --omit=optional`.
570
+
560
571
  Before answering, `ask` checks whether files changed since the map was last built and, if so, rebuilds it incrementally first (only the changed files re-parse) — so answers always reflect the code as it is now. The check is stat-based and costs almost nothing when nothing changed; `--no-refresh` opts out.
561
572
 
562
573
  | Flag | Default | Description |
@@ -568,6 +579,139 @@ Before answering, `ask` checks whether files changed since the map was last buil
568
579
 
569
580
  ---
570
581
 
582
+ ### vg benchmark
583
+
584
+ A reproducible build + memory + token-reduction benchmark for this repository — honest, self-measured estimates you can re-run.
585
+
586
+ ```bash
587
+ vg benchmark
588
+ ```
589
+
590
+ | Flag | Default | Description |
591
+ |------|---------|-------------|
592
+ | `--budget <n>` | `2000` | Approx token budget used when estimating context savings |
593
+
594
+ Add `--json` for machine-readable output.
595
+
596
+ ---
597
+
598
+ ### vg build
599
+
600
+ Build or update the code map incrementally.
601
+
602
+ ```bash
603
+ vg build [paths...]
604
+ ```
605
+
606
+ Maps source code into a graph artifact, enabling all downstream queries (`vg show`, `vg ask`, `vg impact`, etc.).
607
+
608
+ | Flag | Default | Description |
609
+ |------|---------|-------------|
610
+ | `[paths...]` | `.` | Folders or files to map |
611
+ | `--only <langs>` | — | Restrict to languages (e.g. `ts,py,go`) |
612
+ | `--exclude <glob>` | — | Extra ignore glob (repeatable) |
613
+ | `--jobs <n>` | auto | Worker count (`1` = single-threaded) |
614
+ | `--scip <file>` | auto-detect | Ingest a SCIP index for precise resolution |
615
+ | `--no-scip` | — | Ignore any SCIP index |
616
+ | `--no-tsc` | — | Skip the TypeScript resolver (heuristic floor only) |
617
+ | `--no-html` | — | Do not write `graph.html` |
618
+ | `--no-report` | — | Do not write `GRAPH_REPORT.md` |
619
+ | `--no-warm` | — | Do not warm the semantic index after building |
620
+ | `--grammars <dir>` | — | Grammar `.wasm` directory for offline/air-gapped use |
621
+ | `-o, --export <file>` | — | Also write the map to a file (format from extension) |
622
+
623
+ ---
624
+
625
+ ### vg bundle
626
+
627
+ Build an air-gapped bundle — grammars, the code graph, and the library catalog — for use on a machine with no network.
628
+
629
+ ```bash
630
+ vg bundle
631
+ ```
632
+
633
+ | Flag | Default | Description |
634
+ |------|---------|-------------|
635
+ | `--offline` | — | Build using only locally-available assets |
636
+ | `-o, --out <dir>` | `vg-bundle` | Output directory for the bundle |
637
+
638
+ Add `--json` for machine-readable output.
639
+
640
+ ---
641
+
642
+ ### vg embed
643
+
644
+ Precompute the semantic index so the next `vg ask` is instant.
645
+
646
+ ```bash
647
+ vg embed
648
+ ```
649
+
650
+ Local ONNX model downloaded once into a shared cache (`~/.cache/vibgrate/models`). Per-repo vectors stored in `.vibgrate/cache/`.
651
+
652
+ | Flag | Description |
653
+ |------|-------------|
654
+ | `--where` | Show where the model is cached and its size |
655
+ | `--clear` | Remove the downloaded model from shared cache |
656
+
657
+ ---
658
+
659
+ ### vg export
660
+
661
+ Export the code map in various formats.
662
+
663
+ ```bash
664
+ vg export [file]
665
+ ```
666
+
667
+ Format is inferred from the file extension. Use `-` for stdout.
668
+
669
+ | Extension | Format |
670
+ |-----------|--------|
671
+ | `.json` | JSON |
672
+ | `.ndjson` | Newline-delimited JSON |
673
+ | `.graphml` | GraphML |
674
+ | `.dot` | Graphviz DOT |
675
+ | `.cypher` | Neo4j Cypher |
676
+ | `.md` | Markdown |
677
+ | `.html` | HTML visualization |
678
+ | `.cdx.json` | CycloneDX SBOM / AI-BOM |
679
+ | `.spdx.json` | SPDX |
680
+
681
+ ---
682
+
683
+ ### vg facts
684
+
685
+ Deterministic open facts for a node (contract, invariant, characterization).
686
+
687
+ ```bash
688
+ vg facts <name>
689
+ ```
690
+
691
+ Epistemic-typed: declared/static → observed/derived. Requires `--deep` for derived facts beyond basic declarations.
692
+
693
+ | Flag | Description |
694
+ |------|-------------|
695
+ | `<name>` | Node to inspect |
696
+ | `--pick <n>` | Pick the nth candidate when ambiguous |
697
+
698
+ ---
699
+
700
+ ### vg guide
701
+
702
+ Cited, relevant standards and practices for a node — the free standards pack.
703
+
704
+ ```bash
705
+ vg guide <name>
706
+ ```
707
+
708
+ | Flag | Description |
709
+ |------|-------------|
710
+ | `<name>` | Node to inspect |
711
+ | `--pick <n>` | Pick the nth candidate when ambiguous |
712
+
713
+ ---
714
+
571
715
  ### vg impact
572
716
 
573
717
  What breaks if you change it — deterministic structural blast radius.
@@ -588,39 +732,58 @@ Reverse reachability with decay confidence. With `--tests`, returns exactly the
588
732
 
589
733
  ---
590
734
 
591
- ### vg path
735
+ ### vg install
592
736
 
593
- Show how A connects to Bshortest path in the call graph.
737
+ Add Vibgrate AI Context to your AI assistant(s) skill, MCP wiring, and advisory nudge.
594
738
 
595
739
  ```bash
596
- vg path <a> <b>
740
+ vg install [tools...]
741
+ vg uninstall <tools...>
597
742
  ```
598
743
 
744
+ Idempotent and repo-local (changes can be committed and shared with your team).
745
+
746
+ **Supported assistants:** `claude`, `cursor`, `windsurf`, `vscode`, `codex`, `gemini`
747
+
599
748
  | Flag | Description |
600
749
  |------|-------------|
601
- | `<a>` | Source node |
602
- | `<b>` | Target node |
603
- | `--pick-a <n>` | Pick the nth candidate for A |
604
- | `--pick-b <n>` | Pick the nth candidate for B |
750
+ | `[tools...]` | Assistant ids to install for |
751
+ | `--all` | Install for every supported assistant |
752
+ | `--list` | Show the support matrix and exit |
753
+ | `--no-hook` | Skip the advisory nudge |
754
+
755
+ **`vg uninstall` flags:**
756
+
757
+ | Flag | Description |
758
+ |------|-------------|
759
+ | `<tools...>` | Assistant ids to remove (required) |
760
+ | `--purge` | Also delete the skill file |
605
761
 
606
762
  ---
607
763
 
608
- ### vg tree
764
+ ### vg lib
609
765
 
610
- The call tree rooted at a node.
766
+ Version-correct library docs from the hosted catalog or local ingestion.
611
767
 
612
768
  ```bash
613
- vg tree <name>
769
+ vg lib # List the catalog
770
+ vg lib <name> # Show docs for a library (pinned to your lockfile version)
771
+ vg lib add <source> # Ingest docs from a local source
772
+ vg lib publish <name> # Upload private library docs to the hosted catalog
773
+ vg lib resolve <name> # Resolve name → catalog id + version
774
+ vg lib refresh # Re-ingest all local sources
614
775
  ```
615
776
 
616
- Callees by default; `--callers` to invert. Depth-bounded and cycle-safe.
617
-
618
777
  | Flag | Default | Description |
619
778
  |------|---------|-------------|
620
- | `<name>` | — | Root node |
621
- | `--callers` | — | Show callers instead of callees |
622
- | `--depth <n>` | `3` | Max depth |
623
- | `--pick <n>` | | Pick the nth candidate when ambiguous |
779
+ | `--name <name>` | — | Library name (for `add`) |
780
+ | `--version <v>` | — | Pin the doc version (for `add`/`publish`) |
781
+ | `-b, --budget <n>` | | Trim docs to ~N tokens |
782
+ | `--readme <path>` | `./README.md` | README path (for `publish`) |
783
+ | `--dts <path>` | — | TypeScript declaration path (for `publish`) |
784
+ | `--language <lang>` | — | Primary language (for `publish`) |
785
+ | `--region <region>` | `us` | Data-residency region for the hosted catalog |
786
+ | `--ingest <url>` | — | Hosted catalog URL override (wins over `--region`) |
624
787
 
625
788
  ---
626
789
 
@@ -643,29 +806,50 @@ vg oddities # Surprising cross-area links (architectural smells)
643
806
 
644
807
  ---
645
808
 
646
- ### vg lib
809
+ ### vg models
647
810
 
648
- Version-correct library docsfrom the hosted catalog or local ingestion.
811
+ The local model fleet Ollama, LM Studio, and on-disk `gguf` models — discovered entirely offline.
649
812
 
650
813
  ```bash
651
- vg lib # List the catalog
652
- vg lib <name> # Show docs for a library (pinned to your lockfile version)
653
- vg lib add <source> # Ingest docs from a local source
654
- vg lib publish <name> # Upload private library docs to the hosted catalog
655
- vg lib resolve <name> # Resolve name → catalog id + version
656
- vg lib refresh # Re-ingest all local sources
814
+ vg models
815
+ ```
816
+
817
+ Lists the local inference backends and models Vibgrate can see, so you know what is available without any network calls. Add `--json` for machine-readable output.
818
+
819
+ ---
820
+
821
+ ### vg path
822
+
823
+ Show how A connects to B — shortest path in the call graph.
824
+
825
+ ```bash
826
+ vg path <a> <b>
657
827
  ```
658
828
 
829
+ | Flag | Description |
830
+ |------|-------------|
831
+ | `<a>` | Source node |
832
+ | `<b>` | Target node |
833
+ | `--pick-a <n>` | Pick the nth candidate for A |
834
+ | `--pick-b <n>` | Pick the nth candidate for B |
835
+
836
+ ---
837
+
838
+ ### vg savings
839
+
840
+ A local, privacy-safe report of the tokens and dollars saved by querying the map instead of grepping and reading whole files.
841
+
842
+ ```bash
843
+ vg savings
844
+ ```
845
+
846
+ Reads the counts-only usage ledger recorded when you run `vg serve --savings` (or pass `--client` on CLI navigation calls). Nothing leaves your machine — the figures are estimates.
847
+
659
848
  | Flag | Default | Description |
660
849
  |------|---------|-------------|
661
- | `--name <name>` | | Library name (for `add`) |
662
- | `--version <v>` | — | Pin the doc version (for `add`/`publish`) |
663
- | `-b, --budget <n>` | — | Trim docs to ~N tokens |
664
- | `--readme <path>` | `./README.md` | README path (for `publish`) |
665
- | `--dts <path>` | — | TypeScript declaration path (for `publish`) |
666
- | `--language <lang>` | — | Primary language (for `publish`) |
667
- | `--region <region>` | `us` | Data-residency region for the hosted catalog |
668
- | `--ingest <url>` | — | Hosted catalog URL override (wins over `--region`) |
850
+ | `--days <n>` | `30` | Reporting window in days |
851
+
852
+ Add `--json` for machine-readable output.
669
853
 
670
854
  ---
671
855
 
@@ -683,11 +867,16 @@ vg serve
683
867
  | `--port <n>` | `7437` | Port for `--http` |
684
868
  | `--host <h>` | `127.0.0.1` | Host for `--http` |
685
869
  | `--savings` | — | Record local, counts-only usage savings (opt-in) |
870
+ | `--share-stats` | — | Also upload the counts-only usage ledger to Vibgrate to improve the local MCP (opt-in; off by default; implies `--savings`; disabled under `--local`) |
686
871
  | `--dedup` | — | Collapse a node's heavy relation lists on repeat reads within a session, to save tokens (opt-in) |
687
872
  | `--no-refresh` | — | Serve the map as built; skip the auto-rebuild when files change |
688
873
 
689
874
  Via stdio (default), your AI assistant spawns the server. Via `--http`, it runs as a local HTTP endpoint for browser or shared access.
690
875
 
876
+ **Usage stats — local by default, sharing is opt-in.** `--savings` records a *counts-only* ledger under `.vibgrate/` — per navigation call: which tool, how it resolved (complete/partial/miss), the vg-vs-grep token figures, whether it came over the MCP (`mcp`) or the `vg` CLI (`cli`), and a coarse client label (which AI). `vg savings` reports it locally; nothing leaves your machine. `--share-stats` additionally uploads that same counts-only ledger to Vibgrate periodically, so we can see how the local MCP is used and improve it. It **never** sends code, file paths, question text, repo identity, or any credential — only counts, outcomes, token figures, the vg version, your OS/arch, and a random per-install id. It's off unless you pass the flag, is disabled entirely under `--local`, and the endpoint can be overridden with `VIBGRATE_STATS_ENDPOINT`.
877
+
878
+ **Attributing CLI calls.** The MCP path detects the calling client automatically from the connection handshake. For CLI calls, pass `--client=<ai>` (e.g. `vg "how does auth work" --client=claude`) so the call is attributed in `vg savings` and any shared stats — this is what `vg install` writes into each assistant's skill. Without `--client`, a bare `vg ask` records nothing.
879
+
691
880
  **The map stays fresh while you (or your AI) edit code.** Each tool call runs a cheap stat-only freshness check against the last build; when files really changed, the server rebuilds the map incrementally in-process — only changed files re-parse — and answers from the updated graph. Probes are debounced with a self-tuning cadence (2s floor, scaling with measured probe cost so probing never exceeds a few percent of serve time even on very large repos), rebuilds are single-flight and cross-process locked, and touch-only changes (a `git checkout`, a re-save with identical content) are recognized by content hash and never trigger a rebuild. There is no filesystem watcher and no daemon: freshness is checked exactly when it matters — at query time. The server also hot-reloads `graph.json` whenever it changes on disk, so an external `vg` build is picked up on the next call too.
692
881
 
693
882
  The server exposes read-only tools your assistant can call over the code map and dependency data, including:
@@ -702,35 +891,6 @@ All tools are read-only. The server is local-first: it always answers from your
702
891
 
703
892
  ---
704
893
 
705
- ### vg install
706
-
707
- Add Vibgrate AI Context to your AI assistant(s) — skill, MCP wiring, and advisory nudge.
708
-
709
- ```bash
710
- vg install [tools...]
711
- vg uninstall <tools...>
712
- ```
713
-
714
- Idempotent and repo-local (changes can be committed and shared with your team).
715
-
716
- **Supported assistants:** `claude`, `cursor`, `windsurf`, `vscode`, `codex`, `gemini`
717
-
718
- | Flag | Description |
719
- |------|-------------|
720
- | `[tools...]` | Assistant ids to install for |
721
- | `--all` | Install for every supported assistant |
722
- | `--list` | Show the support matrix and exit |
723
- | `--no-hook` | Skip the advisory nudge |
724
-
725
- **`vg uninstall` flags:**
726
-
727
- | Flag | Description |
728
- |------|-------------|
729
- | `<tools...>` | Assistant ids to remove (required) |
730
- | `--purge` | Also delete the skill file |
731
-
732
- ---
733
-
734
894
  ### vg share
735
895
 
736
896
  Make the code map committable and auto-updating for your team.
@@ -748,32 +908,32 @@ Installs a pre-commit hook, deterministic merge driver, and `.gitignore` so the
748
908
 
749
909
  ---
750
910
 
751
- ### vg status
911
+ ### vg show
752
912
 
753
- Graph freshness, counts, and staleness compared against the working tree.
913
+ Explain a single node: what it is, what it calls, what calls it.
754
914
 
755
915
  ```bash
756
- vg status
916
+ vg show <name>
757
917
  ```
758
918
 
759
- Outputs: map path, generation timestamp, node/edge/area counts, languages, cluster method, resolver rungs used, cache status, and stale file count. When a build has run on this machine, staleness is exact (per-file stat + content hash against the last build's snapshot — edits, adds, and removes); otherwise it falls back to comparing the file set.
919
+ | Flag | Description |
920
+ |------|-------------|
921
+ | `<name>` | Qualified name, short name, `file:line`, glob, or id |
922
+ | `--pick <n>` | Pick the nth candidate when ambiguous |
923
+
924
+ Outputs the qualified name, kind, file location, signature, importance score, area, extends relationships, callees, and callers.
760
925
 
761
926
  ---
762
927
 
763
- ### vg facts
928
+ ### vg status
764
929
 
765
- Deterministic open facts for a node (contract, invariant, characterization).
930
+ Graph freshness, counts, and staleness compared against the working tree.
766
931
 
767
932
  ```bash
768
- vg facts <name>
933
+ vg status
769
934
  ```
770
935
 
771
- Epistemic-typed: declared/static observed/derived. Requires `--deep` for derived facts beyond basic declarations.
772
-
773
- | Flag | Description |
774
- |------|-------------|
775
- | `<name>` | Node to inspect |
776
- | `--pick <n>` | Pick the nth candidate when ambiguous |
936
+ Outputs: map path, generation timestamp, node/edge/area counts, languages, cluster method, resolver rungs used, cache status, and stale file count. When a build has run on this machine, staleness is exact (per-file stat + content hash against the last build's snapshot — edits, adds, and removes); otherwise it falls back to comparing the file set.
777
937
 
778
938
  ---
779
939
 
@@ -797,44 +957,40 @@ vg tests <name>
797
957
 
798
958
  ---
799
959
 
800
- ### vg embed
960
+ ### vg tree
801
961
 
802
- Precompute the semantic index so the next `vg ask` is instant.
962
+ The call tree rooted at a node.
803
963
 
804
964
  ```bash
805
- vg embed
965
+ vg tree <name>
806
966
  ```
807
967
 
808
- Local ONNX model downloaded once into a shared cache (`~/.cache/vibgrate/models`). Per-repo vectors stored in `.vibgrate/cache/`.
968
+ Callees by default; `--callers` to invert. Depth-bounded and cycle-safe.
809
969
 
810
- | Flag | Description |
811
- |------|-------------|
812
- | `--where` | Show where the model is cached and its size |
813
- | `--clear` | Remove the downloaded model from shared cache |
970
+ | Flag | Default | Description |
971
+ |------|---------|-------------|
972
+ | `<name>` | | Root node |
973
+ | `--callers` | | Show callers instead of callees |
974
+ | `--depth <n>` | `3` | Max depth |
975
+ | `--pick <n>` | — | Pick the nth candidate when ambiguous |
814
976
 
815
977
  ---
816
978
 
817
- ### vg export
979
+ ### vg unknowns
818
980
 
819
- Export the code map in various formats.
981
+ What the graph cannot resolve, ranked by blast radius — the unresolved references most worth teaching the map about.
820
982
 
821
983
  ```bash
822
- vg export [file]
984
+ vg unknowns
823
985
  ```
824
986
 
825
- Format is inferred from the file extension. Use `-` for stdout.
987
+ Surfaces the symbols and imports the resolver could not tie to a definition, ordered by how much depends on them, so you can see where a SCIP index or a targeted `--only` language pass would most improve resolution.
826
988
 
827
- | Extension | Format |
828
- |-----------|--------|
829
- | `.json` | JSON |
830
- | `.ndjson` | Newline-delimited JSON |
831
- | `.graphml` | GraphML |
832
- | `.dot` | Graphviz DOT |
833
- | `.cypher` | Neo4j Cypher |
834
- | `.md` | Markdown |
835
- | `.html` | HTML visualization |
836
- | `.cdx.json` | CycloneDX SBOM / AI-BOM |
837
- | `.spdx.json` | SPDX |
989
+ | Flag | Default | Description |
990
+ |------|---------|-------------|
991
+ | `-n, --limit <n>` | `20` | How many to show |
992
+
993
+ Add `--json` for machine-readable output.
838
994
 
839
995
  ---
840
996
 
@@ -1326,7 +1482,7 @@ import type {
1326
1482
 
1327
1483
  ## Requirements
1328
1484
 
1329
- - **Node.js** >= 22.0.0
1485
+ - **Node.js** >= 20.0.0
1330
1486
  - Works on macOS, Linux, and Windows
1331
1487
 
1332
1488
  ---