@vibgrate/cli 2026.708.3 → 2026.709.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 CHANGED
@@ -498,6 +498,7 @@ Vibgrate includes a full code graph engine — call trees, impact surfaces, sema
498
498
  | `--json` | Machine-readable JSON output |
499
499
  | `--quiet` | Suppress non-error output |
500
500
  | `--local` | Offline mode — no network calls or downloads |
501
+ | `--client <name>` | Identify the AI client (e.g. `claude`) so navigation calls are counted in `vg savings` |
501
502
  | `--deep` | Enable deep derivation (for `vg facts`, `vg build`) |
502
503
  | `--no-cache` | Skip and clear cached data |
503
504
 
@@ -557,6 +558,8 @@ vg ask "<question>"
557
558
 
558
559
  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
560
 
561
+ > **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`.
562
+
560
563
  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
564
 
562
565
  | Flag | Default | Description |
@@ -683,11 +686,16 @@ vg serve
683
686
  | `--port <n>` | `7437` | Port for `--http` |
684
687
  | `--host <h>` | `127.0.0.1` | Host for `--http` |
685
688
  | `--savings` | — | Record local, counts-only usage savings (opt-in) |
689
+ | `--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
690
  | `--dedup` | — | Collapse a node's heavy relation lists on repeat reads within a session, to save tokens (opt-in) |
687
691
  | `--no-refresh` | — | Serve the map as built; skip the auto-rebuild when files change |
688
692
 
689
693
  Via stdio (default), your AI assistant spawns the server. Via `--http`, it runs as a local HTTP endpoint for browser or shared access.
690
694
 
695
+ **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`.
696
+
697
+ **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.
698
+
691
699
  **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
700
 
693
701
  The server exposes read-only tools your assistant can call over the code map and dependency data, including:
@@ -1326,7 +1334,7 @@ import type {
1326
1334
 
1327
1335
  ## Requirements
1328
1336
 
1329
- - **Node.js** >= 22.0.0
1337
+ - **Node.js** >= 20.0.0
1330
1338
  - Works on macOS, Linux, and Windows
1331
1339
 
1332
1340
  ---
@@ -0,0 +1,6 @@
1
+ export { baselineCommand, runBaseline } from './chunk-IRZCYPFC.js';
2
+ import './chunk-PXZ5KPVN.js';
3
+ import './chunk-RXP66R2E.js';
4
+ import './chunk-GI6W53LM.js';
5
+ //# sourceMappingURL=baseline-7AFTGG3I.js.map
6
+ //# sourceMappingURL=baseline-7AFTGG3I.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"baseline-AUC3HAXW.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"baseline-7AFTGG3I.js"}