From f057637e65de25f1d677ea8a466f8f2a480d8269 Mon Sep 17 00:00:00 2001 From: Daniel Chen <305872926+daniel-chen-j@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:04:51 +0100 Subject: [PATCH] docs: align init flags with CLI help --- docs/commands.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/commands.md b/docs/commands.md index 18c9af230..1a734ffb8 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -57,12 +57,12 @@ Uses a custom template. Accepts following template sources: Example: ```sh -npx react-native-community/cli@latest init MyApp --template react-native-community/cli-custom-template -npx react-native-community/cli@latest init MyApp --template file:///Users/name/template-path -npx react-native-community/cli@latest init MyApp --template file:///Users/name/template-name-1.0.0.tgz -npx react-native-community/cli@latest init MyApp --template Esemesek/react-native-community/cli-new-template +npx @react-native-community/cli@latest init MyApp --template react-native-community/cli-custom-template +npx @react-native-community/cli@latest init MyApp --template file:///Users/name/template-path +npx @react-native-community/cli@latest init MyApp --template file:///Users/name/template-name-1.0.0.tgz +npx @react-native-community/cli@latest init MyApp --template Esemesek/react-native-community/cli-new-template # Use a specific version of the community template with the nightly release of React Native -npx react-native-community/cli@latest init MyApp --template @react-native-community/template0.74.0 --version nightly +npx @react-native-community/cli@latest init MyApp --template @react-native-community/template@0.74.0 --version nightly ``` A template is any directory or npm package that contains a `template.config.js` file in the root with the following type: @@ -102,7 +102,7 @@ Determine if CocoaPods should be installed when initializing a project. If set t #### `--pm ` -Use specific package manager to initialize the project. Available options: `yarn`, `npm`, `bun`. Default: `yarn` +Use specific package manager to initialize the project. Available options: `yarn`, `npm`, `bun`. Default: `npm` #### `--package-name ` @@ -111,13 +111,17 @@ Create project with custom package name for Android and bundle identifier for iO - contain at least two segments separated by dots, e.g. `com.example` - contain only alphanumeric characters and dots -#### `--skip-git-init ` +#### `--platform-name ` + +Name of an out-of-tree platform to use (for example `react-native-macos`). This flag is optional; out-of-tree platforms usually pass it automatically. + +#### `--skip-git-init` Skip git repository initialization. -#### `--replace-directory ` +#### `--replace-directory [boolean]` -Replaces the directory if it already exists +Replaces the directory if it already exists. #### `--yarn-config-options `