Skip to content

Go Blueprint generator

Generates a Go application by wrapping the @melkeydev/go-blueprint CLI, which is bundled with this package. Scaffolds a project from a selected web framework, database driver, and optional advanced features.

nx g @naxodev/gonx:go-blueprint <directory>
OptionTypeDefaultDescription
directorystringrequiredDirectory of the new application. Taken from the first positional argument.
namestring-Name of the application. Must match ^[a-zA-Z][^:]*$.
tagsstring-Tags to add to the project (used for linting).
skipFormatbooleanfalseSkip formatting files.
addGoDotWorkbooleanfalseAdd this project to go.work.
frameworkchi | gin | fiber | gorilla/mux | httprouter | standard-library | echorequiredWeb framework.
drivermysql | postgres | sqlite | mongo | redis | scylla | nonerequiredDatabase driver.
gitcommit | stage | skiprequiredGit handling.
featurearray-Advanced features: react, htmx, githubaction, websocket, tailwind, docker.
  • The @melkeydev/go-blueprint binary is resolved from the bundled npm dependency; no separate installation is required.
  • Runs the init generator first to register the inference plugin. Adds the project to go.work when addGoDotWork is set and a Go workspace is supported.
  • Removes .air.toml, README.md, and Makefile from the generated output.
  • The react feature embeds frontend code inside the Go project directory, which Nx’s project graph does not detect as a separate project.
  • Inferred targets for the resulting application: build, serve, test, lint, tidy, generate, nx-release-publish.