CLI Docs
Getting Started
AI/LLM: This documentation page is available in plain markdown format at/cli/latest/docs/quick-start.md
Getting Started
Quick Start
Create a Project#
shell
npx @tanstack/cli create my-appInteractive prompts guide you through project name, package manager, and add-on selection.
Non-Interactive#
shell
# Defaults only (TanStack Start + file-router)
npx @tanstack/cli create my-app -y
# Minimal one-route Start project
npx @tanstack/cli create my-app --blank -y
# Minimal Start project configured for Cloudflare
npx @tanstack/cli create my-app --blank --deployment cloudflare -y
# With add-ons
npx @tanstack/cli create my-app --add-ons tanstack-query,clerk,drizzle -y
# Router-only SPA (no SSR)
npx @tanstack/cli create my-app --router-only -y
# Rsbuild instead of the default Vite build tool
npx @tanstack/cli create my-app --build-tool rsbuild -y
# Minimal router-only Rsbuild app
npx @tanstack/cli create my-app --build-tool rsbuild --router-only --blank -yBlank projects omit the default starter interface, examples, Tailwind, devtools, test stack, and TanStack Intent setup. Pass --intent to include local skill mappings for coding agents. Explicit add-ons can add their own required files and dependencies. Pass -y to skip selection prompts. A non-empty target also requires --force.
Run the Project#
shell
cd my-app
pnpm dev
# Open http://localhost:3000Environment Variables#
Some add-ons require API keys. When the project includes .env.example:
shell
cp .env.example .env
# Edit .env with your valuesProject Structure#
plaintext
my-app/
├── src/
│ ├── routes/ # File-based routing
│ │ ├── __root.tsx # Root layout
│ │ └── index.tsx # Home page
│ └── integrations/ # Present when selected add-ons need it
├── .cta.json # CLI config
└── .env.example # Present when selected add-ons need env varsNext Steps#
- CLI Reference - All options
- Add-ons - Available add-ons