
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
create-better-t-stack
Advanced tools
A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations
A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations

Run without installing globally:
# Using bun (recommended)
bun create better-t-stack@latest
# Using pnpm
pnpm create better-t-stack@latest
# Using npm
npx create-better-t-stack@latest
Follow the prompts to configure your project or use the --yes flag for defaults.
| Category | Options |
|---|---|
| TypeScript | End-to-end type safety across all parts of your application |
| Frontend | • React with TanStack Router • React with React Router • React with TanStack Start (SSR) • Next.js • SvelteKit • Nuxt (Vue) • SolidJS • Astro • React Native bare Expo • React Native with NativeWind (via Expo) • React Native with Unistyles (via Expo) • None |
| Backend | • Hono • Express • Elysia • Fastify • Self (fullstack inside the web app) • Convex • None |
| API Layer | • tRPC (type-safe APIs) • oRPC (OpenAPI-compatible type-safe APIs) • None |
| Runtime | • Bun • Node.js • Cloudflare Workers • None |
| Database | • SQLite • PostgreSQL • MySQL • MongoDB • None |
| ORM | • Drizzle (TypeScript-first) • Prisma (feature-rich) • Mongoose (for MongoDB) • None |
| Database Setup | • Turso (SQLite) • Cloudflare D1 (SQLite) • Neon (PostgreSQL) • Supabase (PostgreSQL) • Prisma Postgres • MongoDB Atlas • None (manual setup) |
| Authentication | • Better Auth • Clerk |
| Styling | Tailwind CSS with a shared shadcn/ui package for React web apps |
| Addons | • PWA support • Tauri (desktop applications) • Electrobun (lightweight desktop shell) • Starlight and Fumadocs (documentation sites) • Biome, Oxlint, Ultracite (linting and formatting) • Lefthook, Husky (Git hooks) • MCP, Skills (agent tooling) • OpenTUI, WXT (platform extensions) • Turborepo or Nx (monorepo orchestration) |
| Examples | • Todo app • AI Chat interface (using Vercel AI SDK) |
| Developer Experience | • Automatic Git initialization • Package manager choice (npm, pnpm, bun) • Automatic dependency installation |
Usage: create-better-t-stack [project-directory] [options]
Options:
-V, --version Output the version number
-y, --yes Use default configuration
--template <type> Use a template (mern, pern, t3, uniwind, none)
--database <type> Database type (none, sqlite, postgres, mysql, mongodb)
--orm <type> ORM type (none, drizzle, prisma, mongoose)
--dry-run Validate configuration without writing files
--auth <provider> Authentication (better-auth, clerk, none)
--payments <provider> Payments provider (polar, none)
--frontend <types...> Frontend types (tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, astro, native-bare, native-uniwind, native-unistyles, none)
--addons <types...> Additional addons (pwa, tauri, electrobun, starlight, biome, lefthook, husky, mcp, turborepo, nx, fumadocs, ultracite, oxlint, opentui, wxt, skills, none)
--examples <types...> Examples to include (todo, ai, none)
--git Initialize git repository
--no-git Skip git initialization
--package-manager <pm> Package manager (npm, pnpm, bun)
--install Install dependencies
--no-install Skip installing dependencies
--db-setup <setup> Database setup (turso, d1, neon, supabase, prisma-postgres, planetscale, mongodb-atlas, docker, none)
--web-deploy <setup> Web deployment (cloudflare, none)
--server-deploy <setup> Server deployment (cloudflare, none)
--backend <framework> Backend framework (hono, express, fastify, elysia, convex, self, none)
--runtime <runtime> Runtime (bun, node, workers, none)
--api <type> API type (trpc, orpc, none)
--directory-conflict <strategy> Directory strategy (merge, overwrite, increment, error)
--manual-db Skip automatic database setup prompts
-h, --help Display help
# Raw JSON payload input (agent-friendly)
create-better-t-stack create-json --input '{"projectName":"my-app","yes":true,"dryRun":true}'
create-better-t-stack add-json --input '{"projectDir":"./my-app","addons":["wxt"],"addonOptions":{"wxt":{"template":"react"}}}'
create-better-t-stack create-json --input '{"projectName":"db-app","database":"postgres","orm":"drizzle","dbSetup":"neon","dbSetupOptions":{"mode":"manual"}}'
# Runtime schema/introspection output
create-better-t-stack schema --name all
create-better-t-stack schema --name createInput
create-better-t-stack schema --name addInput
create-better-t-stack schema --name addonOptions
create-better-t-stack schema --name dbSetupOptions
create-better-t-stack schema --name cli
# Local stdio MCP server
npx create-better-t-stack@latest mcp
To install Better T Stack into supported agent configs with add-mcp and avoid relying on a global CLI install:
npx -y add-mcp@latest "npx -y create-better-t-stack@latest mcp"
When you scaffold with the mcp addon, Better T Stack itself can also be installed into supported agent configs through add-mcp using a package runner command instead of assuming a global CLI install. For Bun projects, the generated config uses the equivalent bunx create-better-t-stack@latest mcp server command inside add-mcp.
For MCP project creation, prefer install: false. Long dependency installs can exceed common MCP client request timeouts, so the safest flow is to scaffold first and run your package manager install command afterward in the project directory.
This CLI collects anonymous usage data to help improve the tool. The data collected includes:
Telemetry is enabled by default in published versions to help us understand usage patterns and improve the tool.
You can disable telemetry by setting the BTS_TELEMETRY_DISABLED environment variable:
# Disable telemetry for a single run
BTS_TELEMETRY_DISABLED=1 npx create-better-t-stack
# Disable telemetry globally in your shell profile (.bashrc, .zshrc, etc.)
export BTS_TELEMETRY_DISABLED=1
Create a project with default configuration:
npx create-better-t-stack --yes
Validate a command without writing files:
npx create-better-t-stack --yes --dry-run
Create a project with specific options:
npx create-better-t-stack --database postgres --orm drizzle --auth better-auth --addons pwa biome
Create a project with Elysia backend and Node.js runtime:
npx create-better-t-stack --backend elysia --runtime node
Create a project with multiple frontend options (one web + one native):
npx create-better-t-stack --frontend tanstack-router native-bare
Create a project with examples:
npx create-better-t-stack --examples todo ai
Create a project with Turso database setup:
npx create-better-t-stack --database sqlite --orm drizzle --db-setup turso
Create a project with Supabase PostgreSQL setup:
npx create-better-t-stack --database postgres --orm drizzle --db-setup supabase --auth better-auth
Create a project with Convex backend:
npx create-better-t-stack --backend convex --frontend tanstack-router
Create a project with documentation site:
npx create-better-t-stack --addons starlight
Create a minimal TypeScript project with no backend:
npx create-better-t-stack --backend none --frontend tanstack-router
Create a backend-only project with no frontend:
npx create-better-t-stack --frontend none --backend hono --database postgres --orm drizzle
Create a simple frontend-only project:
npx create-better-t-stack --backend none --frontend next --addons none --examples none
Create a Cloudflare Workers project:
npx create-better-t-stack --backend hono --runtime workers --database sqlite --orm drizzle --db-setup d1
Create a self-hosted fullstack project on Cloudflare with D1:
npx create-better-t-stack --backend self --frontend next --api trpc --database sqlite --orm drizzle --db-setup d1 --web-deploy cloudflare
Create a minimal API-only project:
npx create-better-t-stack --frontend none --backend hono --api trpc --database none --addons none
database, orm, api, runtime, and server-deploy to be none; auth can be better-auth, clerk, or none depending frontend compatibilitynone.none, or backend self.sqlite and either --runtime workers --server-deploy cloudflare or --backend self --web-deploy cloudflare. For backend self, D1 is supported on next, tanstack-start, nuxt, and astro.The created project follows a clean monorepo structure:
my-better-t-app/
├── apps/
│ ├── web/ # Frontend application
│ ├── server/ # Backend API
│ ├── native/ # (optional) Mobile application
│ └── docs/ # (optional) Documentation site
├── packages/ # Shared packages
└── README.md # Auto-generated project documentation
After project creation, you'll receive detailed instructions for next steps and additional setup requirements.
FAQs
A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations
The npm package create-better-t-stack receives a total of 1,471 weekly downloads. As such, create-better-t-stack popularity was classified as popular.
We found that create-better-t-stack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.