create-smarthive-app
v0.1.0
Published
Production-grade scaffolding CLI for Smarthive projects.
Readme
Smarthive CLI
shive is Smarthive’s internal project bootstrap CLI.
It is used to create company-standard web apps, mobile apps, backend APIs, and fullstack workspaces with approved architecture, auth foundations, database setup, and shared defaults already wired in.
Use this tool when starting a new project instead of creating apps manually.
Why We Use It
shive exists to make sure new projects start from the same baseline:
- consistent project structure
- approved auth and database patterns
- reusable workspace/package conventions
- standard starter pages and modules
- fewer hand-built one-off setups
The goal is not just speed. The goal is repeatability and internal engineering consistency.
What It Generates
- Web apps:
next,react,vite-react - Mobile apps:
expo - Backend APIs:
express,nest - Fullstack workspaces: web + api + shared packages
Recommended Usage
For most internal work, prefer a preset instead of building a stack manually.
Recommended commands:
shive init --preset next-better-auth-supabase
shive init --preset api-jwt-prisma
shive init --preset saas-dashboard
shive init --preset marketplace-workspaceUse manual flags only when you need to create a stack that does not match an existing preset.
Internal Presets
Core MVP Presets
next-better-auth-supabaseNext.js web starter with Better Auth and Supabase infrastructure.expo-supabaseExpo mobile starter with Supabase client and secure session storage.express-better-auth-supabaseExpress backend starter with Better Auth and Supabase-backed services.nest-better-auth-supabaseNestJS backend starter with Better Auth and Supabase-backed services.api-jwt-prismaExpress API starter with JWT auth and Prisma.fullstack-web-api-sharedFullstack workspace starter with web, api, shared, and types packages.
Domain-Oriented Presets
saas-dashboardSaaS-style web starter with auth pages, dashboard layout, and state/query defaults.marketplace-workspaceFullstack workspace baseline for marketplace-style products with shared package structure.
Quick Start
If the CLI is linked locally:
shive list
shive doctor
shive init --preset next-better-auth-supabaseIf you want to run it directly from the repo:
node --import tsx src/index.ts list
node --import tsx src/index.ts doctor
node --import tsx src/index.ts init --preset next-better-auth-supabaseTo link it locally during development:
pnpm install
pnpm build
npm linkCommands
shive list
Lists:
- supported frameworks
- supported features
- registered presets
Example:
shive listshive doctor
Runs local CLI diagnostics and reports:
- Node version
- platform
- current working directory
pnpmavailabilitygitavailability- missing template registrations
Example:
shive doctorshive init [type]
Creates a new project interactively or from direct flags.
Supported type values:
webmobileapifullstack
Examples:
shive init
shive init --preset next-better-auth-supabase --yes
shive init web --framework next --auth better-auth --db supabase-postgres --yes
shive init api --framework express --auth jwt --db postgres --orm prisma --migrate --yes
shive init fullstack --web --api --auth better-auth --db supabase-postgres --yesinit Flags
General:
--preset <preset>
--framework <framework>
--auth <auth>
--db <db>
--orm <orm>
--target-dir <dir>
--project-name <name>
--package-name <name>
--app-name <name>
--primary-color <color>
--database-url <url>
--yesInstall and git:
--install
--skip-install
--git
--skip-gitDatabase and migration flow:
--migrate
--no-migrate
--seed
--skip-dbFullstack app selection:
--web
--api
--mobileFeature flags:
--tailwind
--shadcn
--zustand
--tanstack-query
--auth-pages
--dashboard-layout
--docker
--swagger
--feature <feature...>Supported Values
Frameworks:
next
react
vite-react
expo
express
nestAuth providers:
better-auth
supabase
jwt
noneDatabase providers:
supabase-postgres
postgres
mysql
noneORM providers:
prisma
drizzle
raw-sql
noneFeatures:
better-auth
supabase
jwt-auth
prisma
drizzle
tailwind
shadcn
zustand
tanstack-query
dashboard-layout
auth-pages
docker
swaggerStandard Internal Workflows
Create a standard web starter:
shive init --preset next-better-auth-supabase --yesCreate a SaaS-style starter:
shive init --preset saas-dashboard --yesCreate a JWT API starter:
shive init --preset api-jwt-prisma --yesCreate a marketplace workspace baseline:
shive init --preset marketplace-workspace --yesCreate a custom stack manually:
shive init api \
--framework express \
--auth jwt \
--db postgres \
--orm prisma \
--migrate \
--yesInternal Contribution Workflow
When updating this CLI:
- Add or update templates under
templates/. - Register frameworks, features, or presets in
src/config/. - Keep the generator flow deterministic and config-driven.
- Add or update tests for the new behavior.
- Run:
pnpm lint
pnpm test
pnpm buildOwnership
This repository should be treated as internal developer platform infrastructure.
Changes should prioritize:
- maintainability
- predictable project generation
- backward-safe additions to presets/features
- preserving company standards across generated projects
Development
pnpm install
pnpm lint
pnpm test
pnpm build