@vibgrate/cli 2026.722.2 → 2026.727.1
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 +418 -196
- package/README.md +34 -7
- package/dist/baseline-K7YBFKZI.js +7 -0
- package/dist/{baseline-BD3A7EXD.js.map → baseline-K7YBFKZI.js.map} +1 -1
- package/dist/chunk-3BVSDMHV.js +2496 -0
- package/dist/chunk-3BVSDMHV.js.map +1 -0
- package/dist/{chunk-PY3DNX5H.js → chunk-3Q7QBWFW.js} +13 -2
- package/dist/chunk-3Q7QBWFW.js.map +1 -0
- package/dist/chunk-4CQ3MGNN.js +136 -0
- package/dist/chunk-4CQ3MGNN.js.map +1 -0
- package/dist/chunk-5I4VSBWQ.js +764 -0
- package/dist/chunk-5I4VSBWQ.js.map +1 -0
- package/dist/chunk-5Q54GEHM.js +29 -0
- package/dist/chunk-5Q54GEHM.js.map +1 -0
- package/dist/{chunk-2O5YZVZV.js → chunk-65MEOA4E.js} +21 -18
- package/dist/chunk-65MEOA4E.js.map +1 -0
- package/dist/{chunk-WNIIKCNF.js → chunk-6IOQJGFT.js} +29 -238
- package/dist/chunk-6IOQJGFT.js.map +1 -0
- package/dist/{chunk-CS37OBE3.js → chunk-7JHPQ6WF.js} +791 -783
- package/dist/chunk-7JHPQ6WF.js.map +1 -0
- package/dist/chunk-BPF3YX2U.js +64 -0
- package/dist/chunk-BPF3YX2U.js.map +1 -0
- package/dist/chunk-BWPBB45M.js +88 -0
- package/dist/chunk-BWPBB45M.js.map +1 -0
- package/dist/chunk-C4CKTAZP.js +1695 -0
- package/dist/chunk-C4CKTAZP.js.map +1 -0
- package/dist/chunk-EDAAG7BL.js +612 -0
- package/dist/chunk-EDAAG7BL.js.map +1 -0
- package/dist/chunk-EDBV33B7.js +57 -0
- package/dist/chunk-EDBV33B7.js.map +1 -0
- package/dist/chunk-HABUT7HW.js +233 -0
- package/dist/chunk-HABUT7HW.js.map +1 -0
- package/dist/{chunk-NONYJLOJ.js → chunk-HYZVHJ3Q.js} +3 -3
- package/dist/{chunk-NONYJLOJ.js.map → chunk-HYZVHJ3Q.js.map} +1 -1
- package/dist/chunk-IS7VTH2Q.js +627 -0
- package/dist/chunk-IS7VTH2Q.js.map +1 -0
- package/dist/chunk-IZDH67DX.js +289 -0
- package/dist/chunk-IZDH67DX.js.map +1 -0
- package/dist/chunk-J7LKEB2R.js +51 -0
- package/dist/chunk-J7LKEB2R.js.map +1 -0
- package/dist/chunk-JIBOJTGS.js +313 -0
- package/dist/chunk-JIBOJTGS.js.map +1 -0
- package/dist/chunk-JZYGEZTU.js +82 -0
- package/dist/chunk-JZYGEZTU.js.map +1 -0
- package/dist/chunk-K7REHDQS.js +776 -0
- package/dist/chunk-K7REHDQS.js.map +1 -0
- package/dist/chunk-KHJO4D5N.js +108 -0
- package/dist/chunk-KHJO4D5N.js.map +1 -0
- package/dist/chunk-NDMDSPFX.js +69 -0
- package/dist/chunk-NDMDSPFX.js.map +1 -0
- package/dist/chunk-OOIG3RUM.js +276 -0
- package/dist/chunk-OOIG3RUM.js.map +1 -0
- package/dist/{chunk-6CXTPC74.js → chunk-OXQNQW5J.js} +27 -6
- package/dist/chunk-OXQNQW5J.js.map +1 -0
- package/dist/chunk-PMYWZRRS.js +62 -0
- package/dist/chunk-PMYWZRRS.js.map +1 -0
- package/dist/chunk-PXHNTC6D.js +382 -0
- package/dist/chunk-PXHNTC6D.js.map +1 -0
- package/dist/{chunk-3MXNNBLI.js → chunk-S6CYDZEW.js} +1395 -1975
- package/dist/chunk-S6CYDZEW.js.map +1 -0
- package/dist/chunk-SZLF66FJ.js +843 -0
- package/dist/chunk-SZLF66FJ.js.map +1 -0
- package/dist/chunk-VXGV6NTD.js +476 -0
- package/dist/chunk-VXGV6NTD.js.map +1 -0
- package/dist/{chunk-5BDHQ7DD.js → chunk-WLETRGAC.js} +16 -9
- package/dist/chunk-WLETRGAC.js.map +1 -0
- package/dist/{chunk-I7GY7MVN.js → chunk-YDAT7LD2.js} +51 -11
- package/dist/chunk-YDAT7LD2.js.map +1 -0
- package/dist/cli.js +3412 -513
- package/dist/cli.js.map +1 -1
- package/dist/execution-env-3BN7Z737.js +3 -0
- package/dist/execution-env-3BN7Z737.js.map +1 -0
- package/dist/federation-EPZDUWCK.js +6 -0
- package/dist/federation-EPZDUWCK.js.map +1 -0
- package/dist/git-ref-HPRLUFFW.js +3 -0
- package/dist/git-ref-HPRLUFFW.js.map +1 -0
- package/dist/graph-backend-ZMSYOZMW.js +10 -0
- package/dist/graph-backend-ZMSYOZMW.js.map +1 -0
- package/dist/index.d.ts +432 -126
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/{interactive-A4DISSIW.js → interactive-ICL7D7LO.js} +185 -226
- package/dist/interactive-ICL7D7LO.js.map +1 -0
- package/dist/llm-host-2RAYQSDQ.js +8 -0
- package/dist/llm-host-2RAYQSDQ.js.map +1 -0
- package/dist/load-OHVKDX4R.js +7 -0
- package/dist/load-OHVKDX4R.js.map +1 -0
- package/dist/local-runtime-OJFLX2HI.js +4 -0
- package/dist/local-runtime-OJFLX2HI.js.map +1 -0
- package/dist/model-execution-profile-MQ2QCP24.js +3 -0
- package/dist/model-execution-profile-MQ2QCP24.js.map +1 -0
- package/dist/model-orchestrator-FFTZI3U2.js +8 -0
- package/dist/model-orchestrator-FFTZI3U2.js.map +1 -0
- package/dist/parse-worker.d.ts +1 -1
- package/dist/parse-worker.js +1 -1
- package/dist/paths-MCH75O3G.js +5 -0
- package/dist/paths-MCH75O3G.js.map +1 -0
- package/dist/resolve-gguf-4UPIGPEE.js +7 -0
- package/dist/resolve-gguf-4UPIGPEE.js.map +1 -0
- package/dist/runtime-session-IDU5BDUJ.js +17 -0
- package/dist/runtime-session-IDU5BDUJ.js.map +1 -0
- package/dist/session-L2OSDRPI.js +10 -0
- package/dist/{session-POJUDFPH.js.map → session-L2OSDRPI.js.map} +1 -1
- package/dist/{stream-json-Q2JGWPHB.js → stream-json-F74W5FCK.js} +16 -6
- package/dist/stream-json-F74W5FCK.js.map +1 -0
- package/dist/{types-Jl6RJ175.d.ts → types-ZMg1mSuu.d.ts} +3 -1
- package/dist/vgd-EGBQD7BW.js +16 -0
- package/dist/vgd-EGBQD7BW.js.map +1 -0
- package/package.json +9 -6
- package/dist/baseline-BD3A7EXD.js +0 -7
- package/dist/chunk-2O5YZVZV.js.map +0 -1
- package/dist/chunk-3MXNNBLI.js.map +0 -1
- package/dist/chunk-5BDHQ7DD.js.map +0 -1
- package/dist/chunk-6CXTPC74.js.map +0 -1
- package/dist/chunk-CS37OBE3.js.map +0 -1
- package/dist/chunk-GGJZA3Q6.js +0 -961
- package/dist/chunk-GGJZA3Q6.js.map +0 -1
- package/dist/chunk-I7GY7MVN.js.map +0 -1
- package/dist/chunk-JBXNQCGE.js +0 -484
- package/dist/chunk-JBXNQCGE.js.map +0 -1
- package/dist/chunk-PY3DNX5H.js.map +0 -1
- package/dist/chunk-WNIIKCNF.js.map +0 -1
- package/dist/interactive-A4DISSIW.js.map +0 -1
- package/dist/session-POJUDFPH.js +0 -6
- package/dist/stream-json-Q2JGWPHB.js.map +0 -1
package/DOCS.md
CHANGED
|
@@ -14,30 +14,32 @@ For a quick overview, see the [README](./README.md). This document covers everyt
|
|
|
14
14
|
- [vg baseline](#vg-baseline)
|
|
15
15
|
- [vg bisect](#vg-bisect)
|
|
16
16
|
- [vg drift](#vg-drift)
|
|
17
|
-
- [vg dsn create](#vg-dsn-create)
|
|
18
17
|
- [vg evidence](#vg-evidence)
|
|
19
18
|
- [vg fix](#vg-fix)
|
|
20
19
|
- [vg init](#vg-init)
|
|
21
|
-
- [vg login](#vg-login)
|
|
22
|
-
- [vg logout](#vg-logout)
|
|
23
|
-
- [vg push](#vg-push)
|
|
24
20
|
- [vg report](#vg-report)
|
|
25
21
|
- [vg sbom](#vg-sbom)
|
|
26
22
|
- [vg scan](#vg-scan)
|
|
27
23
|
- [Vulnerabilities and exposure attribution](#vulnerabilities-and-exposure-attribution)
|
|
28
24
|
- [vg update](#vg-update)
|
|
29
25
|
- [vg why](#vg-why)
|
|
26
|
+
- [Workspace auth & cloud upload](#workspace-auth--cloud-upload)
|
|
27
|
+
- [vg dsn create](#vg-dsn-create)
|
|
28
|
+
- [vg login](#vg-login)
|
|
29
|
+
- [vg logout](#vg-logout)
|
|
30
|
+
- [vg push](#vg-push)
|
|
30
31
|
- [Code Graph Commands](#code-graph-commands)
|
|
31
32
|
- [vg ask](#vg-ask)
|
|
32
33
|
- [vg benchmark](#vg-benchmark)
|
|
33
34
|
- [vg build](#vg-build)
|
|
34
35
|
- [vg bundle](#vg-bundle)
|
|
36
|
+
- [vg code](#vg-code)
|
|
35
37
|
- [vg embed](#vg-embed)
|
|
36
38
|
- [vg export](#vg-export)
|
|
37
39
|
- [vg facts](#vg-facts)
|
|
38
40
|
- [vg guide](#vg-guide)
|
|
39
41
|
- [vg impact](#vg-impact)
|
|
40
|
-
- [vg install](#vg-install)
|
|
42
|
+
- [vg install / vg uninstall](#vg-install)
|
|
41
43
|
- [vg lib](#vg-lib)
|
|
42
44
|
- [vg map / vg hubs / vg areas / vg oddities](#vg-map--vg-hubs--vg-areas--vg-oddities)
|
|
43
45
|
- [vg models](#vg-models)
|
|
@@ -50,6 +52,11 @@ For a quick overview, see the [README](./README.md). This document covers everyt
|
|
|
50
52
|
- [vg tests](#vg-tests)
|
|
51
53
|
- [vg tree](#vg-tree)
|
|
52
54
|
- [vg unknowns](#vg-unknowns)
|
|
55
|
+
- [Diagnostics, IDE & runtime](#diagnostics-ide--runtime)
|
|
56
|
+
- [vg daemon](#vg-daemon)
|
|
57
|
+
- [vg doctor](#vg-doctor)
|
|
58
|
+
- [vg lsp](#vg-lsp)
|
|
59
|
+
- [vg policy](#vg-policy)
|
|
53
60
|
- [DriftScore](#driftscore)
|
|
54
61
|
- [Drift Baselines & Fitness Functions](#drift-baselines--fitness-functions)
|
|
55
62
|
- [How the Score Is Calculated](#how-the-score-is-calculated)
|
|
@@ -171,6 +178,10 @@ Expected results:
|
|
|
171
178
|
|
|
172
179
|
## Commands Reference
|
|
173
180
|
|
|
181
|
+
Drift scoring, baselines, reports, supply-chain evidence, and related local tooling.
|
|
182
|
+
|
|
183
|
+
**Typical path:** `vg init` → `vg scan` → `vg baseline` → `vg report` → `vg fix`
|
|
184
|
+
|
|
174
185
|
### vg baseline
|
|
175
186
|
|
|
176
187
|
Create a drift baseline snapshot for delta comparison.
|
|
@@ -183,6 +194,7 @@ Runs a full scan and saves the result to `.vibgrate/baseline.json`. Use this as
|
|
|
183
194
|
|
|
184
195
|
---
|
|
185
196
|
|
|
197
|
+
|
|
186
198
|
### vg bisect
|
|
187
199
|
|
|
188
200
|
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.
|
|
@@ -205,6 +217,7 @@ Exit codes: `0` when the query resolves, `2` when `--assert` finds the constrain
|
|
|
205
217
|
|
|
206
218
|
---
|
|
207
219
|
|
|
220
|
+
|
|
208
221
|
### vg drift
|
|
209
222
|
|
|
210
223
|
What is outdated across your dependencies — a fast, offline currency check.
|
|
@@ -224,25 +237,6 @@ Add `--json` for machine-readable output.
|
|
|
224
237
|
|
|
225
238
|
---
|
|
226
239
|
|
|
227
|
-
### vg dsn create
|
|
228
|
-
|
|
229
|
-
Generate an HMAC-signed DSN token for API authentication.
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
vg dsn create --workspace <id|new> [--region <region>] [--ingest <url>] [--write <path>]
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
| Flag | Default | Description |
|
|
236
|
-
| ------------- | ---------- | --------------------------------------------------------------------------- |
|
|
237
|
-
| `--workspace` | _required_ | Your workspace ID, or `new` to auto-generate a workspace |
|
|
238
|
-
| `--region` | `us` | Data residency region (`us`, `eu`) |
|
|
239
|
-
| `--ingest` | — | Custom ingest API URL (overrides `--region`) |
|
|
240
|
-
| `--write` | — | Write DSN to a file (add to `.gitignore`!) |
|
|
241
|
-
|
|
242
|
-
When using `--workspace new`, the CLI auto-generates a workspace ID and provisions the DSN
|
|
243
|
-
with the Vibgrate API. Rate limited to 1 new DSN per 5 minutes per IP address.
|
|
244
|
-
|
|
245
|
-
---
|
|
246
240
|
|
|
247
241
|
### vg evidence
|
|
248
242
|
|
|
@@ -293,6 +287,7 @@ No language model touches any figure in the evidence path, and every determinati
|
|
|
293
287
|
|
|
294
288
|
---
|
|
295
289
|
|
|
290
|
+
|
|
296
291
|
### vg fix
|
|
297
292
|
|
|
298
293
|
Turn a drift scan into ranked, risk-tiered upgrade plans and **apply** the one
|
|
@@ -378,6 +373,7 @@ advisory at or above the threshold or an apply step fails.
|
|
|
378
373
|
|
|
379
374
|
---
|
|
380
375
|
|
|
376
|
+
|
|
381
377
|
### vg init
|
|
382
378
|
|
|
383
379
|
Initialise Vibgrate in a project.
|
|
@@ -398,50 +394,6 @@ Creates:
|
|
|
398
394
|
|
|
399
395
|
---
|
|
400
396
|
|
|
401
|
-
### vg login
|
|
402
|
-
|
|
403
|
-
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.
|
|
404
|
-
|
|
405
|
-
```bash
|
|
406
|
-
vg login
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
| Flag | Default | Description |
|
|
410
|
-
|------|---------|-------------|
|
|
411
|
-
| `--region <region>` | `us` | Data-residency region (`us`, `eu`) |
|
|
412
|
-
| `--ingest <url>` | — | Custom ingest API URL (overrides `--region`) |
|
|
413
|
-
| `--no-browser` | — | Print the URL to open instead of launching a browser (headless / SSH) |
|
|
414
|
-
|
|
415
|
-
---
|
|
416
|
-
|
|
417
|
-
### vg logout
|
|
418
|
-
|
|
419
|
-
Clear stored Vibgrate login credentials from this machine.
|
|
420
|
-
|
|
421
|
-
```bash
|
|
422
|
-
vg logout
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
### vg push
|
|
428
|
-
|
|
429
|
-
Upload scan results to the Vibgrate Cloud API.
|
|
430
|
-
|
|
431
|
-
```bash
|
|
432
|
-
vg push [--dsn <dsn>] [--file <file>] [--region <region>] [--strict]
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
| Flag | Default | Description |
|
|
436
|
-
| ---------- | ---------------------------- | ------------------------------------------- |
|
|
437
|
-
| `--dsn` | `VIBGRATE_DSN` env | DSN token for authentication |
|
|
438
|
-
| `--file` | `.vibgrate/scan_result.json` | Scan artifact to upload |
|
|
439
|
-
| `--region` | — | Override data residency region (`us`, `eu`) |
|
|
440
|
-
| `--strict` | — | Fail hard on upload errors |
|
|
441
|
-
|
|
442
|
-
Upload is always optional. Best-effort by default — use `--strict` in CI if you want the pipeline to fail on upload errors.
|
|
443
|
-
|
|
444
|
-
---
|
|
445
397
|
|
|
446
398
|
### vg report
|
|
447
399
|
|
|
@@ -458,6 +410,7 @@ vg report [--in <file>] [--format md|text|json]
|
|
|
458
410
|
|
|
459
411
|
---
|
|
460
412
|
|
|
413
|
+
|
|
461
414
|
### vg sbom
|
|
462
415
|
|
|
463
416
|
Export [SBOMs](https://vibgrate.com/glossary/sbom) from an existing scan artifact or compare two artifacts.
|
|
@@ -480,6 +433,7 @@ Use this to treat SBOMs as operational intelligence instead of static compliance
|
|
|
480
433
|
|
|
481
434
|
---
|
|
482
435
|
|
|
436
|
+
|
|
483
437
|
### vg scan
|
|
484
438
|
|
|
485
439
|
The primary command. Scans your project for upgrade drift.
|
|
@@ -561,6 +515,7 @@ vg scan --full
|
|
|
561
515
|
|
|
562
516
|
---
|
|
563
517
|
|
|
518
|
+
|
|
564
519
|
### vg update
|
|
565
520
|
|
|
566
521
|
Check for and install updates.
|
|
@@ -576,6 +531,7 @@ vg update [--check] [--pm <manager>]
|
|
|
576
531
|
|
|
577
532
|
---
|
|
578
533
|
|
|
534
|
+
|
|
579
535
|
### vg why
|
|
580
536
|
|
|
581
537
|
Explain a dependency from git history: who added it, every version since, and any open vulnerabilities it carries.
|
|
@@ -588,25 +544,88 @@ vg why <package>
|
|
|
588
544
|
|
|
589
545
|
---
|
|
590
546
|
|
|
591
|
-
## Code Graph Commands
|
|
592
547
|
|
|
593
|
-
|
|
548
|
+
## Workspace auth & cloud upload
|
|
594
549
|
|
|
595
|
-
|
|
550
|
+
Sign in to Vibgrate Cloud, manage DSN tokens for CI, and push scan results. Local drift scoring does not require this — nothing leaves your machine until you push.
|
|
596
551
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
552
|
+
**Typical path:** `vg login` → `vg dsn create` → `vg push` → `vg logout`
|
|
553
|
+
|
|
554
|
+
### vg dsn create
|
|
555
|
+
|
|
556
|
+
Generate an HMAC-signed DSN token for API authentication.
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
vg dsn create --workspace <id|new> [--region <region>] [--ingest <url>] [--write <path>]
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
| Flag | Default | Description |
|
|
563
|
+
| ------------- | ---------- | --------------------------------------------------------------------------- |
|
|
564
|
+
| `--workspace` | _required_ | Your workspace ID, or `new` to auto-generate a workspace |
|
|
565
|
+
| `--region` | `us` | Data residency region (`us`, `eu`) |
|
|
566
|
+
| `--ingest` | — | Custom ingest API URL (overrides `--region`) |
|
|
567
|
+
| `--write` | — | Write DSN to a file (add to `.gitignore`!) |
|
|
568
|
+
|
|
569
|
+
When using `--workspace new`, the CLI auto-generates a workspace ID and provisions the DSN
|
|
570
|
+
with the Vibgrate API. Rate limited to 1 new DSN per 5 minutes per IP address.
|
|
607
571
|
|
|
608
572
|
---
|
|
609
573
|
|
|
574
|
+
|
|
575
|
+
### vg login
|
|
576
|
+
|
|
577
|
+
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.
|
|
578
|
+
|
|
579
|
+
```bash
|
|
580
|
+
vg login
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
| Flag | Default | Description |
|
|
584
|
+
|------|---------|-------------|
|
|
585
|
+
| `--region <region>` | `us` | Data-residency region (`us`, `eu`) |
|
|
586
|
+
| `--ingest <url>` | — | Custom ingest API URL (overrides `--region`) |
|
|
587
|
+
| `--no-browser` | — | Print the URL to open instead of launching a browser (headless / SSH) |
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
### vg logout
|
|
593
|
+
|
|
594
|
+
Clear stored Vibgrate login credentials from this machine.
|
|
595
|
+
|
|
596
|
+
```bash
|
|
597
|
+
vg logout
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
### vg push
|
|
604
|
+
|
|
605
|
+
Upload scan results to the Vibgrate Cloud API.
|
|
606
|
+
|
|
607
|
+
```bash
|
|
608
|
+
vg push [--dsn <dsn>] [--file <file>] [--region <region>] [--strict]
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
| Flag | Default | Description |
|
|
612
|
+
| ---------- | ---------------------------- | ------------------------------------------- |
|
|
613
|
+
| `--dsn` | `VIBGRATE_DSN` env | DSN token for authentication |
|
|
614
|
+
| `--file` | `.vibgrate/scan_result.json` | Scan artifact to upload |
|
|
615
|
+
| `--region` | — | Override data residency region (`us`, `eu`) |
|
|
616
|
+
| `--strict` | — | Fail hard on upload errors |
|
|
617
|
+
|
|
618
|
+
Upload is always optional. Best-effort by default — use `--strict` in CI if you want the pipeline to fail on upload errors.
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
## Code Graph Commands
|
|
624
|
+
|
|
625
|
+
Build and query the deterministic code map.
|
|
626
|
+
|
|
627
|
+
**Typical path:** `vg build` → `vg status` → `vg ask` → `vg impact` → `vg share`
|
|
628
|
+
|
|
610
629
|
### vg ask
|
|
611
630
|
|
|
612
631
|
Ask the code map a question using hybrid lexical + structural + semantic search.
|
|
@@ -692,6 +711,129 @@ Add `--json` for machine-readable output.
|
|
|
692
711
|
|
|
693
712
|
---
|
|
694
713
|
|
|
714
|
+
### vg code
|
|
715
|
+
|
|
716
|
+
Propose a code edit for a plain-language instruction, grounded in the deterministic code graph. `vg code` is **dry-run by default**: it prints the proposed diff and writes nothing.
|
|
717
|
+
|
|
718
|
+
```bash
|
|
719
|
+
vg code "add a --timeout flag to the scan command"
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
**Agentic sessions.** With a real model, `vg code` is a coding *agent*, not just a one-shot editor: the model is given tools and works in steps — **search the code graph**, read files, check a symbol's blast radius, edit, create/delete files, and run your tests or build — until the task is done. Every mutating step (an edit or a command) is **governed**: you approve it, or run autonomously with `--auto`. Read-only steps (search/read/list/impact) run without prompting. `--single` forces the old one-shot diff; `--max-steps <n>` caps the loop.
|
|
723
|
+
|
|
724
|
+
**Guided mode.** Run `vg code` with no instruction at an interactive terminal and it walks you through everything: it builds the code map, then asks where the model should run — a local model, or one of the current top providers (Claude, GPT, Grok, Gemini, …) surfaced live from the catalog — and which model, with an "enter a slug myself" option at every step. Before pulling any local model it runs a memory pre-flight (estimated footprint vs free RAM/VRAM and already-loaded models) and won't pull a model your machine can't run; then it drops into an agent session where you describe tasks and approve each change. For scripts and CI, pass an instruction with `--auto` (or `--mock`) — the agent only prompts at a TTY, so automation never blocks.
|
|
725
|
+
|
|
726
|
+
While a session is active, Vibgrate Graph (`vg serve`) runs as a separate process for the life of the session and is stopped when you exit. Every graph-backed call is attributed to VG Code and the model in use, so `vg savings` reports token/$ savings **per model**.
|
|
727
|
+
|
|
728
|
+
**A full local session (no cloud):**
|
|
729
|
+
|
|
730
|
+
```bash
|
|
731
|
+
# one-time: a local coding model (or: vg models install)
|
|
732
|
+
vg models pull qwen2.5-coder:7b
|
|
733
|
+
|
|
734
|
+
# start a guided agent session — pick "Local model" → qwen2.5-coder:7b
|
|
735
|
+
vg code
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
```text
|
|
739
|
+
VG Code · graph-grounded coding · v2026.x
|
|
740
|
+
|
|
741
|
+
✔ Code map built
|
|
742
|
+
✔ Model catalog loaded
|
|
743
|
+
? Where should the model run?
|
|
744
|
+
❯ Local model (on your machine) 1 found
|
|
745
|
+
Anthropic (Claude) via OpenRouter
|
|
746
|
+
…
|
|
747
|
+
✔ qwen2.5-coder:7b
|
|
748
|
+
◆ Ready — ollama/qwen2.5-coder:7b · graph 48213. Describe a task; empty line to exit.
|
|
749
|
+
|
|
750
|
+
code › add a --timeout flag to the scan command and use it
|
|
751
|
+
|
|
752
|
+
→ search_code(query: --timeout flag scan command)
|
|
753
|
+
scanCommand (function) src/commands/scan.ts:12
|
|
754
|
+
→ read_file(path: src/commands/scan.ts)
|
|
755
|
+
src/commands/scan.ts (40 lines): …
|
|
756
|
+
→ graph_impact(symbol: runScan)
|
|
757
|
+
3 symbol(s) depend on runScan: …
|
|
758
|
+
I'll add the option and thread it through.
|
|
759
|
+
→ edit_file(path: src/commands/scan.ts, …)
|
|
760
|
+
--- a/src/commands/scan.ts
|
|
761
|
+
+++ b/src/commands/scan.ts
|
|
762
|
+
@@ …
|
|
763
|
+
+ .option('--timeout <ms>', 'abort the scan after <ms> milliseconds')
|
|
764
|
+
? Apply edit to src/commands/scan.ts? [Y/n] y
|
|
765
|
+
✔ edited src/commands/scan.ts
|
|
766
|
+
→ run_command(command: npm test -- scan)
|
|
767
|
+
? Run `npm test -- scan`? [y/N] y
|
|
768
|
+
✔ exit 0 … 12 passing
|
|
769
|
+
→ finish(summary: added a --timeout flag to scan and covered it with tests)
|
|
770
|
+
|
|
771
|
+
✔ added a --timeout flag to scan and covered it with tests
|
|
772
|
+
+6 -1 across 1 file(s) · via ollama/qwen2.5-coder:7b
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
Run it non-interactively with `vg code "add a --timeout flag to scan" --provider ollama --model qwen2.5-coder:7b --auto`, or against a hosted model with `--provider openrouter --model anthropic/claude-3.5-sonnet` (set `OPENROUTER_API_KEY`).
|
|
776
|
+
|
|
777
|
+
**In a session** you can type slash-commands: `/undo` reverts the last change, `/diff` shows it, `/model` switches model, `/cost` shows the running token/$ cost, `/help` lists them, `/exit` quits.
|
|
778
|
+
|
|
779
|
+
**More session controls:**
|
|
780
|
+
|
|
781
|
+
- `--stream` streams the model's output live as it's generated.
|
|
782
|
+
- `--verify [command]` runs your tests after the agent finishes and, if they fail, feeds the failures back so it fixes them (uses the `testCommand` from config if you don't name one).
|
|
783
|
+
- `--continue` resumes your most recent session — it recaps what was already done for the model and restores `/undo`.
|
|
784
|
+
- A live **token/$ meter** shows after each task and via `/cost` (cost is shown when the model's price is known; local models are free).
|
|
785
|
+
- **External MCP tools:** list servers under `mcpServers` in `.vibgrate/code.json` and the agent can call their tools (namespaced `mcp__<server>__<tool>`); read-only tools run freely, anything else is approved like a built-in mutating tool. VG Code also **adopts the standard MCP config files** already in your repo — `.mcp.json` (Claude Code), `.cursor/mcp.json` (Cursor), and `.vscode/mcp.json` (VS Code) — and merges them with your `.vibgrate/code.json` (which wins on any name clash), so servers you've already configured for another tool work here with no extra setup. Both local (`command`) and remote (`url`) servers are supported.
|
|
786
|
+
|
|
787
|
+
**Tools the agent has:** searching is the code graph (`search_code`) — not a grep — plus `read_file`, `list_files`, `graph_impact` (blast radius), **`library_docs`** (version-correct docs for a dependency you actually have installed, so the model uses the right API for your version), `edit_file`, `create_file`, `delete_file`, and `run_command`.
|
|
788
|
+
|
|
789
|
+
**Safety.** The agent never sends a secrets file (`.env`, keys, credentials) to the model, and redacts stray credential shapes from any file it reads. Under `--auto`, a denylist blocks catastrophic commands (filesystem wipes, `curl … | sh`, force-push, …); interactively you see and approve each command yourself.
|
|
790
|
+
|
|
791
|
+
**Configure once** in `.vibgrate/code.json` so you can then just run `vg code` (flags still override):
|
|
792
|
+
|
|
793
|
+
```json
|
|
794
|
+
{
|
|
795
|
+
"provider": "ollama",
|
|
796
|
+
"model": "qwen2.5-coder:7b",
|
|
797
|
+
"testCommand": "npm test",
|
|
798
|
+
"auto": false,
|
|
799
|
+
"denyCommands": ["deploy", "kubectl\\s+delete"],
|
|
800
|
+
"maxSteps": 24,
|
|
801
|
+
"mcpServers": {
|
|
802
|
+
"playwright": { "command": "npx", "args": ["-y", "@playwright/mcp"] }
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
It assembles a small, high-signal context from the map (the relevant symbols, their relations, the blast radius of changing them, and any hard constraints), asks the model you choose for a minimal edit, and applies that edit through a deterministic merge so the change lands exactly where it was meant to.
|
|
808
|
+
|
|
809
|
+
Writing is opt-in and confirmed. `--apply` walks the full inspect → assess → dry-run → approve → execute → verify → log lifecycle, and still requires your explicit `--yes` (or an interactive confirmation) — there is no write-without-consent path.
|
|
810
|
+
|
|
811
|
+
```bash
|
|
812
|
+
vg code "rename readCfg to readConfig everywhere it is called" --apply --yes
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
Pick a backend with `--provider` and `--model`. No model is bundled, and nothing is installed until you first use a backend that needs it:
|
|
816
|
+
|
|
817
|
+
- **Local** — `--provider ollama` or `--provider lmstudio` (or `--local` to force on-device only, no network).
|
|
818
|
+
- **Hosted** — any OpenAI-compatible endpoint: `--provider openrouter` / `litellm` / `openai` / `together`. API keys are read from the environment only (e.g. `OPENROUTER_API_KEY`), never passed as flags.
|
|
819
|
+
|
|
820
|
+
With no `--provider`, `vg code` chooses from what you have already configured (a hosted key, or a locally-pulled model) and never dials a cloud endpoint you didn't set up.
|
|
821
|
+
|
|
822
|
+
| Flag | Default | Description |
|
|
823
|
+
|------|---------|-------------|
|
|
824
|
+
| `<instruction>` | — | What to change, in plain language |
|
|
825
|
+
| `--provider <id>` | auto | `ollama`, `lmstudio`, `openrouter`, `litellm`, `openai`, `together`, `llama-cpp` |
|
|
826
|
+
| `--model <id>` | — | Model id (or set `VG_CODE_MODEL`) |
|
|
827
|
+
| `--file <path>` | — | Restrict the edit surface to this file (repeatable) |
|
|
828
|
+
| `--budget <n>` | `3000` | Approx context token budget |
|
|
829
|
+
| `--apply` | — | Write the change (still requires `--yes` or a confirmation) |
|
|
830
|
+
| `--yes` | — | Consent to write, or to a first-use package install, non-interactively |
|
|
831
|
+
| `--local` | — | On-device backends only; never touch the network |
|
|
832
|
+
|
|
833
|
+
Add `--json` for the full machine-readable result (proposed changes, diffs, and the verification summary), or `--out <file>` to write it for CI. Requires a map — run `vg` first if you have not built one.
|
|
834
|
+
|
|
835
|
+
---
|
|
836
|
+
|
|
695
837
|
### vg embed
|
|
696
838
|
|
|
697
839
|
Precompute the semantic index so the next `vg ask` is instant.
|
|
@@ -791,17 +933,24 @@ Add Vibgrate AI Context to your AI assistant(s) — skill, MCP wiring, and advis
|
|
|
791
933
|
|
|
792
934
|
```bash
|
|
793
935
|
vg install [tools...]
|
|
936
|
+
vg install --all
|
|
937
|
+
vg install --detect
|
|
938
|
+
vg install --list
|
|
794
939
|
vg uninstall <tools...>
|
|
940
|
+
vg uninstall cursor --purge
|
|
795
941
|
```
|
|
796
942
|
|
|
797
943
|
Idempotent and repo-local (changes can be committed and shared with your team).
|
|
798
944
|
|
|
799
|
-
**Supported
|
|
945
|
+
**Supported assistant ids:** `claude`, `cursor`, `windsurf`, `vscode`, `codex`, `gemini`, `grok`, `opencode`, `kilo`, `aider`, `factory`, `trae`, `kiro`, `amp`, `kimi`, `codebuddy`, `copilot-cli`, `pi`, `devin`, `hermes`, `openclaw`, `agents`
|
|
946
|
+
|
|
947
|
+
Run `vg install --list` for the live support matrix (ids can grow over time).
|
|
800
948
|
|
|
801
949
|
| Flag | Description |
|
|
802
950
|
|------|-------------|
|
|
803
951
|
| `[tools...]` | Assistant ids to install for |
|
|
804
952
|
| `--all` | Install for every supported assistant |
|
|
953
|
+
| `--detect` | Detect assistants in use (repo footprint, home config, PATH) and install for those; with `--list`, only report what was detected |
|
|
805
954
|
| `--list` | Show the support matrix and exit |
|
|
806
955
|
| `--no-hook` | Skip the advisory nudge |
|
|
807
956
|
|
|
@@ -812,6 +961,8 @@ Idempotent and repo-local (changes can be committed and shared with your team).
|
|
|
812
961
|
| `<tools...>` | Assistant ids to remove (required) |
|
|
813
962
|
| `--purge` | Also delete the skill file |
|
|
814
963
|
|
|
964
|
+
`vg uninstall` only removes AI-assistant wiring. To remove the CLI package from the machine, use your package manager (`npm uninstall -g @vibgrate/cli`, etc.).
|
|
965
|
+
|
|
815
966
|
---
|
|
816
967
|
|
|
817
968
|
### vg lib
|
|
@@ -859,150 +1010,101 @@ vg oddities # Surprising cross-area links (architectural smells)
|
|
|
859
1010
|
|
|
860
1011
|
---
|
|
861
1012
|
|
|
862
|
-
### vg
|
|
1013
|
+
### vg llm-host
|
|
863
1014
|
|
|
864
|
-
|
|
1015
|
+
Thin **enterprise inference process** (ADR-005). Code Modes and install stay on `vg models`; this host only loads weights and decodes over a local socket when isolation is `process`.
|
|
865
1016
|
|
|
866
1017
|
```bash
|
|
867
|
-
vg
|
|
1018
|
+
vg llm-host status
|
|
1019
|
+
vg llm-host serve # listen on the default runtime socket
|
|
1020
|
+
vg llm-host serve --socket /tmp/vg-llm.sock --yes
|
|
868
1021
|
```
|
|
869
1022
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
To fetch a model through your Ollama runtime, use the `pull` subcommand. **No model is ever downloaded by default** — the download only happens when you pass `--yes`; without it, `pull` just prints the plan.
|
|
1023
|
+
Default isolation is **embedded** (same process as the agent). Set `VIBGRATE_INFERENCE_ISOLATION=process` to use the host. Management never moves into the host process.
|
|
873
1024
|
|
|
874
|
-
|
|
875
|
-
vg models pull qwen2.5-coder:7b --yes
|
|
876
|
-
```
|
|
1025
|
+
**First-party weights.** For catalogued GGUF refs (e.g. Spark’s llama.cpp fallback), `vg models install` can download into the Vibgrate weight store under the cache directory (HTTPS hosts allowlisted, including Hugging Face LFS/Xet CDNs). Catalog entries carry **sha256 pins**; a download that does not match is rejected. Ollama remains the default pull channel for Code Mode packs that list `ollama` as primary.
|
|
877
1026
|
|
|
878
|
-
|
|
879
|
-
|------|---------|-------------|
|
|
880
|
-
| `<name>` | — | Model to pull, e.g. `qwen2.5-coder:7b` |
|
|
881
|
-
| `--runtime <id>` | `ollama` | Runtime to pull with |
|
|
882
|
-
| `--yes` | — | Actually download (without this it only prints the plan) |
|
|
1027
|
+
**Foundry Local.** On Windows (or any host running Microsoft Foundry Local), use `--provider foundry-local --model <id>` with the OpenAI-compatible server (default `http://127.0.0.1:5272/v1`, override with `FOUNDRY_LOCAL_BASE_URL`). `vg models status` lists models when the server responds.
|
|
883
1028
|
|
|
884
|
-
|
|
1029
|
+
**Warm local inference (Approach B default).** Code Mode packs (channel 2026.07.3) install first-party GGUF weights when fit allows; Ollama is the fallback adapter. When a GGUF is on disk (weight store or `~/models`), `vg code` prefers embedded llama.cpp automatically. Set `VG_PREFER_OLLAMA=1` to force Ollama first. Spark constrained decoding is **fail-closed**: if the binding cannot attach a PatchIR grammar, generation errors instead of free-text (opt-in raw string GBNF only via `VG_ALLOW_GRAMMAR_STRING_FALLBACK=1`).
|
|
885
1030
|
|
|
886
|
-
|
|
1031
|
+
**Identifier enforce (before apply).** Edits and `apply_patch` that invent identifiers not present in the code graph are **blocked** (not merely annotated). Identifiers already in the target file (locals, params, existing helpers) and tokens only in comments/strings are allowed. After an approved edit, the session trie updates so new symbols become legal.
|
|
887
1032
|
|
|
888
|
-
|
|
1033
|
+
**Native logit mask (P1).** When node-llama-cpp exposes `TokenBias`, the warm host **boosts** tokens for graph identifiers and can **suppress** vocabulary tokens that are complete identifiers absent from the graph. Bias is cached per session/trie. Without `TokenBias`, generation still runs (post-scan annotation + enforce-before-apply remain).
|
|
889
1034
|
|
|
890
|
-
|
|
891
|
-
vg code "add a --timeout flag to the scan command"
|
|
892
|
-
```
|
|
1035
|
+
**Dynamic open-identifier sampler (P2).** When enabled (`VG_LLM_ON_TOKEN=1` or `VG_LLM_CUSTOM_SAMPLER=1`, or a binding that declares the hook), the host tracks whether generation is inside a code identifier and rejects tokens that invent graph-unknown names mid-decode. Composed with grammar + TokenBias on the same `prompt()` call.
|
|
893
1036
|
|
|
894
|
-
**
|
|
1037
|
+
**Warm KV prefix reuse (P1/P2).** Prompt segments are content-hashed; after the first turn, stable system/capsule blocks are warm. A multi-turn **cursor** skips already-evaluated leading blocks and only re-evaluates the delta when the binding supports evaluate-without-generate, so multi-turn TTFT does not re-prefill the full capsule every step.
|
|
895
1038
|
|
|
896
|
-
**
|
|
1039
|
+
**Speculative drafts (P2).** Graph-verbatim draft candidates are **ranked** against the user ask; the host tries accept in score order (evaluate-without-generate when available).
|
|
897
1040
|
|
|
898
|
-
|
|
1041
|
+
**Shared host in vgd.** The daemon protocol includes `host-status`, `host-load`, `host-unload`, and `host-generate` so a long-lived process can keep a warm model for CLI and IDE clients (same session pool as embedded). Clients may pass a **client id** on load so unload is **refcounted** — CLI and VS Code can share one warm model without the first exit killing the session.
|
|
899
1042
|
|
|
900
|
-
**
|
|
1043
|
+
**Hardware default mode.** `vg models mode --apply-recommend` pins the Code Mode recommended from free RAM/VRAM and repo size when no default is set. `vg doctor` surfaces the same recommendation under `localInference`.
|
|
901
1044
|
|
|
902
|
-
|
|
903
|
-
# one-time: a local coding model (nothing is downloaded by default)
|
|
904
|
-
vg models pull qwen2.5-coder:7b --yes
|
|
1045
|
+
**Coding metrics (release).** `vg models coding-metrics` builds a `coding-metrics/0` report: host-bench arms + gates + offline Fusion FCS/ZNS trajectory pack. Default host mode is **simulate** (no GPU). CI runs simulate+gate on PRs; CLI publish opens a website data PR under `data/benchmarks-coding/` (human review before public claims), same pattern as CLI release benchmarks.
|
|
905
1046
|
|
|
906
|
-
|
|
907
|
-
vg code
|
|
908
|
-
```
|
|
1047
|
+
**Host bench (P3).** `vg models host-bench` runs Approach B measurement arms (Ollama baseline, embedded warm, grammar, identifier enforce, TokenBias, dynamic sampler, KV delta). Default **simulate** exercises the warm host without a GPU; `--mock` is registry shells only; `--live --model-path <gguf>` is operator hardware. Add `--gate` to evaluate release gates (exit code **2** on hard failure). Use `--json` for CI artifacts.
|
|
909
1048
|
|
|
910
|
-
|
|
911
|
-
VG Code · graph-grounded coding · v2026.x
|
|
912
|
-
|
|
913
|
-
✔ Code map built
|
|
914
|
-
✔ Model catalog loaded
|
|
915
|
-
? Where should the model run?
|
|
916
|
-
❯ Local model (on your machine) 1 found
|
|
917
|
-
Anthropic (Claude) via OpenRouter
|
|
918
|
-
…
|
|
919
|
-
✔ qwen2.5-coder:7b
|
|
920
|
-
◆ Ready — ollama/qwen2.5-coder:7b · graph 48213. Describe a task; empty line to exit.
|
|
921
|
-
|
|
922
|
-
code › add a --timeout flag to the scan command and use it
|
|
923
|
-
|
|
924
|
-
→ search_code(query: --timeout flag scan command)
|
|
925
|
-
scanCommand (function) src/commands/scan.ts:12
|
|
926
|
-
→ read_file(path: src/commands/scan.ts)
|
|
927
|
-
src/commands/scan.ts (40 lines): …
|
|
928
|
-
→ graph_impact(symbol: runScan)
|
|
929
|
-
3 symbol(s) depend on runScan: …
|
|
930
|
-
I'll add the option and thread it through.
|
|
931
|
-
→ edit_file(path: src/commands/scan.ts, …)
|
|
932
|
-
--- a/src/commands/scan.ts
|
|
933
|
-
+++ b/src/commands/scan.ts
|
|
934
|
-
@@ …
|
|
935
|
-
+ .option('--timeout <ms>', 'abort the scan after <ms> milliseconds')
|
|
936
|
-
? Apply edit to src/commands/scan.ts? [Y/n] y
|
|
937
|
-
✔ edited src/commands/scan.ts
|
|
938
|
-
→ run_command(command: npm test -- scan)
|
|
939
|
-
? Run `npm test -- scan`? [y/N] y
|
|
940
|
-
✔ exit 0 … 12 passing
|
|
941
|
-
→ finish(summary: added a --timeout flag to scan and covered it with tests)
|
|
942
|
-
|
|
943
|
-
✔ added a --timeout flag to scan and covered it with tests
|
|
944
|
-
+6 -1 across 1 file(s) · via ollama/qwen2.5-coder:7b
|
|
945
|
-
```
|
|
946
|
-
|
|
947
|
-
Run it non-interactively with `vg code "add a --timeout flag to scan" --provider ollama --model qwen2.5-coder:7b --auto`, or against a hosted model with `--provider openrouter --model anthropic/claude-3.5-sonnet` (set `OPENROUTER_API_KEY`).
|
|
948
|
-
|
|
949
|
-
**In a session** you can type slash-commands: `/undo` reverts the last change, `/diff` shows it, `/model` switches model, `/cost` shows the running token/$ cost, `/help` lists them, `/exit` quits.
|
|
950
|
-
|
|
951
|
-
**More session controls:**
|
|
1049
|
+
---
|
|
952
1050
|
|
|
953
|
-
|
|
954
|
-
- `--verify [command]` runs your tests after the agent finishes and, if they fail, feeds the failures back so it fixes them (uses the `testCommand` from config if you don't name one).
|
|
955
|
-
- `--continue` resumes your most recent session — it recaps what was already done for the model and restores `/undo`.
|
|
956
|
-
- A live **token/$ meter** shows after each task and via `/cost` (cost is shown when the model's price is known; local models are free).
|
|
957
|
-
- **External MCP tools:** list servers under `mcpServers` in `.vibgrate/code.json` and the agent can call their tools (namespaced `mcp__<server>__<tool>`); read-only tools run freely, anything else is approved like a built-in mutating tool. VG Code also **adopts the standard MCP config files** already in your repo — `.mcp.json` (Claude Code), `.cursor/mcp.json` (Cursor), and `.vscode/mcp.json` (VS Code) — and merges them with your `.vibgrate/code.json` (which wins on any name clash), so servers you've already configured for another tool work here with no extra setup. Both local (`command`) and remote (`url`) servers are supported.
|
|
1051
|
+
### vg models
|
|
958
1052
|
|
|
959
|
-
**
|
|
1053
|
+
**Code Modes** (Spark / Flow / Forge) for VG Code, plus the **local model fleet** (Ollama, LM Studio, and on-disk `gguf` files). The default view is outcome-oriented: which mode fits this machine and repo, which pack backs it, and whether it is ready.
|
|
960
1054
|
|
|
961
|
-
**
|
|
1055
|
+
**Named install commands run by default** (same polarity as the rest of `vg`: the command does what it says). Pass `--dry-run` to print the plan only. Status/resolve never download. Destructive `rm` confirms on a TTY; non-interactive remove needs `--yes`.
|
|
962
1056
|
|
|
963
|
-
**
|
|
1057
|
+
`install` / `pull` install the **full provider dependency closure** for the pack (e.g. runtime npm deps for llama-cpp, then weight download for Ollama). Third-party apps such as Ollama itself are never auto-installed — install them separately if the plan lists them as blocked.
|
|
964
1058
|
|
|
965
|
-
```
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1059
|
+
```bash
|
|
1060
|
+
vg models # Code Modes status + fleet summary
|
|
1061
|
+
vg models --raw # local models only
|
|
1062
|
+
vg models status
|
|
1063
|
+
vg models mode [spark|flow|forge]
|
|
1064
|
+
vg models resolve [mode] # pack + model + fit (no download)
|
|
1065
|
+
vg models install [mode] # install the pack (add --dry-run to preview)
|
|
1066
|
+
vg models pin <packId>
|
|
1067
|
+
vg models unpin <mode>
|
|
1068
|
+
vg models packs
|
|
1069
|
+
vg models pull <name> # download (add --dry-run to preview)
|
|
1070
|
+
vg models uninstall <name> # uninstall (TTY confirm; --yes for CI; --dry-run to preview)
|
|
1071
|
+
vg models host-bench # Approach B measurement arms (default: simulate, no GPU)
|
|
1072
|
+
vg models coding-metrics # host-bench + Fusion FCS/ZNS report (coding-metrics/0)
|
|
1073
|
+
vg models catalog
|
|
977
1074
|
```
|
|
978
1075
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1076
|
+
| Mode | Intent |
|
|
1077
|
+
|------|--------|
|
|
1078
|
+
| **Spark** | Fast, small footprint — quick edits and tight memory |
|
|
1079
|
+
| **Flow** | Balanced default for day-to-day coding |
|
|
1080
|
+
| **Forge** | Heavier pack when you have headroom and want more capacity |
|
|
1081
|
+
|
|
1082
|
+
| Subcommand / flag | Description |
|
|
1083
|
+
|-------------------|-------------|
|
|
1084
|
+
| `--raw` | Skip Code Modes; list discovered local models only |
|
|
1085
|
+
| `mode [spark\|flow\|forge]` | Show or set the default Code Mode (`--auto` clears a fixed default) |
|
|
1086
|
+
| `resolve [mode]` | Resolve pack + underlying model + fit without downloading |
|
|
1087
|
+
| `install [mode]` | Resolve and install the pack (`--dry-run` for plan only) |
|
|
1088
|
+
| `pin <packId>` / `unpin <mode>` | Pin or clear a reproducible pack (e.g. `flow@2026.07.1`) |
|
|
1089
|
+
| `packs` | List qualified Code Mode packs |
|
|
1090
|
+
| `pull <name>` | Download via local runtime (default Ollama; `--dry-run` for plan only) |
|
|
1091
|
+
| `uninstall <name>` | Uninstall a local model (`--dry-run` plan; TTY confirm or `--yes`) |
|
|
1092
|
+
| `host-bench` | Approach B measurement arms (`--simulate` default, `--mock`, `--live --model-path`, `--gate`) |
|
|
1093
|
+
| `coding-metrics` | Unified host-bench + Fusion FCS/ZNS report (`--out`, `--gate`, `--version`); publish path for release |
|
|
1094
|
+
| `catalog` | Live hosted model catalog (cached; not used under `--local`) |
|
|
1095
|
+
| `--json` | Machine-readable JSON on stdout |
|
|
982
1096
|
|
|
983
1097
|
```bash
|
|
984
|
-
vg
|
|
1098
|
+
vg models pull qwen2.5-coder:7b
|
|
1099
|
+
vg models pull qwen2.5-coder:7b --dry-run # plan only
|
|
985
1100
|
```
|
|
986
1101
|
|
|
987
|
-
Pick a backend with `--provider` and `--model`. No model is bundled, and nothing is installed until you first use a backend that needs it:
|
|
988
|
-
|
|
989
|
-
- **Local** — `--provider ollama` or `--provider lmstudio` (or `--local` to force on-device only, no network).
|
|
990
|
-
- **Hosted** — any OpenAI-compatible endpoint: `--provider openrouter` / `litellm` / `openai` / `together`. API keys are read from the environment only (e.g. `OPENROUTER_API_KEY`), never passed as flags.
|
|
991
|
-
|
|
992
|
-
With no `--provider`, `vg code` chooses from what you have already configured (a hosted key, or a locally-pulled model) and never dials a cloud endpoint you didn't set up.
|
|
993
|
-
|
|
994
1102
|
| Flag | Default | Description |
|
|
995
1103
|
|------|---------|-------------|
|
|
996
|
-
| `<
|
|
997
|
-
| `--
|
|
998
|
-
| `--
|
|
999
|
-
| `--
|
|
1000
|
-
| `--budget <n>` | `3000` | Approx context token budget |
|
|
1001
|
-
| `--apply` | — | Write the change (still requires `--yes` or a confirmation) |
|
|
1002
|
-
| `--yes` | — | Consent to write, or to a first-use package install, non-interactively |
|
|
1003
|
-
| `--local` | — | On-device backends only; never touch the network |
|
|
1004
|
-
|
|
1005
|
-
Add `--json` for the full machine-readable result (proposed changes, diffs, and the verification summary), or `--out <file>` to write it for CI. Requires a map — run `vg` first if you have not built one.
|
|
1104
|
+
| `<name>` | — | Model to pull, e.g. `qwen2.5-coder:7b` |
|
|
1105
|
+
| `--runtime <id>` | `ollama` | Runtime to pull with |
|
|
1106
|
+
| `--dry-run` | — | Print the plan only; do not download or uninstall |
|
|
1107
|
+
| `--yes` | — | Skip interactive confirms (required for non-interactive `uninstall`) |
|
|
1006
1108
|
|
|
1007
1109
|
---
|
|
1008
1110
|
|
|
@@ -1068,7 +1170,7 @@ Via stdio (default), your AI assistant spawns the server. Via `--http`, it runs
|
|
|
1068
1170
|
|
|
1069
1171
|
**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.
|
|
1070
1172
|
|
|
1071
|
-
**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
|
|
1173
|
+
**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: freshness is checked exactly when it matters — at query time. (`vg daemon` is a separate optional process for multi-workspace IDE/agent sessions; `vg serve` does not require it.) 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.
|
|
1072
1174
|
|
|
1073
1175
|
The server exposes read-only tools your assistant can call over the code map and dependency data, including:
|
|
1074
1176
|
|
|
@@ -1185,6 +1287,126 @@ Add `--json` for machine-readable output.
|
|
|
1185
1287
|
|
|
1186
1288
|
---
|
|
1187
1289
|
|
|
1290
|
+
## Diagnostics, IDE & runtime
|
|
1291
|
+
|
|
1292
|
+
Setup health, IDE language server, local workspace daemon, and context-policy pins.
|
|
1293
|
+
|
|
1294
|
+
**Typical path:** `vg doctor` → `vg lsp` → `vg daemon`
|
|
1295
|
+
|
|
1296
|
+
### vg daemon
|
|
1297
|
+
|
|
1298
|
+
Local workspace daemon for multi-root graph sessions used by IDE extensions and coding agents. Tracks registered repository roots, can load a built map into an in-memory active graph, and answers structural queries and impact over a local socket. Does not rewrite your source tree.
|
|
1299
|
+
|
|
1300
|
+
Most developers never need this directly — Vibgrate for VS Code and `vg code` attach when needed. Use the CLI for explicit control, multi-root federation, or scripting.
|
|
1301
|
+
|
|
1302
|
+
```bash
|
|
1303
|
+
vg daemon status
|
|
1304
|
+
vg daemon ensure
|
|
1305
|
+
vg daemon start
|
|
1306
|
+
vg daemon register
|
|
1307
|
+
vg daemon list
|
|
1308
|
+
vg daemon federation
|
|
1309
|
+
vg daemon publish
|
|
1310
|
+
vg daemon query "<text>"
|
|
1311
|
+
vg daemon impact <symbol>
|
|
1312
|
+
vg daemon graphs
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
| Subcommand | Description |
|
|
1316
|
+
|------------|-------------|
|
|
1317
|
+
| `status` | Whether the daemon is running and how many workspaces it tracks |
|
|
1318
|
+
| `start` | Run in the foreground (Ctrl-C to stop) |
|
|
1319
|
+
| `ensure` | Start in the background if not already running (idempotent; for hosts and agents) |
|
|
1320
|
+
| `register [root]` | Register the current (or given) repository with a running daemon |
|
|
1321
|
+
| `list` | List registered workspaces |
|
|
1322
|
+
| `federation [root]` | Register a multi-root federation from `.vibgrate/federation.json` (or primary cwd) |
|
|
1323
|
+
| `publish [root]` | Load the workspace code map into the daemon active graph (run `vg build` first) |
|
|
1324
|
+
| `query <query...>` | Lexical/structural query against the active graph |
|
|
1325
|
+
| `impact <symbol>` | Blast radius for a symbol in the active graph |
|
|
1326
|
+
| `graphs` | List multi-branch graph slots currently resident |
|
|
1327
|
+
|
|
1328
|
+
| Flag | Description |
|
|
1329
|
+
|------|-------------|
|
|
1330
|
+
| `--socket <path>` | Override the local socket path |
|
|
1331
|
+
| `--repository-id <id>` | On `query` / `impact` / `graphs`: target a workspace id from `vg daemon list` |
|
|
1332
|
+
| `--git-ref <ref>` | On `publish` / `query` / `impact`: branch or SHA |
|
|
1333
|
+
| `--limit <n>` | On `query`: max matches (default 12) |
|
|
1334
|
+
| `--depth <n>` | On `impact`: max dependency depth (default 4) |
|
|
1335
|
+
| `--json` | Machine-readable JSON on stdout |
|
|
1336
|
+
|
|
1337
|
+
Typical host flow:
|
|
1338
|
+
|
|
1339
|
+
```bash
|
|
1340
|
+
vg build
|
|
1341
|
+
vg daemon ensure
|
|
1342
|
+
vg daemon publish
|
|
1343
|
+
vg daemon query "payment service"
|
|
1344
|
+
```
|
|
1345
|
+
|
|
1346
|
+
---
|
|
1347
|
+
|
|
1348
|
+
### vg doctor
|
|
1349
|
+
|
|
1350
|
+
One read-only diagnostic pass over setup: which config file won, which credential source won (secrets never printed), whether a code map exists and how fresh it is, hosted catalog reachability, what `vg install` would register as the MCP launch, telemetry opt-outs, and **local inference** (Code Mode recommendation from free RAM/VRAM, weight catalog pin status, warm host pool size, isolation / sampler env). Prints state; changes nothing.
|
|
1351
|
+
|
|
1352
|
+
```bash
|
|
1353
|
+
vg doctor
|
|
1354
|
+
vg doctor --json
|
|
1355
|
+
vg doctor --local
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
| Flag | Description |
|
|
1359
|
+
|------|-------------|
|
|
1360
|
+
| `--json` | Machine-readable JSON on stdout |
|
|
1361
|
+
| `--local` | Skip the hosted reachability probe |
|
|
1362
|
+
| `-C, --cwd <dir>` | Run as if started in that directory |
|
|
1363
|
+
|
|
1364
|
+
---
|
|
1365
|
+
|
|
1366
|
+
### vg lsp
|
|
1367
|
+
|
|
1368
|
+
Start the Vibgrate language server over **stdio** — the shared engine behind **Vibgrate for VS Code** and other thin IDE clients. Editors spawn this; humans rarely run it by hand.
|
|
1369
|
+
|
|
1370
|
+
```bash
|
|
1371
|
+
vg lsp
|
|
1372
|
+
vg lsp --diagnostics
|
|
1373
|
+
vg lsp --no-graph
|
|
1374
|
+
vg lsp --no-semantic
|
|
1375
|
+
vg lsp --local
|
|
1376
|
+
```
|
|
1377
|
+
|
|
1378
|
+
| Flag | Description |
|
|
1379
|
+
|------|-------------|
|
|
1380
|
+
| `--diagnostics` | Also publish Problems-panel diagnostics (EOL runtime, unmaintained packages, license change). **Off by default** — drift is not a defect, and the Problems panel is not filled by default. |
|
|
1381
|
+
| `--no-graph` | Skip the local code graph entirely: no background build; graph queries report it as turned off |
|
|
1382
|
+
| `--no-semantic` | Never use semantic search for graph queries (lexical only; embedding model is not downloaded) |
|
|
1383
|
+
| `--local` | Never touch the network (air-gapped editor sessions) |
|
|
1384
|
+
|
|
1385
|
+
The process owns stdin/stdout until the client sends `shutdown` + `exit`. Speaks standard LSP plus a custom `vibgrate/score` notification carrying the DriftScore and its **band** (never a colour) so clients can theme correctly.
|
|
1386
|
+
|
|
1387
|
+
---
|
|
1388
|
+
|
|
1389
|
+
### vg policy
|
|
1390
|
+
|
|
1391
|
+
Show the production **context-policy** pin used by VG Code ranking, and verify a signed `context-policy-patch/0` JSON file before any release that would bump it. Learning never mutates production policy from a single task.
|
|
1392
|
+
|
|
1393
|
+
This is not the hosted workspace policy UI in Vibgrate Cloud (banned packages, drift budgets). For dependency bans in CI, use `vg drift --fail-on standards` with a committed standards file.
|
|
1394
|
+
|
|
1395
|
+
```bash
|
|
1396
|
+
vg policy
|
|
1397
|
+
vg policy --json
|
|
1398
|
+
vg policy verify ./context-policy-patch.json
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
| Subcommand | Description |
|
|
1402
|
+
|------------|-------------|
|
|
1403
|
+
| *(default)* | Print production pin and ranking version |
|
|
1404
|
+
| `verify <file>` | Verify a `context-policy-patch/0` JSON file (hash + optional signature + production gate) |
|
|
1405
|
+
|
|
1406
|
+
Exit non-zero from `verify` when the production gate is not ready (so CI can block a premature bump).
|
|
1407
|
+
|
|
1408
|
+
---
|
|
1409
|
+
|
|
1188
1410
|
## Drift Baselines & Fitness Functions
|
|
1189
1411
|
|
|
1190
1412
|
Vibgrate stores scan state under `.vibgrate/`:
|