@varunindiit/create-rn-starter
v1.0.1
Published
Production-ready React Native CLI starter: React Navigation auth flow, bottom tabs, Redux Toolkit, theming, i18n, SVG support, MMKV storage, API/service layer and reusable components. Scaffolds a fully renamed Android + iOS project in seconds.
Maintainers
Readme
create-rn-starter
Scaffold a production-ready React Native CLI app — fully renamed for Android & iOS — in seconds.
npx @varunindiit/create-rn-starterThe CLI asks for a project name and a bundle/package identifier, then generates a working project: it copies the template, renames every reference across JS / Android / iOS, sets up the environment files, installs dependencies (and CocoaPods on macOS) and initialises git.
# interactive
npx @varunindiit/create-rn-starter
# non-interactive
npx @varunindiit/create-rn-starter awesome-app --bundle-id com.acme.awesome -yWhat you get
A real, runnable RN 0.85 project (New Architecture) with:
- Navigation — React Navigation native-stack + bottom tabs, with a
declarative auth guard (
StackNavigation) that swaps the Auth and App trees off a single redux flag. - State — Redux Toolkit store with
auth/app/userProfileslices. - Dummy auth flow — Login → Bottom Tabs (Home · Profile) → Logout, persisted with MMKV so the session survives restarts.
- Theming — centralised
theme(colours, spacing, fonts) +react-native-size-matters. - i18n —
i18next/react-i18nextwithen/frresources and language storage. - SVG —
react-native-svg+react-native-svg-transformerwired in Metro. - API/services —
axiosclient,Configservice, storage and places helpers. - Components — a sizeable reusable library (buttons, inputs, sheets, headers, pickers, common UI…).
- Native setup — splash screen, fonts/assets linking, permissions, and a fully configured Android + iOS project.
CLI options
| Flag | Description |
| ------------------- | ---------------------------------------------------- |
| [project-name] | Positional. Skips the name prompt. |
| --bundle-id <id> | Reverse-DNS identifier, e.g. com.acme.myapp. |
| --no-install | Skip JS dependency installation. |
| --no-pods | Skip iOS CocoaPods (macOS only). |
| --no-git | Skip git initialisation. |
| -y, --yes | Accept all defaults, no prompts. |
| -h, --help | Show help. |
| -v, --version | Show version. |
How the rename works
The bundled template/ is a genuine working app, so every name appears as a
concrete literal. On scaffold the CLI:
- Token pass — rewrites file contents, swapping the source identifiers
(
AwesomeProject,com.awesomeproject, the default Xcode bundle id …) for your values across all text files (TS/JS, gradle, Kotlin, Swift, plist, pbxproj, schemes, Podfile…). - Native folder moves — renames
ios/<App>,ios/<App>.xcodeproj,ios/<App>.xcworkspaceand the shared scheme, and moves the Androidjava/com/awesomeprojectpackage directory to your bundle's path. - Targeted edits — sets
package.jsonname (npm slug),app.json, Androidstrings.xmlapp_nameand iOSCFBundleDisplayNameto the human display name.
Architecture
bin/index.js CLI entry: arg parsing, prompts, orchestration
lib/utils.js logging + name normalisation (pascal/slug/lower/display/bundle)
lib/prompt.js zero-dependency readline prompts
lib/rename.js RN rename engine: token pass + native folder moves + targeted edits
lib/scaffold.js copy tree, env files, dependency/pod install, git init
template/ a full, working RN CLI app (the thing that gets cloned)
scripts/smoke.js end-to-end test: scaffold to a temp dir and assert the renameThe package has zero runtime dependencies — only Node's standard library.
Development
npm run lint # node --check every script
npm test # scaffold into a temp dir and assert JS/Android/iOS renameLicense
MIT
