diff --git a/docs/generated/cli/list.md b/docs/generated/cli/list.md index 79d632710a6d2..e45179f064c0d 100644 --- a/docs/generated/cli/list.md +++ b/docs/generated/cli/list.md @@ -10,7 +10,7 @@ Lists installed plugins, capabilities of installed plugins and other available p ## Usage ```bash -nx list +nx list [plugin] ``` [Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`. diff --git a/docs/generated/cli/migrate.md b/docs/generated/cli/migrate.md index 676592ea0017b..d079468b5ed1a 100644 --- a/docs/generated/cli/migrate.md +++ b/docs/generated/cli/migrate.md @@ -16,7 +16,7 @@ Creates a migrations file or runs migrations from the migrations file. ## Usage ```bash -nx migrate +nx migrate [packageAndVersion] ``` [Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`. diff --git a/docs/generated/cli/workspace-generator.md b/docs/generated/cli/workspace-generator.md index fb0368410ba6e..a788337885d5b 100644 --- a/docs/generated/cli/workspace-generator.md +++ b/docs/generated/cli/workspace-generator.md @@ -10,7 +10,7 @@ Runs a workspace generator from the tools/generators directory ## Usage ```bash -nx workspace-generator +nx workspace-generator [name] ``` [Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`. diff --git a/docs/generated/cli/workspace-lint.md b/docs/generated/cli/workspace-lint.md index 1695599de2346..72c5a819e79b9 100644 --- a/docs/generated/cli/workspace-lint.md +++ b/docs/generated/cli/workspace-lint.md @@ -10,7 +10,7 @@ Lint nx specific workspace files (nx.json, workspace.json) ## Usage ```bash -nx workspace-lint +nx workspace-lint [files..] ``` [Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`. diff --git a/scripts/documentation/generate-cli-data.ts b/scripts/documentation/generate-cli-data.ts index d40616f66e246..267fbe6182ca1 100644 --- a/scripts/documentation/generate-cli-data.ts +++ b/scripts/documentation/generate-cli-data.ts @@ -33,6 +33,7 @@ interface ParsedCommandOption { interface ParsedCommand { name: string; + commandString: string; description: string; options?: Array; } @@ -80,7 +81,11 @@ export async function generateCLIDocumentation() { command.builder.apply ) ) { - return { name, description: command.description }; + return { + name, + commandString: command.original, + description: command.description, + }; } // Show all the options we can get from yargs const builder = await command.builder( @@ -92,6 +97,7 @@ export async function generateCLIDocumentation() { return { name, description: command.description, + commandString: command.original, options: Object.keys(builderDescriptions).map((key) => ({ name: key, @@ -117,7 +123,7 @@ ${command.description} ## Usage \`\`\`bash -nx ${command.name} +nx ${command.commandString} \`\`\` [Install \`nx\` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using \`nx\`, or use \`npx nx\`, \`yarn nx\`, or \`pnpx nx\`.\n`;