create-better-react
v1.0.0
Published
CLI tool to scaffold a better-react project with optional features
Maintainers
Readme
create-better-react
CLI tool to scaffold a better-react project with optional features.
Installation
You can use this CLI directly with npx (no installation required):
npx create-better-react my-appOr install globally:
npm install -g create-better-reactUsage
Interactive Mode (Default)
npx create-better-react my-appThis will prompt you to select which features you want to include.
Quick Start with Defaults
npx create-better-react my-app -yMinimal Template
Create a project without optional features (Polar, Supabase, Testing):
npx create-better-react my-app --minimalCustom Feature Selection
# Without Polar
npx create-better-react my-app --no-polar
# Without Supabase
npx create-better-react my-app --no-supabase
# Without Testing
npx create-better-react my-app --no-testing
# Combine flags
npx create-better-react my-app --no-polar --no-testingOptions
| Option | Description |
|--------|-------------|
| -V, --version | Output version number |
| -y, --yes | Accept all defaults |
| --minimal | Create minimal template |
| --no-polar | Skip Polar integration |
| --no-supabase | Skip Supabase integration |
| --no-testing | Skip testing setup |
| -h, --help | Display help |
Optional Features
Polar
Payment and subscription management with Polar.sh.
Includes:
@polar-sh/checkout@polar-sh/sdksrc/lib/polar/- Client, hooks, and utilitiessupabase/functions/polar-webhook/- Webhook handler
Supabase
Database, Authentication, and Storage with Supabase.
Includes:
@supabase/supabase-jssrc/lib/supabase/- Client, hooks, and utilities
Testing
Test infrastructure with Vitest and Testing Library.
Includes:
vitest,@vitest/ui,@vitest/coverage-v8@testing-library/react,@testing-library/jest-dom,@testing-library/user-eventjsdomsrc/test/- Test setupvitest.config.ts- Vitest configuration
Development
For local development:
cd cli
pnpm install
pnpm build
# Test with local template
node dist/index.js my-app --local /path/to/better-reactPublishing
cd cli
pnpm build
npm publishLicense
MIT
