Overview
vg ask retrieves the most relevant code context for a natural-language question using a hybrid of lexical, structural, and semantic (embedding-based) search. The 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.
Usage
vg ask "<question>"
| Flag | Default | Description |
|---|---|---|
<question...> | — | Your question (bare quoted string also works: vg "…") |
-b, --budget <n> | 2000 | Approx token budget for returned context |
--no-semantic | — | Lexical only; skip the local embedding pass |
Examples
vg ask "how is the payment flow structured"
vg ask "where is rate limiting applied" --budget 4000
vg ask "authentication middleware" --no-semantic