Installation
NSchema is deployed as a .NET tool named nschema.
Prerequisites
Section titled “Prerequisites”- .NET SDK 10.0 or later. The tool targets
net10.0. Check withdotnet --version; install from dotnet.microsoft.com if needed. - A database. This tool is for managing database schemas after all. See Databases for supported databases.
Install
Section titled “Install”These instructions assume you want to install nschema globally just for the sake of simplicity.
If you just want to install it locally, you can do that too.
dotnet tool install nschema --globalThis installs the nschema command onto your PATH. You can verify it using:
nschema --versionProviders are plugins
Section titled “Providers are plugins”Database providers and remote state stores aren’t bundled with the CLI: each ships as its own NuGet package. When you need
to use a plugin, declare it in a PLUGIN block, pinning the package source and version. NSchema will pin the selected
version in a lockfile so runs are consistent. Source accepts any NuGet package ID, so third party plugins are supported.
PLUGIN postgres ( source = 'NSchema.Postgres', version = '[5.0,6.0)');The local file state store is the one exception to the plug-in system, as it’s built in.
See Configuration.
Update
Section titled “Update”dotnet tool update --global nschemaUninstall
Section titled “Uninstall”dotnet tool uninstall --global nschemaShell completion
Section titled “Shell completion”NSchema can emit a completion script for your shell, and install it for you in one step:
nschema completion install bashSwap bash for zsh, fish, or pwsh. See the completion command
for manual installation and completion uninstall to remove it.
Next steps
Section titled “Next steps”With the tool installed, head to the Quickstart to scaffold a project and apply your first schema.