DbEasy.CLI
1.0.0-beta02
dotnet tool install --global DbEasy.CLI --version 1.0.0-beta02
dotnet new tool-manifest
dotnet tool install --local DbEasy.CLI --version 1.0.0-beta02
#tool dotnet:?package=DbEasy.CLI&version=1.0.0-beta02&prerelease
nuke :add-package DbEasy.CLI --version 1.0.0-beta02
DbEasy CLI
DbEasy.CLI is the .NET command-line tool for the DbEasy ecosystem.
It provides project discovery, migration workflows, snapshot management, schema inspection, database connection diagnostics and repository configuration without requiring a custom C# host application for each operation.
DbEasy.CLI
│
├── project
├── migration
├── snapshot
├── schema
├── database
└── config
Requirements
The current CLI targets:
net8.0
You need a compatible .NET SDK and, for migration/schema/database commands, a project/database configuration that DbEasy can resolve.
Check the SDK:
dotnet --version
Installation
Install as a global .NET tool:
dotnet tool install --global DbEasy.CLI
Update an existing installation:
dotnet tool update --global DbEasy.CLI
Verify:
dbeasy --version
dbeasy --help
Uninstall:
dotnet tool uninstall --global DbEasy.CLI
Local tool installation
When a repository contains a .config/dotnet-tools.json manifest:
dotnet tool restore
dotnet tool run dbeasy --help
Depending on the local tool setup, this can also be invoked as:
dotnet dbeasy --help
Main commands
Project
Inspect/discover the target project:
dbeasy project
The command reports the selected project, target framework(s), detected DbEasy packages and validation status.
Migration
dbeasy migration --help
Current migration subcommands include:
add
list
update
diff
validate
sql
Examples:
dbeasy migration add AddEmailToUsers --project MyApp.csproj
dbeasy migration list --project MyApp.csproj
dbeasy migration update --project MyApp.csproj
dbeasy migration diff --project MyApp.csproj
dbeasy migration validate --project MyApp.csproj
Use the command-specific help/output of the installed version for the exact supported options.
Snapshot
dbeasy snapshot --help
Current snapshot subcommands include:
save
display
validate
load
Examples:
dbeasy snapshot save --project MyApp.csproj
dbeasy snapshot display --project MyApp.csproj
dbeasy snapshot validate --project MyApp.csproj
dbeasy snapshot load --project MyApp.csproj
Schema
dbeasy schema --help
Schema inspection commands include:
tables
columns
keys
relationships
constraints
display
export
Examples:
dbeasy schema tables
dbeasy schema display
dbeasy schema export
Database
Use the database command to resolve and inspect database connection configuration and connectivity:
dbeasy database --help
Connection input can come from explicit command options, repository configuration or configured environment variables depending on the command/options used.
Config
Validate and display the effective CLI configuration:
dbeasy config
Help:
dbeasy config --help
Supported provider configuration names include:
sqlserver
postgresql
mysql
sqlite
Repository configuration
DbEasy CLI supports repository configuration through:
.dbeasy.json
Example:
{
"Provider": "sqlserver",
"ProjectPath": "./MyApp.csproj",
"MigrationDirectory": "Migrations",
"SnapshotDirectory": "Migrations",
"ConnectionConfigFile": "appsettings.json",
"ConnectionName": "DefaultConnection",
"ConnectionEnvironmentVariable": "DBEASY_CONNECTION_STRING",
"Verbose": false,
"Debug": false,
"Quiet": false
}
Connection settings should not be committed with secrets embedded in source control. Prefer environment variables or the application's established secret/configuration mechanism for sensitive values.
Diagnostic modes
The CLI supports diagnostic modes such as:
--verbose
--debug
--quiet
Examples:
dbeasy migration update --verbose
dbeasy migration update --debug
dbeasy migration update --quiet
Only one diagnostic mode should be enabled at a time.
Exit codes
CLI commands return process exit codes so scripts and CI pipelines can distinguish success from command/configuration failures.
At minimum, automation should treat:
0 = success
non-zero = failure
For command-specific diagnostics, use standard output/error together with the process exit code.
Performance & Epic 9
The CLI itself was only lightly and selectively modified during Epic 9 compared with DbEasy and DbEasy.Migrations.
The main performance-relevant CLI areas were file-oriented orchestration paths, including:
| Area | Epic 9 focus |
|---|---|
| Snapshot read/write | Separate serialization/model cost from filesystem persistence. |
| Migration file writing | Avoid conflating generated-content work with disk I/O timing. |
| Performance orchestration | Expose repository scripts/workflows without embedding arbitrary performance claims in CLI commands. |
| CI integration | Performance checks and benchmark publication live under repository eng/performance tooling rather than becoming end-user dbeasy commands. |
DbEasy.CLI should therefore be viewed primarily as the orchestration layer. Most runtime performance optimizations from Epic 9 live in the Core, ORM and Migrations packages that the CLI coordinates.
For the repository performance methodology, see:
Benchmark and CI note
Repository performance tooling is intentionally separate from the end-user CLI command tree.
For contributor validation, use the repository scripts, for example:
.\eng\performance\Invoke-PerformanceChecks.ps1 -Mode validate
BenchmarkDotNet smoke run:
dotnet run -c Release --project benchmarks/DbEasy.Benchmarks -- --suite smoke
Published benchmark evidence can be staged with:
.\eng\performance\New-BenchmarkPublicationBundle.ps1 -Suite smoke
These are repository/contributor commands; they are not dbeasy end-user subcommands.
Related packages
| Package | Purpose |
|---|---|
DbEasy |
Core SQL/database operations |
DbEasy.ORM |
Entity mapping and CRUD |
DbEasy.Migrations |
Migrations and snapshots |
DbEasy.CLI |
Command-line orchestration |
License
MIT.
| Product | Versions 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 was computed. 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 was computed. 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta02 | 60 | 9/27/2026 |
| 1.0.0-beta01 | 65 | 9/18/2026 |
First public beta release of DbEasy CLI.
See CHANGELOG.md for complete release details.