Skip to content

init

Restore the provider and backend plugins pinned by your project, so a later command doesn’t have to.

Terminal window
nschema init

Plugins are restored implicitly on first use, so init is optional, it just does the restore up front. Run it to:

  • Warm the cache before a timed step, so the first real command isn’t slowed by a download.
  • Fail fast on a bad version pin or an unreachable feed, at a predictable point rather than mid-operation.

To create a new project’s files, use scaffold instead — init only restores plugins for an existing project. Pairs with the --no-init flag below.

Every operation accepts --no-init (analogous to dotnet --no-restore). It skips the implicit restore and requires the pinned plugins to already be cached, failing fast with guidance if one is missing. The pattern in CI is to restore once up front and require the cache thereafter:

Terminal window
nschema init # restore once
nschema plan --no-init # require the cache, never fetch
nschema apply --no-init

The built-in file backend has no plugin, so it never needs restoring.

The .NET SDK and network access to your NuGet feed (the restore shells out to dotnet). A project with only the built-in file backend and no provider has nothing to restore.