Skip to content

Preset generator

Preset used by create-nx-workspace to scaffold a new Nx workspace with gonx pre-configured. Delegates to the application, library, or go-blueprint generator based on the selected type.

npx create-nx-workspace <workspace> --preset=@naxodev/gonx
Option Type Default Description
skipFormat boolean false Skip formatting files.
type binary | library | go-blueprint binary (required; default offered by the prompt) Define the type of preset to generate.
directory string (required) The directory of the new application. Accepted as the first positional argument.
name string - The name of the application.
tags string - Add tags to the project (used for linting)
addGoDotWork boolean false Add a go.work file to the project.

When type is go-blueprint, the following options are also required:

Option Type Default Description
framework chi | gin | fiber | gorilla/mux | httprouter | standard-library | echo (required) Framework to use
driver mysql | postgres | sqlite | mongo | redis | scylla | none (required) Database drivers to use
git commit | stage | skip (required) Git to use
feature (react | htmx | githubaction | websocket | tailwind | docker)[] (prompted) Advanced feature to use
  • type=binary delegates to the application generator; type=library delegates to the library generator; type=go-blueprint delegates to the go-blueprint generator.
  • When invoked programmatically without go-blueprint values, the preset applies framework=gin, driver=none, git=skip, feature=[].