nx/docs/generated/cli/create-nx-workspace.md
Jason Jean 92e09d9322
fix(misc): adjust nx cloud ab test (#26866)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->


![image](https://github.com/nrwl/nx/assets/8104246/98c3b475-d213-4e81-8c80-4010714ad4f7)


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->


![image](https://github.com/nrwl/nx/assets/8104246/2a67ae6b-2718-45f3-adfe-2dcc88c8ecbd)


## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-08 18:28:59 -04:00

207 lines
3.1 KiB
Markdown

---
title: 'create-nx-workspace - CLI command'
description: 'Create a new Nx workspace'
---
# create-nx-workspace
Create a new Nx workspace
## Usage
```bash
create-nx-workspace [name] [options]
```
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
### allPrompts
Type: `boolean`
Default: `false`
Show all prompts
### appName
Type: `string`
The name of the app when using a monorepo with certain stacks
### bundler
Type: `string`
Bundler to be used to build the app
### commit.email
Type: `string`
E-mail of the committer
### commit.message
Type: `string`
Default: `Initial commit`
Commit message
### commit.name
Type: `string`
Name of the committer
### defaultBase
Type: `string`
Default: `main`
Default base to use for new projects
### docker
Type: `boolean`
Generate a Dockerfile for the Node API
### e2eTestRunner
Type: `string`
Choices: [playwright, cypress, none]
Test runner to use for end to end (E2E) tests.
### framework
Type: `string`
Framework option to be used with certain stacks
### help
Type: `boolean`
Show help
### interactive
Type: `boolean`
Default: `true`
Enable interactive mode with presets
### name
Type: `string`
Workspace name (e.g. org name)
### nextAppDir
Type: `boolean`
Enable the App Router for Next.js
### nextSrcDir
Type: `boolean`
Generate a 'src/' directory for Next.js
### nxCloud
Type: `string`
Choices: [github, circleci, gitlab, azure, bitbucket, skip, yes]
Which CI provider would you like to use?
### packageManager
Type: `string`
Choices: [bun, npm, pnpm, yarn]
Default: `npm`
Package manager to use
### prefix
Type: `string`
Prefix to use for Angular component and directive selectors.
### preset
Type: `string`
Customizes 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
### routing
Type: `boolean`
Default: `true`
Add a routing setup for an Angular app
### skipGit
Type: `boolean`
Default: `false`
Skip initializing a git repository
### ssr
Type: `boolean`
Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application
### standaloneApi
Type: `boolean`
Default: `true`
Use Standalone Components if generating an Angular app
### style
Type: `string`
Stylesheet type to be used with certain stacks
### useGitHub
Type: `boolean`
Default: `false`
Will you be using GitHub as your git hosting provider?
### version
Type: `boolean`
Show version number
### workspaceType
Type: `string`
Choices: [integrated, package-based, standalone]
The type of workspace to create