new
Scaffold a simple project in the current directory, to get a new project going.
nschema newRun without arguments, the new command is interactive. It asks which database and state store to use, then guides you
through configuring them. Answer everything up front and it asks nothing.
This writes:
config.sql— the project’s configuration.config.env.prod.sql— a starter environment overlay forprod.schemas/example.sql— a starter schema file.
Edit those to point at your database and describe the schema you want, then plan and apply.
new pins the engine to the current major (ENGINE ( version = '[5.0,6.0)' );), and authors the PLUGIN declarations.
Afterwards, it runs init, resolving and locking those plugins so the project is ready to plan.
Options
Section titled “Options”-f,--force— scaffold even if the directory is not empty.--database <postgres|sqlite|sqlserver>— the database to scaffold for. Defaults topostgres.--state <file|s3>— the state store to scaffold for. Defaults tofile.--set <key>=<value>— answer one of the plugin’s questions up front. Repeatable:--set host=db.internal --set database=orders.--no-init— skip the resolve-and-lock step, for an offline or edit-first workflow. Runinityourself before planning.