Skip to main content
Commands

vg ask

Ask the code map a question using hybrid lexical + structural + semantic search. Returns a budget-bounded context block ready to paste into any AI assistant — fully offline after first use.

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>"
FlagDefaultDescription
<question...>Your question (bare quoted string also works: vg "…")
-b, --budget <n>2000Approx token budget for returned context
--no-semanticLexical 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

Related

  • vg embed — Precompute embeddings for instant ask
  • vg serve — Serve context to AI assistants via MCP

Example use cases

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

vg ask "how do the apps and shared packages fit together"

Related Documentation