CLI reference

Main command

efvibe [options] [expression...]

Options

OptionDescription
-w, --workspaceSession root (default ~/.efvibe or %APPDATA%/efvibe)
-p, --projectEF Core .csproj to build
-s, --startup-projectStartup project for config / user secrets
-c, --contextDbContext type name or full name
-e, --expressionOne-shot expression; exits after run
--formattext (default) or json
--no-bannerSuppress workspace/build output (use with JSON)
--dblogEF database logging (default on)
--no-dblogDisable database logging
--about-jsonSession metadata as JSON; no REPL
--with-planWith -e --format json, include query plan (EXPLAIN)
-f, --frameworkTarget framework (e.g. net8.0)
--connection-string, -csManual connection (requires --provider)
--providersqlserver | npgsql | sqlite | oracle | mysql | mariadb

JSON one-shot output

efvibe -p ./MyApp.Persistence.csproj -c AppDbContext \
  -e "db.Products.Count()" --format json --no-banner

With query plan:

efvibe -p ... -e "db.Products.Take(5).ToList()" \
  --format json --no-banner --with-plan

Example payload shape:

{
  "success": true,
  "value": "42",
  "sql": ["SELECT COUNT(*) FROM ..."],
  "queryPlan": "... EXPLAIN output ...",
  "metrics": { "totalMs": 12, "rowCount": 1 },
  "warnings": []
}

efvibe serve (editor daemon)

Long-running mode for fast repeated evaluation (VS Code uses this by default):

efvibe serve -p ./MyApp.Persistence.csproj -s ./MyApp.Api.csproj -c AppDbContext
# stdout: {"type":"ready","dbContext":"AppDbContext",...}
# stdin (one JSON line per request):
{"type":"eval","expression":"db.Products.Count()"}
{"type":"eval","expression":"db.Orders.Take(5).ToList()","withPlan":true}
{"type":"ping"}
{"type":"shutdown"}

Each eval line returns the same JSON as -e --format json. See daemon design doc.

Scan subcommand

efvibe scan lite|deep [scan options]

See LINQ scan for --fail-on, --json, and rule details.

Exit codes