create-nx-workspace

Create a new Nx workspace

Usage

1create-nx-workspace [name] [options] 2

Install create-nx-workspace globally to invoke the command directly, or use npx create-nx-workspace, yarn create nx-workspace, or pnpx create-nx-workspace.

Options

OptionTypeDescription
--allPromptsbooleanShow all prompts. (Default: false)
--appNamestringThe name of the app when using a monorepo with certain stacks.
--bundlerstringBundler to be used to build the app.
--commit.emailstringE-mail of the committer.
--commit.messagestringCommit message. (Default: Initial commit)
--commit.namestringName of the committer.
--defaultBasestringDefault base to use for new projects. (Default: main)
--dockerbooleanGenerate a Dockerfile for the Node API.
--e2eTestRunnerplaywright, cypress, noneTest runner to use for end to end (E2E) tests.
--formatterstringCode formatter to use.
--frameworkstringFramework option to be used with certain stacks.
--helpbooleanShow help.
--interactivebooleanEnable interactive mode with presets. (Default: true)
--namestringWorkspace name (e.g. org name).
--nextAppDirbooleanEnable the App Router for Next.js.
--nextSrcDirbooleanGenerate a 'src/' directory for Next.js.
--nxCloudgithub, gitlab, azure, bitbucket-pipelines, circleci, skip, yesWhich CI provider would you like to use?
--packageManagerbun, npm, pnpm, yarnPackage manager to use. (Default: npm)
--prefixstringPrefix to use for Angular component and directive selectors.
--presetstringCustomizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "remix-monorepo", "remix-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset.
--routingbooleanAdd a routing setup for an Angular app. (Default: true)
--skipGitbooleanSkip initializing a git repository. (Default: false)
--ssrbooleanEnable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.
--standaloneApibooleanUse Standalone Components if generating an Angular app. (Default: true)
--stylestringStylesheet type to be used with certain stacks.
--useGitHubbooleanWill you be using GitHub as your git hosting provider? (Default: false)
--versionbooleanShow version number.
--workspacesbooleanUse package manager workspaces. (Default: false)
--workspaceTypeintegrated, package-based, standaloneThe type of workspace to create.

Presets

PresetDescription
angularAllows you to choose between the angular-standalone or angular-monorepo presets
angular-monorepoAn Angular monorepo
angular-standaloneA single Angular application
appsA basic integrated style repository starting with no projects
expoA monorepo with an Expo application
expressA monorepo with an Express application
nestA monorepo with a Nest application
nextA Next monorepo
nextjs-standaloneA single Next application
node-monorepoA Node monorepo
node-standaloneA single Node application
npmA repository configured with NPM Workspaces using a package-based style.
nuxtA Nuxt monorepo
nuxt-standaloneA single Nuxt application
reactAllows you to choose between the react-standalone or react-monorepo presets
react-monorepoA React monorepo
react-nativeA monorepo with a React Native application
react-standaloneA single React application
remix-monorepoA Remix monorepo
remix-standaloneA single Remix application
tsA basic integrated style repository starting with TypeScript configured but no projects
ts-standaloneA single TypeScript application
vueAllows you to choose between the vue-standalone or vue-monorepo presets
vue-monorepoA Vue monorepo
vue-standaloneA single Vue application
web-componentsAn integrated style repository with an application configured to use web components