Nyx

Tooling

Command line

The nyx executable is bin/nyx in a checkout, or the program noxc install puts on your path.

CommandWhat it does
nyx new blogwrites a new app: nox.json, entry file, views
nyx generate model Post title:string body:textmodel plus migration
nyx generate scaffold Comment body:textmodel, routes and views for a resource
nyx db migrateapply pending migrations
nyx db rollbackundo the last migration
nyx db schemaprint the schema
nyx db seedrun seeds
nyx jobs workrun the job worker
nyx serverboot and serve
nyx consolea REPL against the booted app
nyx versionprint the Nyx version

Generate into an app nyx new created, so the paths (app/views, the migration directory) match what nyx.ctrl.render and nyx db already look for.

nyx server is the development entry. Production should still be a built binary: noxc build the entry file and run that, with NYX_ENV=production and a real NYX_SECRET_KEY. The framework does not hide the compiler.

Column types in generate model are the names the migration template knows: string, text, integer, and the other types that template lists. An unknown type is a generator error, not a column of type “whatever you typed”.