Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/amanvarshney01/create-better-t-stack/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Better-T-Stack CLI provides several commands to create and manage TypeScript full-stack projects. All commands are invoked through create-better-t-stack.

create (Default Command)

Creates a new Better-T-Stack project with your chosen stack configuration. Syntax:
create-better-t-stack [project-name] [options]
project-name
string
Name or path for your project directory. If omitted, you’ll be prompted to enter it.

Key Options

--yes
boolean
default:false
Use default configuration and skip all interactive prompts.
create-better-t-stack my-app --yes
--template
enum
Use a predefined project template. Available templates:
  • mern - MongoDB, Express, React, Node.js
  • pern - PostgreSQL, Express, React, Node.js
  • t3 - T3 stack configuration
  • uniwind - UniWind React Native template
  • none - No template (default)
create-better-t-stack --template t3
--verbose
boolean
default:false
Show detailed result information as JSON after project creation.
create-better-t-stack my-app --verbose
--yolo
boolean
default:false
Bypass validations and compatibility checks. Not recommended for production use.
create-better-t-stack --yolo --database mongodb --orm drizzle
See the Options Reference for a complete list of all available flags.

Examples

# Start with prompts
create-better-t-stack

add

Adds addons to an existing Better-T-Stack project. Syntax:
create-better-t-stack add [options]

Options

--addons
array
Addons to add to the project. Available addons:
  • pwa - Progressive Web App support
  • tauri - Desktop app support
  • starlight - Starlight documentation
  • fumadocs - Fumadocs documentation
  • biome - Biome linting/formatting
  • oxlint - Oxlint + Oxfmt
  • husky - Git hooks with Husky
  • lefthook - Git hooks with Lefthook
  • turborepo - Turborepo monorepo
  • ruler - AI rules manager
  • mcp - MCP servers via add-mcp
  • skills - AI coding agent skills
  • opentui - Terminal UI components
  • wxt - Browser extension framework
create-better-t-stack add --addons pwa tauri
--project-dir
string
Project directory (defaults to current directory).
create-better-t-stack add --project-dir ./my-app
--install
boolean
default:false
Install dependencies after adding addons.
create-better-t-stack add --addons biome --install
--package-manager
enum
Package manager to use: npm, pnpm, or bun.
create-better-t-stack add --package-manager bun

Examples

# Prompt for addons to add
create-better-t-stack add

history

Shows project creation history stored locally on your machine. Syntax:
create-better-t-stack history [options]

Options

--limit
number
default:10
Number of history entries to show.
create-better-t-stack history --limit 5
--json
boolean
default:false
Output history as JSON.
create-better-t-stack history --json
--clear
boolean
default:false
Clear all history entries.
create-better-t-stack history --clear

Storage Location

History is stored in platform-specific directories:
  • macOS: ~/Library/Application Support/better-t-stack/history.json
  • Linux: ~/.local/share/better-t-stack/history.json
  • Windows: %LOCALAPPDATA%\better-t-stack\Data\history.json

Examples

# Show last 10 projects
create-better-t-stack history

sponsors

Displays Better-T-Stack sponsors and supporters. Syntax:
create-better-t-stack sponsors
Shows a formatted list of project sponsors.

docs

Opens the Better-T-Stack documentation in your default browser. Syntax:
create-better-t-stack docs
Opens https://better-t-stack.dev/docs.

builder

Opens the web-based stack builder in your default browser. Syntax:
create-better-t-stack builder
Opens https://better-t-stack.dev/new where you can configure your stack visually and copy the CLI command.

Global Options

These options work with any command:
--help
boolean
Display help information for the command.
create-better-t-stack --help
create-better-t-stack add --help
--version
boolean
Display CLI version.
create-better-t-stack --version

Programmatic Usage

For automation and integration with other tools, use the programmatic API:
import { create, add } from "create-better-t-stack";

// Create a project
const result = await create("my-app", {
  frontend: ["tanstack-router"],
  backend: "hono",
  database: "sqlite",
  orm: "drizzle",
});

result.match({
  ok: (data) => console.log(`Created at: ${data.projectDirectory}`),
  err: (error) => console.error(`Failed: ${error.message}`),
});

// Add addons
const addResult = await add({
  addons: ["biome", "husky"],
  install: true,
});
See the source code at ~/workspace/source/apps/cli/src/index.ts for the complete API reference.

Build docs developers (and LLMs) love