efvibe 0.5.5

dotnet tool install --global efvibe --version 0.5.5
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local efvibe --version 0.5.5
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=efvibe&version=0.5.5
                    
nuke :add-package efvibe --version 0.5.5
                    

MyEfVibe

Website: myefvibe.com · Docs: myefvibe.com/docs · GitHub: yeahbah/my-ef-vibe · NuGet: efvibe

Interactive CLI to run LINQ against an external .NET project's EF Core DbContext.

Point efvibe at your solution, get a REPL with db (your DbContext) in scope, see translated SQL, execution metrics, and helpers like :tables, :describe, :dbinfo, :plan, :stats, :scan lite, and :scan deep.

Requires .NET 8 SDK or newer (tool ships net8.0, net9.0, and net10.0 assets).

Screenshots

Startup banner, session panel, and a LINQ query with translated SQL, results, and :plan:

efvibe REPL with query, SQL, results, and query plan

:tables — DbSets and entity types:

efvibe :tables

:dbinfo — provider, connection, and startup project details:

efvibe :dbinfo

:scan deep — review queue with translated SQL and EXPLAIN query plans per call site (saved to myefvibe-scan-deep.json):

efvibe 😒can deep with translated SQL and query plan

VS Code extension (v0.5.0) — install from the Marketplace (search efvibe). Run Selection via efvibe serve, result panel, efvibe Session sidebar, Scan Review carousel (vscode-extension/README.md · docs on myefvibe.com):

efvibe VS Code extension: Run Selection with result and SQL

efvibe VS Code extension: Scan Review carousel

Install

From NuGet (when published):

dotnet tool install --global efvibe

From a local build:

dotnet pack src/MyEfVibe/MyEfVibe.csproj -c Release -o ./artifacts
dotnet tool install --global efvibe --add-source ./artifacts

Local tool (per repository)

Restore the pinned tool after cloning:

dotnet tool restore
efvibe -w ./myefvibe-session

Update .config/dotnet-tools.json when releasing a new version.

Quick start

Run from your solution root (where .csproj files live):

efvibe

Session artifacts default to ~/.efvibe/<ProjectName>/<DbContextName>/ (macOS/Linux) or %APPDATA%\efvibe\<ProjectName>\<DbContextName>\ (Windows). Override the root with -w:

efvibe -w ./myefvibe-session
# → ./myefvibe-session/AdventureWorks.Infrastructure.Persistence/AdventureWorksDbContext/
Flag Role
-w, --workspace Workspace root<ProjectName>/<DbContextName>/ under this path (optional; default ~/.efvibe or %APPDATA%\efvibe)
-p, --project EF project to build — the .csproj that contains (or references) the DbContext
-s, --startup-project Config project — user secrets and appsettings (like dotnet ef --startup-project)

If -p is omitted, projects are discovered under the current directory (not -w). If -s / --startup-project is omitted, efvibe infers a project that references the EF project and has user secrets or appsettings.

In the REPL, query with db (for example db.Products.Take(5).ToList();). End input with ; to run. Use :help for all commands, :about for version and session info.

Explore the model

Command Purpose
:tables List DbSets and entity types
:describe Product Entity properties (types, PK/FK, columns)
:dbinfo Provider, connection string, server version
:tracked Change tracker summary
:scan lite Static LINQ scan; step through findings in a review queue
:scan deep Lite rules + ToQueryString() SQL + EXPLAIN per call site (live db; requires connection)

One-shot:

efvibe -w ./myefvibe-session -e "db.Products.Count();"

DbContext in persistence, connection string on the API:

efvibe -w ./myefvibe-session \
  -p ./apps/api-dotnet/src/AdventureWorks.Infrastructure.Persistence/AdventureWorks.Infrastructure.Persistence.csproj \
  -s ./apps/api-dotnet/src/AdventureWorks.API/AdventureWorks.API.csproj \
  -c AdventureWorksDbContext

-s / --startup-project is often optional when the API references the persistence project.

Local development without installing the tool:

dotnet run --project src/MyEfVibe/MyEfVibe.csproj -f net10.0 -- \
  -w ./myefvibe-session \
  -p ./apps/api-dotnet/src/AdventureWorks.Infrastructure.Persistence/AdventureWorks.Infrastructure.Persistence.csproj \
  -s ./apps/api-dotnet/src/AdventureWorks.API/AdventureWorks.API.csproj \
  -c AdventureWorksDbContext

macOS and SQL Server

SQL Server is not Windows-only for development. On macOS (and Linux), run SQL Server in Docker and connect with --provider sqlserver. The tool loads the Unix Microsoft.Data.SqlClient runtime from the workspace .deps.json (not the portable lib/ assembly).

Typical issues:

Symptom Cause / fix
The target principal name is incorrect / Cannot generate SSPI context Wrong config source — use -s for the API (not the persistence library). macOS needs SQL auth in user secrets/appsettings, not Windows integrated security.
SqlClient is not supported on this platform Old efvibe build; use a current build with RID-aware dependency loading.
Unable to load shared library 'e_sqlite3' / libe_sqlite3.dylib (no such file) SQLite native runtime not in the EF library bin/; use a current efvibe build (loads runtimes/osx-*/native/libe_sqlite3.dylib from .deps.json). Rebuild/reinstall the tool after updating.
SQLite Error 14: unable to open database file Relative Data Source=Source/... from user secrets or appsettings.json — efvibe resolves it from the startup project upward (same idea as AdventureWorks SqliteConnectionStringResolver). Prefer an absolute path in appsettings.Development.json, or pass --connection-string with the full .db path.
LocalAppContextSwitches / ConfigurationManager errors Host/tool vs workspace assembly conflict; fixed in recent builds (workspace deps preload).
Method not found: JsonSerializerOptions.get_Web / incompatible System.Text.Json already in memory An older System.Text.Json.dll (project bin or tool folder) loaded before the .NET shared-framework copy. Exit efvibe and start a new process — assemblies are not unloaded between REPL commands. Update/reinstall efvibe, rebuild with -f net8.0, and delete stray bin/**/System.Text.Json.dll.
:planSET SHOWPLAN batch error SQL Server requires SET SHOWPLAN_ALL in its own batch; fixed in recent builds.
System.Diagnostics.DiagnosticSource version 9.0.0 / 10.0.0 not found Transitive NuGet pulls multiple versions; use a current efvibe build (version-aware .deps.json loading). If it persists, run the tool on the same band as your app, e.g. dotnet efvibe -f net8.0 from a repo with dotnet-tools.json.

For greenfield Mac work without Docker, use --provider sqlite or npgsql on a project that targets those providers.

Projects and configuration

efvibe builds the EF project (-p) and loads assemblies from its output and .deps.json, including class libraries that do not copy EF/SqlClient into bin/.

Configuration (connection strings) always comes from the startup project (-s / --startup-project, or auto-inferred), not from the EF library — same split as dotnet ef.

DbContext construction (in order):

  1. IDesignTimeDbContextFactory<T>
  2. Parameterless constructor
  3. User secrets on the startup project, then appsettings*.json next to that project
  4. --connection-string + --provider (sqlserver | npgsql | sqlite | oracle | mysql | mariadb)

User secrets use flat keys such as ConnectionStrings:DefaultConnection in ~/.microsoft/usersecrets/<UserSecretsId>/secrets.json.

:export csv / :export json writes under <ProjectName>/<DbContextName>/; optional paths are relative to that folder.

Session files (<ProjectName>/<DbContextName>/)

File Purpose
myefvibe-scan-lite.json Last :scan lite results
myefvibe-scan-deep.json Last :scan deep results — heuristics, translatedSql, queryPlan / queryPlanNote per finding, plus scan stats (sqlTranslatedCount, queryPlanCount, …)
myefvibe-scan-dismissals.json Dismissed findings (skipped on future scans)
myefvibe-scan-notes.json Saved notes on findings (shown on next scan, highlighted in yellow)
myefvibe-export-*.csv/json :export output

During scan review, on an empty prompt: / next/prev, Del dismiss, plus :dismiss, :note <text>, :repeat, :end.

REPL reference

The scripting global is db (not dbContext). Full command list, charts, benchmarks, and export options are in features.md.

Highlights:

  • :describe <entity> (:desc) — property sheet for an entity (Product, AddressEntity, DbSet name Products, or full type name). Shows CLR types (including arrays such as byte[]); adds PK, FK, column name, and max length when EF model metadata is available.
  • :dbinfo — DbContext type, EF/Core version, provider, connection state, connection string, and server version.
  • :plan — execution plan for the last translated SQL (provider-specific).
  • :scan lite / :scan deep — project-wide LINQ scan with a review queue, Fix hints, Translated SQL and Query plan (EXPLAIN) on deep scan (same engine as :plan), :dismiss, and :note. Deep results persist in myefvibe-scan-deep.json.
  • :about — tool version, license, and session paths.

Documentation

Resource Link
Product site myefvibe.com
Getting started myefvibe.com/docs/getting-started.html
REPL commands myefvibe.com/docs/repl.html
LINQ scan myefvibe.com/docs/scan.html
VS Code extension myefvibe.com/docs/vscode.html
Doc (repository) Description
features.md Full REPL and CLI reference
vscode-extension/INSTALL.md Install the VS Code extension (Marketplace or VSIX)
vscode-extension/README.md VS Code extension (run selection, efvibe serve, scan review, editable panel)
docs/vscode-extension-plan.md VS Code extension roadmap (phases, CLI hooks, diagnostics)
docs/efvibe-daemon-and-vscode.md efvibe serve daemon — fast Run Selection in VS Code
docs/visual-studio-extension-plan.md Visual Studio 2022+ extension roadmap (VSIX, Error List, tool windows)
docs/rider-extension-plan.md JetBrains Rider plugin roadmap (inspections, tool windows)
docs/linq-scan-feasibility.md How project LINQ scanning works

License

Licensed under the Apache License, Version 2.0.

The open source CLI is free to use under Apache 2.0. See features.md for the full command reference.

Publishing

Every push to main runs CI (including a VS Code extension compile check), then automatically:

  1. Computes the next patch version (max of latest v* git tag, NuGet, .csproj, and vscode-extension/package.json)
  2. Creates and pushes a v* tag (e.g. v0.1.4)
  3. Publishes that version to NuGet, packages the VS Code extension as a .vsix, opens a GitHub Release with both assets, and (when secrets are set) publishes to the Visual Studio Marketplace and Open VSX

Set the repository secret NUGET_API_KEY (nuget.org API key) for publish to work.

Optional secrets for extension marketplaces (skipped when unset):

Secret Purpose
OVSX_PAT Open VSX — token from your publisher account
VSCE_PAT Visual Studio Marketplace — Azure DevOps PAT with Marketplace (Publish) scope

Install the extension: Extensions → search efvibeMy EF Vibe (yeahbah.vscode-efvibe), or code --install-extension yeahbah.vscode-efvibe. For offline or pre-release builds, use a .vsix from GitHub Releases (see vscode-extension/INSTALL.md).

Manual publish: Actions → Publish → Run workflow (optional version input), or push a tag:

git tag v0.1.5 && git push origin v0.1.5

Version-bump commits from CI include [skip ci] so they do not trigger another release.

Contributing

Contributions welcome via pull request. By contributing, you agree that your contributions are licensed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.5.5 0 5/24/2026
0.5.4 0 5/24/2026
0.5.3 0 5/24/2026
0.5.2 0 5/24/2026
0.5.1 0 5/24/2026
0.1.54 0 5/23/2026
0.1.53 43 5/22/2026
0.1.47 41 5/22/2026
0.1.45 36 5/22/2026
0.1.43 41 5/21/2026
0.1.40 39 5/21/2026
0.1.38 55 5/20/2026
0.1.37 40 5/20/2026
0.1.36 38 5/20/2026
0.1.34 44 5/20/2026
0.1.32 33 5/20/2026
0.1.31 47 5/20/2026
0.1.30 47 5/19/2026
0.1.29 42 5/19/2026
0.1.28 30 5/19/2026
Loading failed