UmbrellaFrame.ModelSync.Cli 1.5.1

dotnet tool install --global UmbrellaFrame.ModelSync.Cli --version 1.5.1
                    
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 UmbrellaFrame.ModelSync.Cli --version 1.5.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=UmbrellaFrame.ModelSync.Cli&version=1.5.1
                    
nuke :add-package UmbrellaFrame.ModelSync.Cli --version 1.5.1
                    

ModelSync CLI

modelsync validates migration folders, previews pending scripts, applies migrations through the existing ModelSync runner, and produces reviewable schema evidence.

Install

dotnet tool install --global UmbrellaFrame.ModelSync.Cli --version 1.5.1
modelsync version

Safe Workflow

Keep the connection string in your environment:

export MODELSYNC_CONNECTION_STRING='Data Source=modelsync-preview.db'

Validate file discovery and duplicate IDs:

modelsync validate --scripts ./Database/Scripts

Preview without changing the database:

modelsync run \
  --provider sqlite \
  --connection-env MODELSYNC_CONNECTION_STRING \
  --scripts ./Database/Scripts \
  --dry-run

Apply deliberately and keep reports:

modelsync run \
  --provider sqlite \
  --connection-env MODELSYNC_CONNECTION_STRING \
  --scripts ./Database/Scripts \
  --apply \
  --report-md ./artifacts/modelsync-report.md \
  --report-json ./artifacts/modelsync-report.json

--apply is required before SQL is executed. Ctrl+C is forwarded as cancellation. --apply and --dry-run cannot be combined. Unknown options and duplicate options fail with a usage error instead of being ignored, so a misspelled safety flag cannot silently select a different execution path.

Schema Evidence

The model assembly is loaded from an explicit local path. Use --type to limit discovery to a comma-separated list of fully qualified model type names.

modelsync snapshot \
  --provider sqlite \
  --assembly ./bin/Release/net8.0/MyApp.dll \
  --type MyApp.Database.ProductSchema \
  --source-commit abc123 \
  --output ./artifacts/model.snapshot.json

modelsync baseline \
  --provider sqlite \
  --connection-env MODELSYNC_CONNECTION_STRING \
  --assembly ./bin/Release/net8.0/MyApp.dll \
  --type MyApp.Database.ProductSchema \
  --output ./artifacts/live-baseline.snapshot.json

modelsync status \
  --provider sqlite \
  --connection-env MODELSYNC_CONNECTION_STRING \
  --assembly ./bin/Release/net8.0/MyApp.dll \
  --type MyApp.Database.ProductSchema \
  --report-md ./artifacts/schema-plan.md \
  --report-json ./artifacts/schema-plan.json

Export a complete review bundle:

modelsync export \
  --provider sqlite \
  --connection-env MODELSYNC_CONNECTION_STRING \
  --assembly ./bin/Release/net8.0/MyApp.dll \
  --type MyApp.Database.ProductSchema \
  --output ./artifacts/modelsync

The export contains model/live snapshots, Markdown/JSON plans, and a manifest with SHA-256 hashes. It is review evidence, not an executable migration approval.

Compare two intact snapshot artifacts:

modelsync verify-drift \
  --baseline ./artifacts/approved.snapshot.json \
  --snapshot ./artifacts/current.snapshot.json

Exit code is 0 when hashes match and 1 when drift exists. Malformed or tampered snapshots are rejected before comparison.

Options

Option Meaning
--provider sqlserver, mysql, mariadb, postgresql, or sqlite
--scripts Root folder containing migration category folders
--connection-env Environment variable containing the connection string
--connection Inline compatibility option; may be visible in process listings
--dry-run Read-only comparison
--apply Explicit execution approval
--history-schema History schema; defaults to sec
--legacy-profile Enables LegacyEmbeddedSql compatibility
--report-md Markdown result path
--report-json JSON result path
--assembly Local assembly containing attributed schema models
--type Optional comma-separated fully qualified model type names
--source-commit Optional revision metadata stored in snapshots
--output Snapshot file or export directory

If neither connection option is supplied, the CLI reads MODELSYNC_CONNECTION_STRING.

Oracle is available as a preview provider package, but is intentionally not accepted by the CLI because its migration runner is not production-ready.

validate checks folder discovery, script metadata, and duplicate IDs. It does not prove arbitrary SQL safe or execute provider syntax validation. Migration files remain reviewed application artifacts.

Dry-run console output and generated reports show bounded SQL previews. String literals, comments, connection-string secrets, tokens, and password-like values are redacted. ModelSync does not place the complete script or raw exception text in a public result; review the original migration artifact in source control when full SQL context is required.

Only load trusted assemblies. Loading a .NET assembly can execute module initialization code. Snapshot, baseline, status, export, and verify-drift never authorize destructive changes.

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 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. 
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
1.5.1 202 8/9/2026
1.5.0 127 8/9/2026
1.4.0 131 7/18/2026
1.4.0-rc.1 89 7/18/2026
1.3.0 141 7/15/2026

ModelSync 1.5.1 aligns package guidance with provider-specific mapping attributes. CLI behavior remains compatible with 1.5.0.