create-nobi-react-app
v1.1.4
Published
Create a React app from Nobi template
Readme
create-nobi-react-app
A simple CLI to bootstrap a React application from the tuyenpham2502/react-base template.
Install
You can use it directly with npx (recommended), or install globally.
npx create-nobi-react-app <project-name>or:
npm install -g create-nobi-react-app
create-nobi-react-app <project-name>Usage
npx create-nobi-react-app my-appWhat happens:
Environment checks
- Verifies Node.js >= 18
- Verifies Git is installed
Clone template
- Tries to clone via SSH:
[email protected]:tuyenpham2502/react-base.git - If SSH fails and
gh(GitHub CLI) is available, tries:gh repo clone tuyenpham2502/react-base my-app -- --depth=1 - Falls back to HTTPS:
https://github.com/tuyenpham2502/react-base.git
- Tries to clone via SSH:
Project setup
- Removes the original
.gitfolder - Updates
package.jsonnamefield to<project-name> - Detects the template's package manager lockfile (
pnpm-lock.yaml,yarn.lock,package-lock.json) - Asks you which package manager to use (
npm,yarn,pnpm)- In non-interactive environments, it automatically picks the detected one or falls back to
npm
- In non-interactive environments, it automatically picks the detected one or falls back to
- Removes the original
Install dependencies
- Runs the appropriate install command:
pnpm installoryarnornpm install
- Uses Corepack for
pnpm/yarnif available (prepares latest stable versions)
- Runs the appropriate install command:
Initialize a new Git repository
- Runs:
git initgit add .git commit -m "chore: init from template"
- If Git identity is not configured, this step may fail silently; you can initialize Git manually.
- Runs:
After creation
Inside the newly created project:
cd <project-name>
npm run dev # or yarn dev / pnpm dev, depending on what you choseRequirements
- Node.js: >= 18
- Git installed and available in
PATH - Access to the GitHub repository
tuyenpham2502/react-base- If you cannot clone the repository, the CLI will show an error and ask you to contact support.
Troubleshooting & Support
If cloning the template repository fails or you need access:
- Please contact: [email protected] to get access or further support.
