VS Code extension

Install from the Visual Studio Marketplace — extension id yeahbah.vscode-efvibe (v0.6.3). Works in VS Code and Cursor. Source: vscode-extension/.

Quick install: Extensions (Cmd+Shift+X / Ctrl+Shift+X) → search efvibe → Install My EF Vibe. Or: code --install-extension yeahbah.vscode-efvibe

Step-by-step: set up your VS Code workflow

This walkthrough takes you from a clean machine to running LINQ against your real DbContext, scanning the repo, and reviewing SQL — all inside VS Code.

  1. Install prerequisites

    You need the .NET SDK and the efvibe CLI (the extension shells out to it).

    • .NET SDK — same major version as your EF project (8, 9, or 10).
    • efvibe CLI — install from NuGet or build from the my-ef-vibe repo:
      dotnet tool install -g efvibe
      # or, for latest features:
      dotnet build src/MyEfVibe/MyEfVibe.csproj -c Release
    Terminal showing dotnet --version and efvibe --about-json succeeding
    Confirm the CLI runs before installing the extension.
  2. Install the VS Code extension

    Recommended: install from the Visual Studio Marketplace.

    In VS Code or Cursor:

    1. Open Extensions (Cmd+Shift+X / Ctrl+Shift+X).
    2. Search for efvibe (display name My EF Vibe, publisher yeahbah).
    3. Click Install and reload the window if prompted.

    From a terminal:

    code --install-extension yeahbah.vscode-efvibe

    Alternative: install a .vsix from GitHub Releases via Install from VSIX… (pre-release or offline installs). See INSTALL.md.

    Marketplace install — fastest path for most teams.
    Marketplace install — fastest path for most teams.
  3. Open your EF solution workspace

    Use File → Open Folder on the repository root (the folder that contains your .sln or the project with your DbContext). The extension reads efvibe.* settings from .vscode/settings.json or user settings.

    Explorer showing solution layout with Persistence and API projects visible
    Open the whole solution, not a single file.
  4. Configure workspace settings

    Create or edit .vscode/settings.json. Point efvibe.project at the .csproj that contains your DbContext, and set efvibe.context when you have more than one context.

    {
      "efvibe.project": "${workspaceFolder}/src/MyApp.Persistence/MyApp.Persistence.csproj",
      "efvibe.startupProject": "${workspaceFolder}/src/MyApp.Api/MyApp.Api.csproj",
      "efvibe.context": "AppDbContext",
      "efvibe.dotnetFramework": "net8.0",
      "efvibe.dbLog": true,
      "efvibe.useDaemon": true,
      "efvibe.resultDestination": "panel",
      "efvibe.scan.openReviewOnScan": true
    }

    Optional: set efvibe.toolPath to a local myefvibe binary if you are developing the CLI from the same repo.

    VS Code settings.json with efvibe.project, startupProject, and context configured
    Workspace settings drive every command and the Session sidebar.
  5. Verify prerequisites

    Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and run efvibe: Check Prerequisites. The output channel should report dotnet and efvibe on PATH with a version string.

    Then run efvibe: Refresh Status — the status bar should show your DbContext and provider.

    efvibe output channel showing successful prerequisite check and status bar with DbContext
    Fix PATH or efvibe.toolPath before running queries.
  6. Use the efvibe Session sidebar

    In the Explorer activity bar, open efvibe Session. At the top you will see your DbContext and DbSets (from efvibe --tables-json). Below that are session folders (scan, per-context exports) once you have run a scan or REPL query.

    Toolbar actions (left to right):

    • Scan Deep — workspace scan with SQL translation
    • Run Query — opens the result panel (pick a DbSet if none selected)
    • Start REPL — integrated terminal running efvibe
    • Refresh — reload model and session files

    Right-click a DbSet for Run Query, Describe, Go To Definition, or Run Count.

    efvibe Session sidebar showing DbContext tree, toolbar, and scan folder
    The Session view replaces a separate “EF Model” panel — model and artifacts live together.
  7. Run a LINQ query from the editor

    Typical loop for debugging repository code:

    1. Open a C# file with a LINQ query (handler or repository).
    2. Select the full expression (including await, DbContext, and parameters if needed).
    3. Press Shift+Alt+E or run efvibe: Run Selection.
    4. Or click Run with efvibe CodeLens on the first line of the query — it runs the whole statement.

    With efvibe.useDaemon (default true), the first run starts efvibe serve and builds your project; later runs reuse the warm DbContext. Edit stubbed parameter values in the panel and press Run again.

    VS Code with LINQ selection, result panel, and captured SQL
    Run Selection — result rows and SQL beside your editor (vscode1.png).
    Run Selection — result rows and SQL beside your editor
    Optional: capture CodeLens on a repository handler for the docs.
  8. Scan the workspace (deep)

    From the Session toolbar, click Scan Deep, or run efvibe: Scan Workspace (Deep) from the Command Palette. Deep scan requires a resolvable DbContext (set efvibe.context when you have several).

    The CLI builds your EF project, walks sources, and attempts ToQueryString() per call site. Progress appears in the notification area; artifacts are written under ~/.efvibe/<Project>/<DbContext>/.

    Scan Progress
    First deep scan may take a minute while the project builds.
  9. Review findings

    When efvibe.scan.openReviewOnScan is true (default), Scan Review opens automatically — one finding per page with rule, message, code, translated SQL, and plan (when available).

    • ← / → — previous and next finding
    • Location — jump to file and line
    • Note and Dismiss — persisted for the next scan when dismissals are respected
    • 📋 Copy on code, SQL, and plan blocks

    Re-open anytime with efvibe: Open Scan Review.

    Scan Review — one finding per page with rule, message, code, translated SQL, and plan
    Scan Review shares dismissal/note JSON with the REPL :dismiss / :note commands.
  10. Start the REPL (optional)

    For exploratory work, click Start REPL in the Session toolbar or run efvibe: Start REPL. The integrated terminal runs efvibe with your workspace flags.

    Use efvibe: Send to REPL (Cmd+Shift+Enter / Ctrl+Shift+Enter in C#) to push the current selection as a one-line snippet. The REPL is separate from efvibe serve used by Run Selection.

    Integrated terminal named “efvibe” with REPL banner and a sample <code>db.Products.Count();</code>
    Use the REPL for ad-hoc exploration; use Run Selection when you want the JSON panel and SQL split view.
Daily workflow: Pull latest → Scan Deep from Session → triage in Scan Review → Run Selection on hot paths to confirm SQL → Run :plan in the result panel when you need EXPLAIN.

Install (reference)

Marketplace: yeahbah.vscode-efvibe. VSIX / contributors: INSTALL.md.

# CLI (required by the extension)
dotnet tool install -g efvibe

# VS Code extension (Marketplace)
code --install-extension yeahbah.vscode-efvibe

Fast Run Selection (efvibe serve)

By default, Run Selection talks to a long-running efvibe serve process instead of starting a new CLI for every query. The EF project is built once; the same DbContext stays loaded — much faster for iterative work.

Set efvibe.useDaemon to false to force one-shot efvibe -e per run. Point efvibe.toolPath at a local myefvibe build if the global tool does not yet include serve.

Details: efvibe daemon design doc.

efvibe Session sidebar

Single Explorer view combining the EF model tree and on-disk session artifacts (scan JSON, exports, notes). Use the toolbar for Scan Deep, Run Query, Start REPL, and Refresh.

Result panel

With efvibe.resultDestination set to panel (default):

Scan Review (carousel)

efvibe: Scan Workspace runs efvibe scan lite; Scan Deep runs efvibe scan deep with SQL translation. Both can open the review tab:

Commands

Settings

{
  "efvibe.project": "${workspaceFolder}/src/MyApp.Persistence/MyApp.Persistence.csproj",
  "efvibe.startupProject": "${workspaceFolder}/src/MyApp.Api/MyApp.Api.csproj",
  "efvibe.context": "AppDbContext",
  "efvibe.dbLog": true,
  "efvibe.useDaemon": true,
  "efvibe.resultDestination": "panel",
  "efvibe.toolPath": "",
  "efvibe.scan.mode": "lite",
  "efvibe.scan.openReviewOnScan": true,
  "efvibe.scan.problemsPanel": false
}
SettingDescription
efvibe.useDaemonWhen true (default), Run Selection uses efvibe serve
efvibe.resultDestinationpanel, output, or terminal
efvibe.scan.modeDefault for Scan Workspacelite or deep
efvibe.scan.openReviewOnScanOpen Scan Review after scan (default true)
efvibe.toolPathPath to myefvibe / efvibe for latest CLI features

Repository snippets

Select handler LINQ (with await, DbContext, parameters) and run — the CLI adapts the snippet before evaluation. Edit stubbed values in the panel (e.g. replace Guid.Empty with a real id) and re-run. See repository snippets for limits.