Skip to content

Installation

NSchema is deployed as a .NET tool named nschema.

  • .NET SDK 10.0 or later. The tool targets net10.0. Check with dotnet --version; install from dotnet.microsoft.com if needed.
  • A database. This tool is for managing database schemas after all. See Providers for supported databases.

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.

Terminal window
dotnet tool install --global nschema

This installs the nschema command onto your PATH. You can verify it using:

Terminal window
nschema --version

Database providers and remote state backends aren’t bundled with the CLI: each ships as its own NuGet package. You name and pin one in your project config (e.g. PROVIDER postgres ( version = '4.0.0' )) and nschema restores it on first use. The local-file state backend is the one exception — it’s built in.

Terminal window
dotnet tool update --global nschema
Terminal window
dotnet tool uninstall --global nschema

NSchema can emit a completion script for your shell, and install it for you in one step:

Terminal window
nschema completion install bash

Swap bash for zsh, fish, or pwsh. See the completion command for manual installation and completion uninstall to remove it.

With the tool installed, head to the Quickstart to scaffold a project and apply your first schema.