docs(core): create commands landing page (#27660)

Creates a [custom landing page for Nx
commands](https://nx-dev-git-docs-commands-landing-page-nrwl.vercel.app/reference/nx-commands)
This commit is contained in:
Isaac Mann 2024-08-29 22:43:21 -04:00 committed by GitHub
parent 79b75ad140
commit 83a387a105
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
54 changed files with 1156 additions and 3366 deletions

View File

@ -37,32 +37,10 @@ Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init`
## Options ## Options
### help | Option | Type | Description |
| ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--packageSpecifier` | string | The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages |
Show help | `--updatePackageScripts` | boolean | Update `package.json` scripts with inferred targets. Defaults to `true` when the package is a core Nx plugin |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
### packageSpecifier | `--version` | boolean | Show version number |
Type: `string`
The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages
### updatePackageScripts
Type: `boolean`
Update `package.json` scripts with inferred targets. Defaults to `true` when the package is a core Nx plugin
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -85,147 +85,29 @@ Print the task graph to the console:
## Options ## Options
### ~~all~~ | Option | Type | Description |
| ----------- | ------- | ----------------------------------------- |
Type: `boolean` | ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
**Deprecated:** Use `nx run-many` instead |
### base | `--base` | string | Base of the current branch (usually main) |
| `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
Type: `string` | `--configuration` | string | This is the configuration to use when performing tasks on projects |
| `--exclude` | string | Exclude certain projects from being processed |
Base of the current branch (usually main) | `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
### batch | `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
Type: `boolean` | `--help` | boolean | Show help |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
Default: `false` | `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Run task(s) in batches for executors which support batches | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--runner` | string | This is the name of the tasks runner configured in nx.json |
### configuration | `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects |
Type: `string` | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
This is the configuration to use when performing tasks on projects | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
### exclude
Type: `string`
Exclude certain projects from being processed
### excludeTaskDependencies
Type: `boolean`
Default: `false`
Skips running dependent tasks first
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
### parallel
Type: `string`
Max number of parallel processes [default is 3]
### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
### targets
Type: `string`
Tasks to run for affected projects
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -17,26 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### generateToken | Option | Type | Description |
| ----------------- | ------- | ---------------------------------------------------------------------------------------- |
Type: `boolean` | `--generateToken` | boolean | Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud |
| `--help` | boolean | Show help |
Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
### help
Type: `boolean`
Show help
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -17,190 +17,63 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
## Options ## Options
### allPrompts | Option | Type | Description |
| ------------------ | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--allPrompts` | boolean | Show all prompts (Default: `false`) |
| `--appName` | string | The name of the app when using a monorepo with certain stacks |
Default: `false` | `--bundler` | string | Bundler to be used to build the app |
| `--commit.email` | string | E-mail of the committer |
Show all prompts | `--commit.message` | string | Commit message (Default: `Initial commit`) |
| `--commit.name` | string | Name of the committer |
### appName | `--defaultBase` | string | Default base to use for new projects (Default: `main`) |
| `--docker` | boolean | Generate a Dockerfile for the Node API |
Type: `string` | `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. |
| `--framework` | string | Framework option to be used with certain stacks |
The name of the app when using a monorepo with certain stacks | `--help` | boolean | Show help |
| `--interactive` | boolean | Enable interactive mode with presets (Default: `true`) |
### bundler | `--name` | string | Workspace name (e.g. org name) |
| `--nextAppDir` | boolean | Enable the App Router for Next.js |
Type: `string` | `--nextSrcDir` | boolean | Generate a 'src/' directory for Next.js |
| `--nxCloud` | `github`, `gitlab`, `azure`, `bitbucket-pipelines`, `circleci`, `skip`, `yes` | Which CI provider would you like to use? |
Bundler to be used to build the app | `--packageManager` | `bun`, `npm`, `pnpm`, `yarn` | Package manager to use (Default: `npm`) |
| `--prefix` | string | Prefix to use for Angular component and directive selectors. |
### commit.email | `--preset` | 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` | boolean | Add a routing setup for an Angular app (Default: `true`) |
Type: `string` | `--skipGit` | boolean | Skip initializing a git repository (Default: `false`) |
| `--ssr` | boolean | Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application |
E-mail of the committer | `--standaloneApi` | boolean | Use Standalone Components if generating an Angular app (Default: `true`) |
| `--style` | string | Stylesheet type to be used with certain stacks |
### commit.message | `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
| `--version` | boolean | Show version number |
Type: `string` | `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create |
Default: `Initial commit` ## Presets
Commit message | Preset | Description |
| ------------------ | --------------------------------------------------------------------------------------- |
### commit.name | angular | Allows you to choose between the angular-standalone or angular-monorepo presets |
| angular-monorepo | An Angular monorepo |
Type: `string` | angular-standalone | A single Angular application |
| apps | A basic integrated style repository starting with no projects |
Name of the committer | expo | A monorepo with an Expo application |
| express | A monorepo with an Express application |
### defaultBase | nest | A monorepo with a Nest application |
| next | A Next monorepo |
Type: `string` | nextjs-standalone | A single Next application |
| node-monorepo | A Node monorepo |
Default: `main` | node-standalone | A single Node application |
| npm | A repository configured with NPM Workspaces using a package-based style. |
Default base to use for new projects | nuxt | A Nuxt monorepo |
| nuxt-standalone | A single Nuxt application |
### docker | react | Allows you to choose between the react-standalone or react-monorepo presets |
| react-monorepo | A React monorepo |
Type: `boolean` | react-native | A monorepo with a React Native application |
| react-standalone | A single React application |
Generate a Dockerfile for the Node API | remix-monorepo | A Remix monorepo |
| remix-standalone | A single Remix application |
### e2eTestRunner | ts | A basic integrated style repository starting with TypeScript configured but no projects |
| ts-standalone | A single TypeScript application |
Type: `string` | vue | Allows you to choose between the vue-standalone or vue-monorepo presets |
| vue-monorepo | A Vue monorepo |
Choices: [playwright, cypress, none] | vue-standalone | A single Vue application |
| web-components | An integrated style repository with an application configured to use web components |
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, gitlab, azure, bitbucket-pipelines, circleci, 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

View File

@ -17,26 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | ------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--start` | boolean | (Default: `false`) |
Show help | `--stop` | boolean | (Default: `false`) |
| `--version` | boolean | Show version number |
### start
Type: `boolean`
Default: `false`
### stop
Type: `boolean`
Default: `false`
### version
Type: `boolean`
Show version number

View File

@ -17,68 +17,16 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### all | Option | Type | Description |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | Format all projects |
| `--base` | string | Base of the current branch (usually main) |
Format all projects | `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
### base | `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
Type: `string` | `--libs-and-apps` | boolean | Format only libraries and applications files. |
| `--projects` | string | Projects to format (comma/space delimited) |
Base of the current branch (usually main) | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
### exclude | `--version` | boolean | Show version number |
Type: `string`
Exclude certain projects from being processed
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### libs-and-apps
Type: `boolean`
Format only libraries and applications files.
### projects
Type: `string`
Projects to format (comma/space delimited)
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### version
Type: `boolean`
Show version number

View File

@ -17,68 +17,16 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### all | Option | Type | Description |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | Format all projects |
| `--base` | string | Base of the current branch (usually main) |
Format all projects | `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
### base | `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
Type: `string` | `--libs-and-apps` | boolean | Format only libraries and applications files. |
| `--projects` | string | Projects to format (comma/space delimited) |
Base of the current branch (usually main) | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
### exclude | `--version` | boolean | Show version number |
Type: `string`
Exclude certain projects from being processed
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### libs-and-apps
Type: `boolean`
Format only libraries and applications files.
### projects
Type: `string`
Projects to format (comma/space delimited)
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### version
Type: `boolean`
Show version number

View File

@ -73,130 +73,25 @@ Watch for changes to project graph and update in-browser:
## Options ## Options
### affected | Option | Type | Description |
| ----------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--affected` | boolean | Highlight affected projects |
| `--base` | string | Base of the current branch (usually main) |
Highlight affected projects | `--exclude` | string | Exclude certain projects from being processed |
| `--file` | string | Output file (e.g. --file=output.json or --file=dep-graph.html). |
### base | `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
| `--focus` | string | Use to show the project graph for a particular project and every node that is either an ancestor or a descendant. |
Type: `string` | `--groupByFolder` | boolean | Group projects by folder in the project graph |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
Base of the current branch (usually main) | `--help` | boolean | Show help |
| `--host` | string | Bind the project graph server to a specific ip address. |
### exclude | `--open` | boolean | Open the project graph in the browser. (Default: `true`) |
| `--port` | number | Bind the project graph server to a specific port. |
Type: `string` | `--print` | boolean | Print the project graph to stdout in the terminal. |
| `--targets` | string | The target to show tasks for in the task graph |
Exclude certain projects from being processed | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
### file | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Type: `string` | `--view` | `projects`, `tasks` | Choose whether to view the projects or task graph (Default: `projects`) |
| `--watch` | boolean | Watch for changes to project graph and update in-browser (Default: `true`) |
Output file (e.g. --file=output.json or --file=dep-graph.html).
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### focus
Type: `string`
Use to show the project graph for a particular project and every node that is either an ancestor or a descendant.
### groupByFolder
Type: `boolean`
Group projects by folder in the project graph
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### host
Type: `string`
Bind the project graph server to a specific ip address.
### open
Type: `boolean`
Default: `true`
Open the project graph in the browser.
### port
Type: `number`
Bind the project graph server to a specific port.
### print
Type: `boolean`
Print the project graph to stdout in the terminal.
### targets
Type: `string`
The target to show tasks for in the task graph
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number
### view
Type: `string`
Choices: [projects, tasks]
Default: `projects`
Choose whether to view the projects or task graph
### watch
Type: `boolean`
Default: `true`
Watch for changes to project graph and update in-browser

View File

@ -17,36 +17,10 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--interactive` | boolean | When false disables interactive input prompts for options. (Default: `true`) |
Show help | `--nxCloud` | boolean | Set up distributed caching with Nx Cloud. |
| `--useDotNxInstallation` | boolean | Initialize an Nx workspace setup in the .nx directory of the current repository. (Default: `false`) |
### interactive | `--version` | boolean | Show version number |
Type: `boolean`
Default: `true`
When false disables interactive input prompts for options.
### nxCloud
Type: `boolean`
Set up distributed caching with Nx Cloud.
### useDotNxInstallation
Type: `boolean`
Default: `false`
Initialize an Nx workspace setup in the .nx directory of the current repository.
### version
Type: `boolean`
Show version number

View File

@ -31,20 +31,8 @@ List the generators and executors available in the `@nx/web` plugin if it is ins
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | ---------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--plugin` | string | The name of an installed plugin to query |
Show help | `--version` | boolean | Show version number |
### plugin
Type: `string`
The name of an installed plugin to query
### version
Type: `boolean`
Show version number

View File

@ -17,26 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--nxCloudUrl` | string | The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app. |
Show help | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
### nxCloudUrl
Type: `string`
The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app.
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -17,20 +17,8 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | --------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Show help | `--version` | boolean | Show version number |
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -79,84 +79,17 @@ Create a dedicated commit for each successfully completed migration. You can cus
## Options ## Options
### commitPrefix | Option | Type | Description |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
Type: `string` | `--commitPrefix` | string | Commit prefix to apply to the commit for each migration, when --create-commits is enabled (Default: `chore: [nx migration] `) |
| `--createCommits` | boolean | Automatically create a git commit after each migration runs (Default: `false`) |
Default: `chore: [nx migration] ` | `--excludeAppliedMigrations` | boolean | Exclude migrations that should have been applied on previous updates. To be used with --from (Default: `false`) |
| `--from` | string | Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nx/react@16.0.0,@nx/js@16.0.0") |
Commit prefix to apply to the commit for each migration, when --create-commits is enabled | `--help` | boolean | Show help |
| `--ifExists` | boolean | Run migrations only if the migrations file exists, if not continues successfully (Default: `false`) |
### createCommits | `--interactive` | boolean | Enable prompts to confirm whether to collect optional package updates and migrations (Default: `false`) |
| `--packageAndVersion` | string | The target package and version (e.g, @nx/workspace@16.0.0) |
Type: `boolean` | `--runMigrations` | string | Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json) |
| `--to` | string | Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/react@16.0.0,@nx/js@16.0.0") |
Default: `false` | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Automatically create a git commit after each migration runs
### excludeAppliedMigrations
Type: `boolean`
Default: `false`
Exclude migrations that should have been applied on previous updates. To be used with --from
### from
Type: `string`
Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nx/react@16.0.0,@nx/js@16.0.0")
### help
Type: `boolean`
Show help
### ifExists
Type: `boolean`
Default: `false`
Run migrations only if the migrations file exists, if not continues successfully
### interactive
Type: `boolean`
Default: `false`
Enable prompts to confirm whether to collect optional package updates and migrations
### packageAndVersion
Type: `string`
The target package and version (e.g, @nx/workspace@16.0.0)
### runMigrations
Type: `string`
Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json)
### to
Type: `string`
Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/react@16.0.0,@nx/js@16.0.0")
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -15,51 +15,17 @@ nx release
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Shared Options ## Options
### dry-run | Shared Option | Type | Description |
| --------------- | ------- | ---------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--dry-run` | boolean | Preview the changes without updating files/creating releases (Default: `false`) |
| `--groups` | string | One or more release groups to target with the current command. |
Default: `false` | `--help` | boolean | Show help |
| `--printConfig` | string | Print the resolved nx release configuration that would be used for the current command and then exit |
Preview the changes without updating files/creating releases | `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns) |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
### groups | `--version` | boolean | Show version number |
Type: `string`
One or more release groups to target with the current command.
### help
Type: `boolean`
Show help
### printConfig
Type: `string`
Print the resolved nx release configuration that would be used for the current command and then exit
### projects
Type: `string`
Projects to run. (comma/space delimited project names and/or patterns)
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number
## Subcommands ## Subcommands
@ -71,43 +37,16 @@ Create a version and release for the workspace, generate a changelog, and option
nx release [specifier] nx release [specifier]
``` ```
#### Options ## Options
##### first-release | Option | Type | Description |
| ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
| `--help` | boolean | Show help |
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. | `--skip-publish` | boolean | Skip publishing by automatically answering no to the confirmation prompt for publishing |
| `--specifier` | string | Exact version or semver keyword to apply to the selected release group. |
##### help | `--version` | boolean | Show version number |
| `--yes` | boolean | Automatically answer yes to the confirmation prompt for publishing |
Type: `boolean`
Show help
##### skip-publish
Type: `boolean`
Skip publishing by automatically answering no to the confirmation prompt for publishing
##### specifier
Type: `string`
Exact version or semver keyword to apply to the selected release group.
##### version
Type: `boolean`
Show version number
##### yes
Type: `boolean`
Automatically answer yes to the confirmation prompt for publishing
### version ### version
@ -117,79 +56,22 @@ Create a version and release for one or more applications and libraries
nx release version [specifier] nx release version [specifier]
``` ```
#### Options ## Options
##### first-release | Option | Type | Description |
| ---------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
| `--git-commit` | boolean | Whether or not to automatically commit the changes made by this command |
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. | `--git-commit-args` | string | Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes |
| `--git-commit-message` | string | Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases. |
##### git-commit | `--git-tag` | boolean | Whether or not to automatically tag the changes made by this command |
| `--git-tag-args` | string | Additional arguments to pass to the `git tag` command invoked behind the scenes |
Type: `boolean` | `--git-tag-message` | string | Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself. |
| `--help` | boolean | Show help |
Whether or not to automatically commit the changes made by this command | `--preid` | string | The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor (Default: ``) |
| `--specifier` | string | Exact version or semver keyword to apply to the selected release group. |
##### git-commit-args | `--stage-changes` | boolean | Whether or not to stage the changes made by this command. Always treated as true if git-commit is true. |
| `--version` | boolean | Show version number |
Type: `string`
Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes
##### git-commit-message
Type: `string`
Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases.
##### git-tag
Type: `boolean`
Whether or not to automatically tag the changes made by this command
##### git-tag-args
Type: `string`
Additional arguments to pass to the `git tag` command invoked behind the scenes
##### git-tag-message
Type: `string`
Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself.
##### help
Type: `boolean`
Show help
##### preid
Type: `string`
The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor
##### specifier
Type: `string`
Exact version or semver keyword to apply to the selected release group.
##### stage-changes
Type: `boolean`
Whether or not to stage the changes made by this command. Always treated as true if git-commit is true.
##### version
Type: `boolean`
Show version number
### changelog ### changelog
@ -199,97 +81,24 @@ Generate a changelog for one or more projects, and optionally push to Github
nx release changelog [version] nx release changelog [version]
``` ```
#### Options ## Options
##### first-release | Option | Type | Description |
| ---------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
| `--from` | string | The git reference to use as the start of the changelog. If not set it will attempt to resolve the latest tag and use that |
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. | `--git-commit` | boolean | Whether or not to automatically commit the changes made by this command |
| `--git-commit-args` | string | Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes |
##### from | `--git-commit-message` | string | Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases. |
| `--git-remote` | string | Alternate git remote in the form {user}/{repo} on which to create the Github release (useful for testing) (Default: `origin`) |
Type: `string` | `--git-tag` | boolean | Whether or not to automatically tag the changes made by this command |
| `--git-tag-args` | string | Additional arguments to pass to the `git tag` command invoked behind the scenes |
The git reference to use as the start of the changelog. If not set it will attempt to resolve the latest tag and use that | `--git-tag-message` | string | Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself. |
| `--help` | boolean | Show help |
##### git-commit | `--interactive` | `all`, `workspace`, `projects` | Interactively modify changelog markdown contents in your code editor before applying the changes. You can set it to be interactive for all changelogs, or only the workspace level, or only the project level |
| `--stage-changes` | boolean | Whether or not to stage the changes made by this command. Always treated as true if git-commit is true. |
Type: `boolean` | `--to` | string | The git reference to use as the end of the changelog (Default: `HEAD`) |
| `--version` | string | The version to create a Github release and changelog for |
Whether or not to automatically commit the changes made by this command
##### git-commit-args
Type: `string`
Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes
##### git-commit-message
Type: `string`
Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases.
##### git-remote
Type: `string`
Default: `origin`
Alternate git remote in the form {user}/{repo} on which to create the Github release (useful for testing)
##### git-tag
Type: `boolean`
Whether or not to automatically tag the changes made by this command
##### git-tag-args
Type: `string`
Additional arguments to pass to the `git tag` command invoked behind the scenes
##### git-tag-message
Type: `string`
Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself.
##### help
Type: `boolean`
Show help
##### interactive
Type: `string`
Choices: [all, workspace, projects]
Interactively modify changelog markdown contents in your code editor before applying the changes. You can set it to be interactive for all changelogs, or only the workspace level, or only the project level
##### stage-changes
Type: `boolean`
Whether or not to stage the changes made by this command. Always treated as true if git-commit is true.
##### to
Type: `string`
Default: `HEAD`
The git reference to use as the end of the changelog
##### version
Type: `string`
The version to create a Github release and changelog for
### publish ### publish
@ -299,131 +108,25 @@ Publish a versioned project to a registry
nx release publish nx release publish
``` ```
#### Options ## Options
##### all | Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | [deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. (Default: `true`) |
| `--exclude` | string | Exclude certain projects from being processed |
Default: `true` | `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. | `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--help` | boolean | Show help |
##### exclude | `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
Type: `string` | `--otp` | number | A one-time password for publishing to a registry that requires 2FA |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Exclude certain projects from being processed | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns) |
##### excludeTaskDependencies | `--registry` | string | The registry to publish to |
| `--runner` | string | This is the name of the tasks runner configured in nx.json |
Type: `boolean` | `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
| `--tag` | string | The distribution tag to apply to the published package |
Default: `false` | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Skips running dependent tasks first
##### first-release
Type: `boolean`
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running.
##### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
##### help
Type: `boolean`
Show help
##### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
##### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
##### otp
Type: `number`
A one-time password for publishing to a registry that requires 2FA
##### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
##### parallel
Type: `string`
Max number of parallel processes [default is 3]
##### projects
Type: `string`
Projects to run. (comma/space delimited project names and/or patterns)
##### registry
Type: `string`
The registry to publish to
##### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
##### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
##### tag
Type: `string`
The distribution tag to apply to the published package
##### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
##### version
Type: `boolean`
Show version number

View File

@ -34,20 +34,8 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | --------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Show help | `--version` | boolean | Show version number |
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -14,3 +14,8 @@ nx report
``` ```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Options
| Option | Type | Description |
| ------ | ---- | ----------- |

View File

@ -43,38 +43,11 @@ Clears the workspace data directory. Used by Nx to store cached data about the c
## Options ## Options
### help | Option | Type | Description |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--onlyCache` | boolean | Clears the Nx cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache. |
Show help | `--onlyCloud` | boolean | Resets the Nx Cloud client. NOTE: Does not clear the remote cache. |
| `--onlyDaemon` | boolean | Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run. |
### onlyCache | `--onlyWorkspaceData` | boolean | Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc) |
| `--version` | boolean | Show version number |
Type: `boolean`
Clears the Nx cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache.
### onlyCloud
Type: `boolean`
Resets the Nx Cloud client. NOTE: Does not clear the remote cache.
### onlyDaemon
Type: `boolean`
Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run.
### onlyWorkspaceData
Type: `boolean`
Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc)
### version
Type: `boolean`
Show version number

View File

@ -91,125 +91,22 @@ Print the task graph to the console:
## Options ## Options
### all | Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | [deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. (Default: `true`) |
| `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
Default: `true` | `--configuration` | string | This is the configuration to use when performing tasks on projects |
| `--exclude` | string | Exclude certain projects from being processed |
[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. | `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
### batch | `--help` | boolean | Show help |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
Type: `boolean` | `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Default: `false` | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns) |
Run task(s) in batches for executors which support batches | `--runner` | string | This is the name of the tasks runner configured in nx.json |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
### configuration | `--targets` | string | Tasks to run for affected projects |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Type: `string` | `--version` | boolean | Show version number |
This is the configuration to use when performing tasks on projects
### exclude
Type: `string`
Exclude certain projects from being processed
### excludeTaskDependencies
Type: `boolean`
Default: `false`
Skips running dependent tasks first
### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
### help
Type: `boolean`
Show help
### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
### parallel
Type: `string`
Max number of parallel processes [default is 3]
### projects
Type: `string`
Projects to run. (comma/space delimited project names and/or patterns)
### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
### targets
Type: `string`
Tasks to run for affected projects
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -67,105 +67,19 @@ Run's a target named build:test for the myapp project. Note the quotes around th
## Options ## Options
### batch | Option | Type | Description |
| --------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects |
Default: `false` | `--exclude` | string | Exclude certain projects from being processed |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
Run task(s) in batches for executors which support batches | `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
### configuration | `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes`, `compact` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Type: `string` | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--project` | string | Target project |
This is the configuration to use when performing tasks on projects | `--runner` | string | This is the name of the tasks runner configured in nx.json |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
### exclude | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Type: `string`
Exclude certain projects from being processed
### excludeTaskDependencies
Type: `boolean`
Default: `false`
Skips running dependent tasks first
### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes, compact]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
### parallel
Type: `string`
Max number of parallel processes [default is 3]
### project
Type: `string`
Target project
### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -83,25 +83,13 @@ Opens a web browser to explore the configuration of "my-app":
nx show project my-app --web nx show project my-app --web
``` ```
## Shared Options ## Options
### help | Shared Option | Type | Description |
| ------------- | ------- | ------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--json` | boolean | Output JSON |
Show help | `--version` | boolean | Show version number |
### json
Type: `boolean`
Output JSON
### version
Type: `boolean`
Show version number
## Subcommands ## Subcommands
@ -113,93 +101,24 @@ Show a list of projects in the workspace
nx show projects nx show projects
``` ```
#### Options ## Options
##### affected | Option | Type | Description |
| --------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--affected` | boolean | Show only affected projects |
| `--base` | string | Base of the current branch (usually main) |
Show only affected projects | `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
##### base | `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
Type: `string` | `--projects` | string | Show only projects that match a given pattern. |
| `--sep` | string | Outputs projects with the specified seperator |
Base of the current branch (usually main) | `--type` | `app`, `lib`, `e2e` | Select only projects of the given type |
| `--uncommitted` | boolean | Uncommitted changes |
##### exclude | `--untracked` | boolean | Untracked changes |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Type: `string` | `--version` | boolean | Show version number |
| `--withTarget` | string | Show only projects that have a specific target |
Exclude certain projects from being processed
##### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
##### head
Type: `string`
Latest commit of the current branch (usually HEAD)
##### help
Type: `boolean`
Show help
##### projects
Type: `string`
Show only projects that match a given pattern.
##### sep
Type: `string`
Outputs projects with the specified seperator
##### type
Type: `string`
Choices: [app, lib, e2e]
Select only projects of the given type
##### uncommitted
Type: `boolean`
Uncommitted changes
##### untracked
Type: `boolean`
Untracked changes
##### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
##### version
Type: `boolean`
Show version number
##### withTarget
Type: `string`
Show only projects that have a specific target
### project ### project
@ -209,40 +128,13 @@ Shows resolved project configuration for a given project.
nx show project <projectName> nx show project <projectName>
``` ```
#### Options ## Options
##### help | Option | Type | Description |
| --------------- | ------- | --------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--open` | boolean | Set to false to prevent the browser from opening when using --web |
Show help | `--projectName` | string | Which project should be viewed? |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
##### open | `--version` | boolean | Show version number |
| `--web` | boolean | Show project details in the browser. (default when interactive) |
Type: `boolean`
Set to false to prevent the browser from opening when using --web
##### projectName
Type: `string`
Which project should be viewed?
##### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
##### version
Type: `boolean`
Show version number
##### web
Type: `boolean`
Show project details in the browser. (default when interactive)

View File

@ -14,3 +14,8 @@ nx view-logs
``` ```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Options
| Option | Type | Description |
| ------ | ---- | ----------- |

View File

@ -37,38 +37,11 @@ Watch all projects (including newly created projects) in the workspace:
## Options ## Options
### all | Option | Type | Description |
| ---------------------------- | ------- | --------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | Watch all projects. |
| `--help` | boolean | Show help |
Watch all projects. | `--includeDependentProjects` | boolean | When watching selected projects, include dependent projects as well. |
| `--projects` | string | Projects to watch (comma/space delimited). |
### help | `--verbose` | boolean | Run watch mode in verbose mode, where commands are logged before execution. |
| `--version` | boolean | Show version number |
Type: `boolean`
Show help
### includeDependentProjects
Type: `boolean`
When watching selected projects, include dependent projects as well.
### projects
Type: `string`
Projects to watch (comma/space delimited).
### verbose
Type: `boolean`
Run watch mode in verbose mode, where commands are logged before execution.
### version
Type: `boolean`
Show version number

View File

@ -4410,9 +4410,9 @@
"children": [ "children": [
{ {
"name": "Commands", "name": "Commands",
"path": "/nx-api/nx", "path": "/reference/nx-commands",
"id": "commands", "id": "nx-commands",
"isExternal": true, "isExternal": false,
"children": [], "children": [],
"disableCollapsible": false "disableCollapsible": false
}, },
@ -4477,9 +4477,9 @@
}, },
{ {
"name": "Commands", "name": "Commands",
"path": "/nx-api/nx", "path": "/reference/nx-commands",
"id": "commands", "id": "nx-commands",
"isExternal": true, "isExternal": false,
"children": [], "children": [],
"disableCollapsible": false "disableCollapsible": false
}, },

View File

@ -6036,14 +6036,14 @@
"file": "", "file": "",
"itemList": [ "itemList": [
{ {
"id": "commands", "id": "nx-commands",
"name": "Commands", "name": "Commands",
"description": "", "description": "",
"mediaImage": "", "mediaImage": "",
"file": "", "file": "shared/reference/commands",
"itemList": [], "itemList": [],
"isExternal": true, "isExternal": false,
"path": "/nx-api/nx", "path": "/reference/nx-commands",
"tags": [] "tags": []
}, },
{ {
@ -6128,15 +6128,15 @@
"path": "/reference", "path": "/reference",
"tags": [] "tags": []
}, },
"/nx-api/nx": { "/reference/nx-commands": {
"id": "commands", "id": "nx-commands",
"name": "Commands", "name": "Commands",
"description": "", "description": "",
"mediaImage": "", "mediaImage": "",
"file": "", "file": "shared/reference/commands",
"itemList": [], "itemList": [],
"isExternal": true, "isExternal": false,
"path": "/nx-api/nx", "path": "/reference/nx-commands",
"tags": [] "tags": []
}, },
"/reference/nx-json": { "/reference/nx-json": {

View File

@ -37,32 +37,10 @@ Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init`
## Options ## Options
### help | Option | Type | Description |
| ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--packageSpecifier` | string | The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages |
Show help | `--updatePackageScripts` | boolean | Update `package.json` scripts with inferred targets. Defaults to `true` when the package is a core Nx plugin |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
### packageSpecifier | `--version` | boolean | Show version number |
Type: `string`
The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages
### updatePackageScripts
Type: `boolean`
Update `package.json` scripts with inferred targets. Defaults to `true` when the package is a core Nx plugin
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -85,147 +85,29 @@ Print the task graph to the console:
## Options ## Options
### ~~all~~ | Option | Type | Description |
| ----------- | ------- | ----------------------------------------- |
Type: `boolean` | ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
**Deprecated:** Use `nx run-many` instead |
### base | `--base` | string | Base of the current branch (usually main) |
| `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
Type: `string` | `--configuration` | string | This is the configuration to use when performing tasks on projects |
| `--exclude` | string | Exclude certain projects from being processed |
Base of the current branch (usually main) | `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
### batch | `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
Type: `boolean` | `--help` | boolean | Show help |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
Default: `false` | `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Run task(s) in batches for executors which support batches | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--runner` | string | This is the name of the tasks runner configured in nx.json |
### configuration | `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects |
Type: `string` | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
This is the configuration to use when performing tasks on projects | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
### exclude
Type: `string`
Exclude certain projects from being processed
### excludeTaskDependencies
Type: `boolean`
Default: `false`
Skips running dependent tasks first
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
### parallel
Type: `string`
Max number of parallel processes [default is 3]
### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
### targets
Type: `string`
Tasks to run for affected projects
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -17,26 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### generateToken | Option | Type | Description |
| ----------------- | ------- | ---------------------------------------------------------------------------------------- |
Type: `boolean` | `--generateToken` | boolean | Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud |
| `--help` | boolean | Show help |
Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
### help
Type: `boolean`
Show help
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -17,190 +17,63 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
## Options ## Options
### allPrompts | Option | Type | Description |
| ------------------ | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--allPrompts` | boolean | Show all prompts (Default: `false`) |
| `--appName` | string | The name of the app when using a monorepo with certain stacks |
Default: `false` | `--bundler` | string | Bundler to be used to build the app |
| `--commit.email` | string | E-mail of the committer |
Show all prompts | `--commit.message` | string | Commit message (Default: `Initial commit`) |
| `--commit.name` | string | Name of the committer |
### appName | `--defaultBase` | string | Default base to use for new projects (Default: `main`) |
| `--docker` | boolean | Generate a Dockerfile for the Node API |
Type: `string` | `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. |
| `--framework` | string | Framework option to be used with certain stacks |
The name of the app when using a monorepo with certain stacks | `--help` | boolean | Show help |
| `--interactive` | boolean | Enable interactive mode with presets (Default: `true`) |
### bundler | `--name` | string | Workspace name (e.g. org name) |
| `--nextAppDir` | boolean | Enable the App Router for Next.js |
Type: `string` | `--nextSrcDir` | boolean | Generate a 'src/' directory for Next.js |
| `--nxCloud` | `github`, `gitlab`, `azure`, `bitbucket-pipelines`, `circleci`, `skip`, `yes` | Which CI provider would you like to use? |
Bundler to be used to build the app | `--packageManager` | `bun`, `npm`, `pnpm`, `yarn` | Package manager to use (Default: `npm`) |
| `--prefix` | string | Prefix to use for Angular component and directive selectors. |
### commit.email | `--preset` | 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` | boolean | Add a routing setup for an Angular app (Default: `true`) |
Type: `string` | `--skipGit` | boolean | Skip initializing a git repository (Default: `false`) |
| `--ssr` | boolean | Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application |
E-mail of the committer | `--standaloneApi` | boolean | Use Standalone Components if generating an Angular app (Default: `true`) |
| `--style` | string | Stylesheet type to be used with certain stacks |
### commit.message | `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
| `--version` | boolean | Show version number |
Type: `string` | `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create |
Default: `Initial commit` ## Presets
Commit message | Preset | Description |
| ------------------ | --------------------------------------------------------------------------------------- |
### commit.name | angular | Allows you to choose between the angular-standalone or angular-monorepo presets |
| angular-monorepo | An Angular monorepo |
Type: `string` | angular-standalone | A single Angular application |
| apps | A basic integrated style repository starting with no projects |
Name of the committer | expo | A monorepo with an Expo application |
| express | A monorepo with an Express application |
### defaultBase | nest | A monorepo with a Nest application |
| next | A Next monorepo |
Type: `string` | nextjs-standalone | A single Next application |
| node-monorepo | A Node monorepo |
Default: `main` | node-standalone | A single Node application |
| npm | A repository configured with NPM Workspaces using a package-based style. |
Default base to use for new projects | nuxt | A Nuxt monorepo |
| nuxt-standalone | A single Nuxt application |
### docker | react | Allows you to choose between the react-standalone or react-monorepo presets |
| react-monorepo | A React monorepo |
Type: `boolean` | react-native | A monorepo with a React Native application |
| react-standalone | A single React application |
Generate a Dockerfile for the Node API | remix-monorepo | A Remix monorepo |
| remix-standalone | A single Remix application |
### e2eTestRunner | ts | A basic integrated style repository starting with TypeScript configured but no projects |
| ts-standalone | A single TypeScript application |
Type: `string` | vue | Allows you to choose between the vue-standalone or vue-monorepo presets |
| vue-monorepo | A Vue monorepo |
Choices: [playwright, cypress, none] | vue-standalone | A single Vue application |
| web-components | An integrated style repository with an application configured to use web components |
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, gitlab, azure, bitbucket-pipelines, circleci, 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

View File

@ -17,26 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | ------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--start` | boolean | (Default: `false`) |
Show help | `--stop` | boolean | (Default: `false`) |
| `--version` | boolean | Show version number |
### start
Type: `boolean`
Default: `false`
### stop
Type: `boolean`
Default: `false`
### version
Type: `boolean`
Show version number

View File

@ -73,130 +73,25 @@ Watch for changes to project graph and update in-browser:
## Options ## Options
### affected | Option | Type | Description |
| ----------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--affected` | boolean | Highlight affected projects |
| `--base` | string | Base of the current branch (usually main) |
Highlight affected projects | `--exclude` | string | Exclude certain projects from being processed |
| `--file` | string | Output file (e.g. --file=output.json or --file=dep-graph.html). |
### base | `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
| `--focus` | string | Use to show the project graph for a particular project and every node that is either an ancestor or a descendant. |
Type: `string` | `--groupByFolder` | boolean | Group projects by folder in the project graph |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
Base of the current branch (usually main) | `--help` | boolean | Show help |
| `--host` | string | Bind the project graph server to a specific ip address. |
### exclude | `--open` | boolean | Open the project graph in the browser. (Default: `true`) |
| `--port` | number | Bind the project graph server to a specific port. |
Type: `string` | `--print` | boolean | Print the project graph to stdout in the terminal. |
| `--targets` | string | The target to show tasks for in the task graph |
Exclude certain projects from being processed | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
### file | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Type: `string` | `--view` | `projects`, `tasks` | Choose whether to view the projects or task graph (Default: `projects`) |
| `--watch` | boolean | Watch for changes to project graph and update in-browser (Default: `true`) |
Output file (e.g. --file=output.json or --file=dep-graph.html).
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### focus
Type: `string`
Use to show the project graph for a particular project and every node that is either an ancestor or a descendant.
### groupByFolder
Type: `boolean`
Group projects by folder in the project graph
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### host
Type: `string`
Bind the project graph server to a specific ip address.
### open
Type: `boolean`
Default: `true`
Open the project graph in the browser.
### port
Type: `number`
Bind the project graph server to a specific port.
### print
Type: `boolean`
Print the project graph to stdout in the terminal.
### targets
Type: `string`
The target to show tasks for in the task graph
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number
### view
Type: `string`
Choices: [projects, tasks]
Default: `projects`
Choose whether to view the projects or task graph
### watch
Type: `boolean`
Default: `true`
Watch for changes to project graph and update in-browser

View File

@ -17,68 +17,16 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### all | Option | Type | Description |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | Format all projects |
| `--base` | string | Base of the current branch (usually main) |
Format all projects | `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
### base | `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
Type: `string` | `--libs-and-apps` | boolean | Format only libraries and applications files. |
| `--projects` | string | Projects to format (comma/space delimited) |
Base of the current branch (usually main) | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
### exclude | `--version` | boolean | Show version number |
Type: `string`
Exclude certain projects from being processed
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### libs-and-apps
Type: `boolean`
Format only libraries and applications files.
### projects
Type: `string`
Projects to format (comma/space delimited)
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### version
Type: `boolean`
Show version number

View File

@ -17,68 +17,16 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### all | Option | Type | Description |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | Format all projects |
| `--base` | string | Base of the current branch (usually main) |
Format all projects | `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
### base | `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
Type: `string` | `--libs-and-apps` | boolean | Format only libraries and applications files. |
| `--projects` | string | Projects to format (comma/space delimited) |
Base of the current branch (usually main) | `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
### exclude | `--version` | boolean | Show version number |
Type: `string`
Exclude certain projects from being processed
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### libs-and-apps
Type: `boolean`
Format only libraries and applications files.
### projects
Type: `string`
Projects to format (comma/space delimited)
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### version
Type: `boolean`
Show version number

View File

@ -17,36 +17,10 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--interactive` | boolean | When false disables interactive input prompts for options. (Default: `true`) |
Show help | `--nxCloud` | boolean | Set up distributed caching with Nx Cloud. |
| `--useDotNxInstallation` | boolean | Initialize an Nx workspace setup in the .nx directory of the current repository. (Default: `false`) |
### interactive | `--version` | boolean | Show version number |
Type: `boolean`
Default: `true`
When false disables interactive input prompts for options.
### nxCloud
Type: `boolean`
Set up distributed caching with Nx Cloud.
### useDotNxInstallation
Type: `boolean`
Default: `false`
Initialize an Nx workspace setup in the .nx directory of the current repository.
### version
Type: `boolean`
Show version number

View File

@ -31,20 +31,8 @@ List the generators and executors available in the `@nx/web` plugin if it is ins
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | ---------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--plugin` | string | The name of an installed plugin to query |
Show help | `--version` | boolean | Show version number |
### plugin
Type: `string`
The name of an installed plugin to query
### version
Type: `boolean`
Show version number

View File

@ -17,26 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--nxCloudUrl` | string | The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app. |
Show help | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
### nxCloudUrl
Type: `string`
The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app.
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -17,20 +17,8 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | --------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Show help | `--version` | boolean | Show version number |
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -79,84 +79,17 @@ Create a dedicated commit for each successfully completed migration. You can cus
## Options ## Options
### commitPrefix | Option | Type | Description |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
Type: `string` | `--commitPrefix` | string | Commit prefix to apply to the commit for each migration, when --create-commits is enabled (Default: `chore: [nx migration] `) |
| `--createCommits` | boolean | Automatically create a git commit after each migration runs (Default: `false`) |
Default: `chore: [nx migration] ` | `--excludeAppliedMigrations` | boolean | Exclude migrations that should have been applied on previous updates. To be used with --from (Default: `false`) |
| `--from` | string | Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nx/react@16.0.0,@nx/js@16.0.0") |
Commit prefix to apply to the commit for each migration, when --create-commits is enabled | `--help` | boolean | Show help |
| `--ifExists` | boolean | Run migrations only if the migrations file exists, if not continues successfully (Default: `false`) |
### createCommits | `--interactive` | boolean | Enable prompts to confirm whether to collect optional package updates and migrations (Default: `false`) |
| `--packageAndVersion` | string | The target package and version (e.g, @nx/workspace@16.0.0) |
Type: `boolean` | `--runMigrations` | string | Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json) |
| `--to` | string | Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/react@16.0.0,@nx/js@16.0.0") |
Default: `false` | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Automatically create a git commit after each migration runs
### excludeAppliedMigrations
Type: `boolean`
Default: `false`
Exclude migrations that should have been applied on previous updates. To be used with --from
### from
Type: `string`
Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nx/react@16.0.0,@nx/js@16.0.0")
### help
Type: `boolean`
Show help
### ifExists
Type: `boolean`
Default: `false`
Run migrations only if the migrations file exists, if not continues successfully
### interactive
Type: `boolean`
Default: `false`
Enable prompts to confirm whether to collect optional package updates and migrations
### packageAndVersion
Type: `string`
The target package and version (e.g, @nx/workspace@16.0.0)
### runMigrations
Type: `string`
Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json)
### to
Type: `string`
Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/react@16.0.0,@nx/js@16.0.0")
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -15,51 +15,17 @@ nx release
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Shared Options ## Options
### dry-run | Shared Option | Type | Description |
| --------------- | ------- | ---------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--dry-run` | boolean | Preview the changes without updating files/creating releases (Default: `false`) |
| `--groups` | string | One or more release groups to target with the current command. |
Default: `false` | `--help` | boolean | Show help |
| `--printConfig` | string | Print the resolved nx release configuration that would be used for the current command and then exit |
Preview the changes without updating files/creating releases | `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns) |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
### groups | `--version` | boolean | Show version number |
Type: `string`
One or more release groups to target with the current command.
### help
Type: `boolean`
Show help
### printConfig
Type: `string`
Print the resolved nx release configuration that would be used for the current command and then exit
### projects
Type: `string`
Projects to run. (comma/space delimited project names and/or patterns)
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number
## Subcommands ## Subcommands
@ -71,43 +37,16 @@ Create a version and release for the workspace, generate a changelog, and option
nx release [specifier] nx release [specifier]
``` ```
#### Options ## Options
##### first-release | Option | Type | Description |
| ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
| `--help` | boolean | Show help |
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. | `--skip-publish` | boolean | Skip publishing by automatically answering no to the confirmation prompt for publishing |
| `--specifier` | string | Exact version or semver keyword to apply to the selected release group. |
##### help | `--version` | boolean | Show version number |
| `--yes` | boolean | Automatically answer yes to the confirmation prompt for publishing |
Type: `boolean`
Show help
##### skip-publish
Type: `boolean`
Skip publishing by automatically answering no to the confirmation prompt for publishing
##### specifier
Type: `string`
Exact version or semver keyword to apply to the selected release group.
##### version
Type: `boolean`
Show version number
##### yes
Type: `boolean`
Automatically answer yes to the confirmation prompt for publishing
### version ### version
@ -117,79 +56,22 @@ Create a version and release for one or more applications and libraries
nx release version [specifier] nx release version [specifier]
``` ```
#### Options ## Options
##### first-release | Option | Type | Description |
| ---------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
| `--git-commit` | boolean | Whether or not to automatically commit the changes made by this command |
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. | `--git-commit-args` | string | Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes |
| `--git-commit-message` | string | Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases. |
##### git-commit | `--git-tag` | boolean | Whether or not to automatically tag the changes made by this command |
| `--git-tag-args` | string | Additional arguments to pass to the `git tag` command invoked behind the scenes |
Type: `boolean` | `--git-tag-message` | string | Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself. |
| `--help` | boolean | Show help |
Whether or not to automatically commit the changes made by this command | `--preid` | string | The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor (Default: ``) |
| `--specifier` | string | Exact version or semver keyword to apply to the selected release group. |
##### git-commit-args | `--stage-changes` | boolean | Whether or not to stage the changes made by this command. Always treated as true if git-commit is true. |
| `--version` | boolean | Show version number |
Type: `string`
Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes
##### git-commit-message
Type: `string`
Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases.
##### git-tag
Type: `boolean`
Whether or not to automatically tag the changes made by this command
##### git-tag-args
Type: `string`
Additional arguments to pass to the `git tag` command invoked behind the scenes
##### git-tag-message
Type: `string`
Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself.
##### help
Type: `boolean`
Show help
##### preid
Type: `string`
The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor
##### specifier
Type: `string`
Exact version or semver keyword to apply to the selected release group.
##### stage-changes
Type: `boolean`
Whether or not to stage the changes made by this command. Always treated as true if git-commit is true.
##### version
Type: `boolean`
Show version number
### changelog ### changelog
@ -199,97 +81,24 @@ Generate a changelog for one or more projects, and optionally push to Github
nx release changelog [version] nx release changelog [version]
``` ```
#### Options ## Options
##### first-release | Option | Type | Description |
| ---------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
| `--from` | string | The git reference to use as the start of the changelog. If not set it will attempt to resolve the latest tag and use that |
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. | `--git-commit` | boolean | Whether or not to automatically commit the changes made by this command |
| `--git-commit-args` | string | Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes |
##### from | `--git-commit-message` | string | Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases. |
| `--git-remote` | string | Alternate git remote in the form {user}/{repo} on which to create the Github release (useful for testing) (Default: `origin`) |
Type: `string` | `--git-tag` | boolean | Whether or not to automatically tag the changes made by this command |
| `--git-tag-args` | string | Additional arguments to pass to the `git tag` command invoked behind the scenes |
The git reference to use as the start of the changelog. If not set it will attempt to resolve the latest tag and use that | `--git-tag-message` | string | Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself. |
| `--help` | boolean | Show help |
##### git-commit | `--interactive` | `all`, `workspace`, `projects` | Interactively modify changelog markdown contents in your code editor before applying the changes. You can set it to be interactive for all changelogs, or only the workspace level, or only the project level |
| `--stage-changes` | boolean | Whether or not to stage the changes made by this command. Always treated as true if git-commit is true. |
Type: `boolean` | `--to` | string | The git reference to use as the end of the changelog (Default: `HEAD`) |
| `--version` | string | The version to create a Github release and changelog for |
Whether or not to automatically commit the changes made by this command
##### git-commit-args
Type: `string`
Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes
##### git-commit-message
Type: `string`
Custom git commit message to use when committing the changes made by this command. {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases.
##### git-remote
Type: `string`
Default: `origin`
Alternate git remote in the form {user}/{repo} on which to create the Github release (useful for testing)
##### git-tag
Type: `boolean`
Whether or not to automatically tag the changes made by this command
##### git-tag-args
Type: `string`
Additional arguments to pass to the `git tag` command invoked behind the scenes
##### git-tag-message
Type: `string`
Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself.
##### help
Type: `boolean`
Show help
##### interactive
Type: `string`
Choices: [all, workspace, projects]
Interactively modify changelog markdown contents in your code editor before applying the changes. You can set it to be interactive for all changelogs, or only the workspace level, or only the project level
##### stage-changes
Type: `boolean`
Whether or not to stage the changes made by this command. Always treated as true if git-commit is true.
##### to
Type: `string`
Default: `HEAD`
The git reference to use as the end of the changelog
##### version
Type: `string`
The version to create a Github release and changelog for
### publish ### publish
@ -299,131 +108,25 @@ Publish a versioned project to a registry
nx release publish nx release publish
``` ```
#### Options ## Options
##### all | Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | [deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. (Default: `true`) |
| `--exclude` | string | Exclude certain projects from being processed |
Default: `true` | `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--first-release` | boolean | Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running. |
[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. | `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--help` | boolean | Show help |
##### exclude | `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
Type: `string` | `--otp` | number | A one-time password for publishing to a registry that requires 2FA |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Exclude certain projects from being processed | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns) |
##### excludeTaskDependencies | `--registry` | string | The registry to publish to |
| `--runner` | string | This is the name of the tasks runner configured in nx.json |
Type: `boolean` | `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
| `--tag` | string | The distribution tag to apply to the published package |
Default: `false` | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Skips running dependent tasks first
##### first-release
Type: `boolean`
Indicates that this is the first release for the selected release group. If the current version cannot be determined as usual, the version on disk will be used as a fallback. This is useful when using git or the registry to determine the current version of packages, since those sources are only available after the first release. Also indicates that changelog generation should not assume a previous git tag exists and that publishing should not check for the existence of the package before running.
##### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
##### help
Type: `boolean`
Show help
##### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
##### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
##### otp
Type: `number`
A one-time password for publishing to a registry that requires 2FA
##### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
##### parallel
Type: `string`
Max number of parallel processes [default is 3]
##### projects
Type: `string`
Projects to run. (comma/space delimited project names and/or patterns)
##### registry
Type: `string`
The registry to publish to
##### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
##### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
##### tag
Type: `string`
The distribution tag to apply to the published package
##### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
##### version
Type: `boolean`
Show version number

View File

@ -34,20 +34,8 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options ## Options
### help | Option | Type | Description |
| ----------- | ------- | --------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Show help | `--version` | boolean | Show version number |
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -14,3 +14,8 @@ nx report
``` ```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Options
| Option | Type | Description |
| ------ | ---- | ----------- |

View File

@ -43,38 +43,11 @@ Clears the workspace data directory. Used by Nx to store cached data about the c
## Options ## Options
### help | Option | Type | Description |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--onlyCache` | boolean | Clears the Nx cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache. |
Show help | `--onlyCloud` | boolean | Resets the Nx Cloud client. NOTE: Does not clear the remote cache. |
| `--onlyDaemon` | boolean | Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run. |
### onlyCache | `--onlyWorkspaceData` | boolean | Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc) |
| `--version` | boolean | Show version number |
Type: `boolean`
Clears the Nx cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache.
### onlyCloud
Type: `boolean`
Resets the Nx Cloud client. NOTE: Does not clear the remote cache.
### onlyDaemon
Type: `boolean`
Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run.
### onlyWorkspaceData
Type: `boolean`
Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc)
### version
Type: `boolean`
Show version number

View File

@ -91,125 +91,22 @@ Print the task graph to the console:
## Options ## Options
### all | Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | [deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. (Default: `true`) |
| `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
Default: `true` | `--configuration` | string | This is the configuration to use when performing tasks on projects |
| `--exclude` | string | Exclude certain projects from being processed |
[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. | `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
### batch | `--help` | boolean | Show help |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
Type: `boolean` | `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Default: `false` | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns) |
Run task(s) in batches for executors which support batches | `--runner` | string | This is the name of the tasks runner configured in nx.json |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
### configuration | `--targets` | string | Tasks to run for affected projects |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Type: `string` | `--version` | boolean | Show version number |
This is the configuration to use when performing tasks on projects
### exclude
Type: `string`
Exclude certain projects from being processed
### excludeTaskDependencies
Type: `boolean`
Default: `false`
Skips running dependent tasks first
### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
### help
Type: `boolean`
Show help
### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
### parallel
Type: `string`
Max number of parallel processes [default is 3]
### projects
Type: `string`
Projects to run. (comma/space delimited project names and/or patterns)
### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
### targets
Type: `string`
Tasks to run for affected projects
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -67,105 +67,19 @@ Run's a target named build:test for the myapp project. Note the quotes around th
## Options ## Options
### batch | Option | Type | Description |
| --------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects |
Default: `false` | `--exclude` | string | Exclude certain projects from being processed |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
Run task(s) in batches for executors which support batches | `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
### configuration | `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes`, `compact` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
Type: `string` | `--parallel` | string | Max number of parallel processes [default is 3] |
| `--project` | string | Target project |
This is the configuration to use when performing tasks on projects | `--runner` | string | This is the name of the tasks runner configured in nx.json |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
### exclude | `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
Type: `string`
Exclude certain projects from being processed
### excludeTaskDependencies
Type: `boolean`
Default: `false`
Skips running dependent tasks first
### graph
Type: `string`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal.
### nxBail
Type: `boolean`
Default: `false`
Stop command execution after the first failed task
### nxIgnoreCycles
Type: `boolean`
Default: `false`
Ignore cycles in the task graph
### output-style
Type: `string`
Choices: [dynamic, static, stream, stream-without-prefixes, compact]
Defines how Nx emits outputs tasks logs
| option | description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
### parallel
Type: `string`
Max number of parallel processes [default is 3]
### project
Type: `string`
Target project
### runner
Type: `string`
This is the name of the tasks runner configured in nx.json
### skipNxCache
Type: `boolean`
Default: `false`
Rerun the tasks even when the results are available in the cache
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
Show version number

View File

@ -83,25 +83,13 @@ Opens a web browser to explore the configuration of "my-app":
nx show project my-app --web nx show project my-app --web
``` ```
## Shared Options ## Options
### help | Shared Option | Type | Description |
| ------------- | ------- | ------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--json` | boolean | Output JSON |
Show help | `--version` | boolean | Show version number |
### json
Type: `boolean`
Output JSON
### version
Type: `boolean`
Show version number
## Subcommands ## Subcommands
@ -113,93 +101,24 @@ Show a list of projects in the workspace
nx show projects nx show projects
``` ```
#### Options ## Options
##### affected | Option | Type | Description |
| --------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
Type: `boolean` | `--affected` | boolean | Show only affected projects |
| `--base` | string | Base of the current branch (usually main) |
Show only affected projects | `--exclude` | string | Exclude certain projects from being processed |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
##### base | `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
Type: `string` | `--projects` | string | Show only projects that match a given pattern. |
| `--sep` | string | Outputs projects with the specified seperator |
Base of the current branch (usually main) | `--type` | `app`, `lib`, `e2e` | Select only projects of the given type |
| `--uncommitted` | boolean | Uncommitted changes |
##### exclude | `--untracked` | boolean | Untracked changes |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
Type: `string` | `--version` | boolean | Show version number |
| `--withTarget` | string | Show only projects that have a specific target |
Exclude certain projects from being processed
##### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
##### head
Type: `string`
Latest commit of the current branch (usually HEAD)
##### help
Type: `boolean`
Show help
##### projects
Type: `string`
Show only projects that match a given pattern.
##### sep
Type: `string`
Outputs projects with the specified seperator
##### type
Type: `string`
Choices: [app, lib, e2e]
Select only projects of the given type
##### uncommitted
Type: `boolean`
Uncommitted changes
##### untracked
Type: `boolean`
Untracked changes
##### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
##### version
Type: `boolean`
Show version number
##### withTarget
Type: `string`
Show only projects that have a specific target
### project ### project
@ -209,40 +128,13 @@ Shows resolved project configuration for a given project.
nx show project <projectName> nx show project <projectName>
``` ```
#### Options ## Options
##### help | Option | Type | Description |
| --------------- | ------- | --------------------------------------------------------------------- |
Type: `boolean` | `--help` | boolean | Show help |
| `--open` | boolean | Set to false to prevent the browser from opening when using --web |
Show help | `--projectName` | string | Which project should be viewed? |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
##### open | `--version` | boolean | Show version number |
| `--web` | boolean | Show project details in the browser. (default when interactive) |
Type: `boolean`
Set to false to prevent the browser from opening when using --web
##### projectName
Type: `string`
Which project should be viewed?
##### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
##### version
Type: `boolean`
Show version number
##### web
Type: `boolean`
Show project details in the browser. (default when interactive)

View File

@ -14,3 +14,8 @@ nx view-logs
``` ```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Options
| Option | Type | Description |
| ------ | ---- | ----------- |

View File

@ -37,38 +37,11 @@ Watch all projects (including newly created projects) in the workspace:
## Options ## Options
### all | Option | Type | Description |
| ---------------------------- | ------- | --------------------------------------------------------------------------- |
Type: `boolean` | `--all` | boolean | Watch all projects. |
| `--help` | boolean | Show help |
Watch all projects. | `--includeDependentProjects` | boolean | When watching selected projects, include dependent projects as well. |
| `--projects` | string | Projects to watch (comma/space delimited). |
### help | `--verbose` | boolean | Run watch mode in verbose mode, where commands are logged before execution. |
| `--version` | boolean | Show version number |
Type: `boolean`
Show help
### includeDependentProjects
Type: `boolean`
When watching selected projects, include dependent projects as well.
### projects
Type: `string`
Projects to watch (comma/space delimited).
### verbose
Type: `boolean`
Run watch mode in verbose mode, where commands are logged before execution.
### version
Type: `boolean`
Show version number

View File

@ -1224,10 +1224,8 @@
"itemList": [ "itemList": [
{ {
"name": "Commands", "name": "Commands",
"id": "commands", "id": "nx-commands",
"file": "", "file": "shared/reference/commands"
"path": "/nx-api/nx",
"isExternal": true
}, },
{ {
"name": "Nx Configuration", "name": "Nx Configuration",

View File

@ -0,0 +1,319 @@
# Nx Commands
The Nx CLI provides many commands. They are organized here into commands that:
- [Modify Code](#modify-code)
- [Run Tasks](#run-tasks)
- [Display Information](#display-information)
There is also a section for separate commands that can [create a new Nx workspace](#create-commands) for you.
{% callout type="note" title="Parsing Nx Commands" %}
If the command that you pass to Nx is not one of the keywords listed below, it will try to interpret the command as if it were a task. So Nx will parse your command in the following ways and execute the first syntax that is valid.
1. `nx [built-in-command] [...arguments]`
2. `nx [task-name-for-root-project] [...arguments]`
3. `nx [task-name] [project-name] [...arguments]`
{% /callout %}
## Modify Code
These commands modify your codebase in some way.
### init
Adds Nx to any type of workspace. It installs nx, creates an `nx.json` configuration file and optionally sets up remote caching.
```shell
nx init
```
{% cards cols="2" mdCols="4" smCols="2" %}
{% link-card title="nx init" type="API Reference" url="/nx-api/nx/documents/init" /%}
{% link-card title="Add to Existing Monorepo" type="Recipe" url="/recipes/adopting-nx/adding-to-monorepo" /%}
{% link-card title="Add to Any Project" type="Recipe" url="/recipes/adopting-nx/adding-to-existing-project" /%}
{% link-card title="Migrate from Angular CLI" type="Recipe" url="/recipes/angular/migration/angular" /%}
{% /cards %}
### add
Install a plugin and initialize it.
```shell
nx add my-plugin
```
{% cards %}
{% link-card title="nx add" type="API Reference" url="/nx-api/nx/documents/add" /%}
{% link-card title="Plugin Registry" type="Reference" url="/plugin-registry" /%}
{% /cards %}
### generate
Runs a generator that creates and/or modifies files based on a generator from a plugin.
```shell
nx generate @nx/react:component my-component
```
{% cards %}
{% link-card title="nx generate" type="API Reference" url="/nx-api/nx/documents/generate" /%}
{% link-card title="Generate Code" type="Feature" url="/features/generate-code" /%}
{% /cards %}
### migrate
Creates a migrations file or runs migrations from the migrations file.
```shell
nx migrate latest
nx migrate --run-migrations
```
{% cards %}
{% link-card title="nx migrate" type="API Reference" url="/nx-api/nx/documents/migrate" /%}
{% link-card title="Automate Updating Dependencies" type="Feature" url="/features/automate-updating-dependencies" /%}
{% /cards %}
### repair
Repair any configuration that is no longer supported by Nx.
Specifically, this will run every migration within the nx package against the current repository. Doing so should fix any configuration details left behind if the repository was previously updated to a new Nx version without using nx migrate.
If your repository has only ever updated to newer versions of Nx with nx migrate, running nx repair should do nothing.
```shell
nx repair
```
{% cards %}
{% link-card title="nx repair" type="API Reference" url="/nx-api/nx/documents/repair" /%}
{% /cards %}
### connect
Connect an Nx workspace to Nx Cloud
```shell
nx connect
```
{% cards %}
{% link-card title="nx connect" type="API Reference" url="/nx-api/nx/documents/connect-to-nx-cloud" /%}
{% link-card title="Connect to Nx Cloud" type="Feature" url="/ci/intro/connect-to-nx-cloud" /%}
{% /cards %}
### format
Overwrite un-formatted files or check for un-formatted files
```shell
nx format
nx format:check
```
{% cards %}
{% link-card title="nx format" type="API Reference" url="/nx-api/nx/documents/format-write" /%}
{% link-card title="nx format:check" type="API Reference" url="/nx-api/nx/documents/format-check" /%}
{% /cards %}
## Run Tasks
These commands run tasks on your code.
### run
Run a target for a project
```shell
nx run my-app:build
nx build my-app
```
{% cards %}
{% link-card title="nx run" type="API Reference" url="/nx-api/nx/documents/run" /%}
{% link-card title="Run Tasks" type="Feature" url="/features/run-tasks" /%}
{% /cards %}
### run-many
Run target for multiple listed projects
```shell
nx run-many --target=build
```
{% cards %}
{% link-card title="nx run-many" type="API Reference" url="/nx-api/nx/documents/run-many" /%}
{% link-card title="Run Tasks" type="Feature" url="/features/run-tasks" /%}
{% /cards %}
### affected
Run target for affected projects
```shell
nx affected --target=build
```
{% cards %}
{% link-card title="nx affected" type="API Reference" url="/nx-api/nx/documents/affected" /%}
{% link-card title="Run Only Tasks Affected by a PR" type="Feature" url="/ci/features/affected" /%}
{% /cards %}
### exec
Executes any command as if it was a target on the project
```json {% fileName="package.json" %}
{
"scripts": {
"build": "nx exec -- node ./my-custom-build.js"
}
}
```
{% cards %}
{% link-card title="nx exec" type="API Reference" url="/nx-api/nx/documents/exec" /%}
{% link-card title="Run Root Level NPM Scripts with Nx" type="Recipe" url="/recipes/running-tasks/root-level-scripts#run-rootlevel-npm-scripts-with-nx" /%}
{% /cards %}
### watch
Watch for changes within projects, and execute commands
```shell
nx watch --projects=assets -- nx build assets
```
{% cards %}
{% link-card title="nx watch" type="API Reference" url="/nx-api/nx/documents/watch" /%}
{% link-card title="Workspace Watching" type="Recipe" url="/recipes/running-tasks/workspace-watching" /%}
{% /cards %}
### release
Orchestrate versioning and publishing of applications and libraries
```shell
nx release version
nx release changelog
nx release publish
```
{% cards %}
{% link-card title="nx release" type="API Reference" url="/nx-api/nx/documents/release" /%}
{% link-card title="Manage Releases" type="Feature" url="/features/manage-releases" /%}
{% /cards %}
### reset
Clears cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.
```shell
nx reset
```
{% cards %}
{% link-card title="nx reset" type="API Reference" url="/nx-api/nx/documents/reset" /%}
{% /cards %}
## Display Information
### show
Show information about the workspace (e.g., list of projects)
```shell
nx show projects
nx show project my-app
```
{% cards %}
{% link-card title="nx show" type="API Reference" url="/nx-api/nx/documents/show" /%}
{% link-card title="Explore Projects in Your Workspace" type="Recipe" url="/features/explore-graph#explore-projects-in-your-workspace" /%}
{% /cards %}
### graph
Graph dependencies within workspace
```shell
nx graph
```
{% cards %}
{% link-card title="nx graph" type="API Reference" url="/nx-api/nx/documents/dep-graph" /%}
{% link-card title="Explore Your Workspace" type="Recipe" url="/features/explore-graph" /%}
{% /cards %}
### list
Lists installed plugins, capabilities of installed plugins and other available plugins.
```shell
nx list
nx list my-plugin
```
{% cards %}
{% link-card title="nx list" type="API Reference" url="/nx-api/nx/documents/list" /%}
{% /cards %}
### report
Reports useful version numbers to copy into the Nx issue template
```shell
nx report
```
{% cards %}
{% link-card title="nx report" type="API Reference" url="/nx-api/nx/documents/report" /%}
{% /cards %}
### daemon
Prints information about the Nx Daemon process or starts a daemon process
```shell
nx daemon
```
{% cards %}
{% link-card title="nx daemon" type="API Reference" url="/nx-api/nx/documents/daemon" /%}
{% link-card title="Nx Daemon" type="Concept" url="/concepts/nx-daemon" /%}
{% /cards %}
## Create Commands
### create-nx-workspace
Create a new Nx workspace
```shell
npx create-nx-workspace
```
{% cards %}
{% link-card title="create-nx-workspace" type="API Reference" url="/nx-api/nx/documents/create-nx-workspace" /%}
{% /cards %}
### create-nx-plugin
Create a new Nx workspace with a preset designed for writing an Nx plugin
```shell
npx create-nx-plugin
```
{% cards %}
{% link-card title="Extending Nx with Plugins" type="Concept" url="/extending-nx/intro/getting-started" /%}
{% /cards %}

View File

@ -195,6 +195,7 @@
- [Large Repo and Caching](/showcase/benchmarks/caching) - [Large Repo and Caching](/showcase/benchmarks/caching)
- [Large Repo and DTE](/showcase/benchmarks/dte) - [Large Repo and DTE](/showcase/benchmarks/dte)
- [Reference](/reference) - [Reference](/reference)
- [Commands](/reference/nx-commands)
- [Nx Configuration](/reference/nx-json) - [Nx Configuration](/reference/nx-json)
- [Project Configuration](/reference/project-configuration) - [Project Configuration](/reference/project-configuration)
- [Inputs and Named Inputs](/reference/inputs) - [Inputs and Named Inputs](/reference/inputs)

View File

@ -978,7 +978,7 @@ const latestRecipesRefactoring = {
'/recipes/module-federation/faster-builds': '/recipes/module-federation/faster-builds':
'/concepts/more-concepts/faster-builds-with-module-federation', '/concepts/more-concepts/faster-builds-with-module-federation',
'/reference/commands': '/packages/nx', '/reference/commands': '/reference/nx-commands',
}; };
const coreFeatureAndConceptsRefactoring = { const coreFeatureAndConceptsRefactoring = {

View File

@ -132,7 +132,9 @@ export function LinkCard({
{icon && frameworkIcons[icon as Framework]?.image} {icon && frameworkIcons[icon as Framework]?.image}
</div> </div>
)} )}
<div className={cx('pt-4', { 'pt-2': appearance === 'small' })}> <div
className={cx({ 'pt-4': !!icon }, { 'pt-2': appearance === 'small' })}
>
{appearance === 'small' && type ? null : ( {appearance === 'small' && type ? null : (
<div className="mb-1 text-xs font-medium uppercase text-slate-600 dark:text-slate-300"> <div className="mb-1 text-xs font-medium uppercase text-slate-600 dark:text-slate-300">
{type} {type}

View File

@ -266,15 +266,7 @@ export function withOutputStyleOption(
] ]
) { ) {
return yargs.option('output-style', { return yargs.option('output-style', {
describe: `Defines how Nx emits outputs tasks logs describe: `Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output.`,
| option | description |
| --- | --- |
| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. |
| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. |
| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr |
| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output |
`,
type: 'string', type: 'string',
choices, choices,
}); });

View File

@ -1,10 +1,12 @@
import * as chalk from 'chalk'; import * as chalk from 'chalk';
import { h2, table } from 'markdown-factory';
import { import {
generateMarkdownFile, generateMarkdownFile,
generateOptionsMarkdown, generateOptionsMarkdown,
getCommands, getCommands,
parseCommand, parseCommand,
ParsedCommand, ParsedCommand,
sortAlphabeticallyFunction,
} from '../utils'; } from '../utils';
const importFresh = require('import-fresh'); const importFresh = require('import-fresh');
@ -58,9 +60,67 @@ Install \`create-nx-workspace\` globally to invoke the command directly, or use
`; `;
template += generateOptionsMarkdown(command); template += generateOptionsMarkdown(command);
template += '\n\n' + generatePresetsMarkdown();
return { return {
name: command.name, name: command.name,
template, template,
}; };
} }
function generatePresetsMarkdown(): string {
const { Preset } = importFresh(
'../../../packages/create-nx-workspace/src/utils/preset/preset'
);
const presets = (Object.values(Preset) as string[]).sort(
sortAlphabeticallyFunction
);
const presetDescriptions = {
[Preset.Apps]:
'A basic integrated style repository starting with no projects',
[Preset.NPM]:
'A repository configured with NPM Workspaces using a package-based style.',
[Preset.TS]:
'A basic integrated style repository starting with TypeScript configured but no projects',
[Preset.WebComponents]:
'An integrated style repository with an application configured to use web components',
[Preset.AngularMonorepo]: 'An Angular monorepo',
[Preset.AngularStandalone]: 'A single Angular application',
[Preset.ReactMonorepo]: 'A React monorepo',
[Preset.ReactStandalone]: 'A single React application',
[Preset.VueMonorepo]: 'A Vue monorepo',
[Preset.VueStandalone]: 'A single Vue application',
[Preset.Nuxt]: 'A Nuxt monorepo',
[Preset.NuxtStandalone]: 'A single Nuxt application',
[Preset.NextJs]: 'A Next monorepo',
[Preset.NextJsStandalone]: 'A single Next application',
[Preset.RemixMonorepo]: 'A Remix monorepo',
[Preset.RemixStandalone]: 'A single Remix application',
[Preset.ReactNative]: 'A monorepo with a React Native application',
[Preset.Expo]: 'A monorepo with an Expo application',
[Preset.Nest]: 'A monorepo with a Nest application',
[Preset.Express]: 'A monorepo with an Express application',
[Preset.React]:
'Allows you to choose between the react-standalone or react-monorepo presets',
[Preset.Vue]:
'Allows you to choose between the vue-standalone or vue-monorepo presets',
[Preset.Angular]:
'Allows you to choose between the angular-standalone or angular-monorepo presets',
[Preset.NodeStandalone]: 'A single Node application',
[Preset.NodeMonorepo]: 'A Node monorepo',
[Preset.TsStandalone]: 'A single TypeScript application',
};
type FieldName = 'name' | 'description';
const items: Record<FieldName, string>[] = presets.map((preset) => ({
name: preset,
description: presetDescriptions[preset],
}));
const fields: { field: FieldName; label: string }[] = [
{ field: 'name', label: 'Preset' },
{ field: 'description', label: 'Description' },
];
return h2('Presets', table(items, fields));
}

View File

@ -1,9 +1,16 @@
import { MenuItem } from '@nx/nx-dev/models-menu';
import { outputFileSync } from 'fs-extra'; import { outputFileSync } from 'fs-extra';
import { bold, h, lines as mdLines, strikethrough } from 'markdown-factory'; import {
bold,
code,
h2,
lines as mdLines,
strikethrough,
table,
} from 'markdown-factory';
import { join } from 'path'; import { join } from 'path';
import { format, resolveConfig } from 'prettier'; import { format, resolveConfig } from 'prettier';
import { MenuItem } from '@nx/nx-dev/models-menu'; import { CommandModule } from 'yargs';
import yargs, { CommandModule } from 'yargs';
const stripAnsi = require('strip-ansi'); const stripAnsi = require('strip-ansi');
const importFresh = require('import-fresh'); const importFresh = require('import-fresh');
@ -236,41 +243,40 @@ export function generateOptionsMarkdown(
command: ParsedCommand, command: ParsedCommand,
extraHeadingLevels = 0 extraHeadingLevels = 0
): string { ): string {
const lines: string[] = []; type FieldName = 'name' | 'type' | 'description';
const items: Record<FieldName, string>[] = [];
const optionsField = command.subcommands?.length ? 'Shared Option' : 'Option';
const fields: { field: FieldName; label: string }[] = [
{ field: 'name', label: optionsField },
{ field: 'type', label: 'Type' },
{ field: 'description', label: 'Description' },
];
if (Array.isArray(command.options) && !!command.options.length) { if (Array.isArray(command.options) && !!command.options.length) {
lines.push(
h(
2 + extraHeadingLevels,
command.subcommands?.length ? 'Shared Options' : 'Options'
)
);
command.options command.options
.sort((a, b) => sortAlphabeticallyFunction(a.name, b.name)) .sort((a, b) => sortAlphabeticallyFunction(a.name, b.name))
.filter(({ hidden }) => !hidden) .filter(({ hidden }) => !hidden)
.forEach((option) => { .forEach((option) => {
lines.push( const name = option.deprecated
h( ? strikethrough(code('--' + option.name))
3 + extraHeadingLevels, : code('--' + option.name);
option.deprecated ? strikethrough(option.name) : option.name let description = formatDescription(
) option.description,
option.deprecated
); );
if (option.type !== undefined && option.type !== '') { let type = option.type;
lines.push(`Type: \`${option.type}\``);
}
if (option.choices !== undefined) { if (option.choices !== undefined) {
const choices = option.choices type = option.choices
.map((c: any) => JSON.stringify(c).replace(/"/g, '')) .map((c: any) => '`' + JSON.stringify(c).replace(/"/g, '') + '`')
.join(', '); .join(', ');
lines.push(`Choices: [${choices}]`);
} }
if (option.default !== undefined && option.default !== '') { if (option.default !== undefined) {
lines.push( description += ` (Default: \`${JSON.stringify(option.default).replace(
`Default: \`${JSON.stringify(option.default).replace(/"/g, '')}\`` /"/g,
); ''
)}\`)`;
} }
lines.push(formatDescription(option.description, option.deprecated)); items.push({ name, type, description });
}); });
} }
return mdLines(lines); return h2('Options', table(items, fields));
} }