tanstack-cli
Original:🇺🇸 English
Translated
Project scaffolding CLI with 30+ integrations, custom templates, and MCP server for AI agents.
4installs
Added on
NPX Install
npx skill4agent add tanstack-skills/tanstack-skills tanstack-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Overview
TanStack CLI is an interactive scaffolding tool for creating TanStack Start applications. It provides guided project creation with 30+ pre-built integrations covering authentication, databases, deployment, and developer tools. It also includes an MCP (Model Context Protocol) server for AI agent assistance and supports custom templates for team-standardized setups.
Package:
Status: Stable
@tanstack/cliInstallation & Usage
bash
# Create a new project (interactive)
npx @tanstack/cli create my-app
# Create with specific integrations
npx @tanstack/cli create my-app --integrations tanstack-query,clerk,drizzle
# Global install
npm install -g @tanstack/cli
tanstack create my-appProject Creation
Interactive Mode
bash
npx @tanstack/cli create my-app
# Prompts for:
# - Project name
# - Integration selection
# - Configuration optionsWith Integrations Flag
bash
# Multiple integrations
npx @tanstack/cli create my-app --integrations tanstack-query,tanstack-form,drizzle,neon,clerk
# Deployment target
npx @tanstack/cli create my-app --integrations vercel
# Full stack setup
npx @tanstack/cli create my-app --integrations tanstack-query,tanstack-form,tanstack-table,clerk,drizzle,neon,vercel,sentryAvailable Integrations
TanStack Libraries
| Integration | Description |
|---|---|
| Async state management |
| Type-safe form management |
| Headless table/datagrid |
| Reactive data store |
| List virtualization |
| AI SDK integration |
| Client-side database |
| Debouncing/throttling utilities |
Authentication
| Integration | Description |
|---|---|
| Clerk authentication |
| Better Auth integration |
| WorkOS identity management |
Databases & ORMs
| Integration | Description |
|---|---|
| Drizzle ORM |
| Prisma ORM |
| Neon serverless Postgres |
| Convex backend platform |
Deployment
| Integration | Description |
|---|---|
| Vercel deployment |
| Netlify deployment |
| Cloudflare Workers/Pages |
| Nitro server engine |
Developer Tools
| Integration | Description |
|---|---|
| ESLint configuration |
| Biome linting/formatting |
| shadcn/ui component library |
| Storybook component development |
API & Backend
| Integration | Description |
|---|---|
| tRPC type-safe API |
| oRPC integration |
Services
| Integration | Description |
|---|---|
| Error monitoring |
| Internationalization (i18n) |
| Strapi CMS |
Custom Templates
Creating a Template
bash
# Create a project as a template base
npx @tanstack/cli create my-template --integrations tanstack-query,drizzle,clerk
# Share as a git repository or npm packageUsing a Custom Template
bash
# From git repository
npx @tanstack/cli create my-app --template https://github.com/myorg/my-template
# From local path
npx @tanstack/cli create my-app --template ./templates/my-templateTemplate Structure
my-template/
├── template.config.ts # Template configuration
├── src/
│ ├── app/
│ │ ├── routes/
│ │ └── components/
│ └── lib/
├── package.json
├── tsconfig.json
├── app.config.ts
└── vite.config.tsMCP Server
The TanStack CLI includes an MCP (Model Context Protocol) server for AI agent integration.
Capabilities
- Documentation Search - AI agents can query TanStack documentation
- Project Scaffolding - Guided project creation through AI assistants
- Integration Discovery - Search and recommend integrations
- Deployment Guidance - Platform-specific deployment help
Usage with Claude
The MCP server enables Claude and other AI assistants to:
- Search TanStack docs for accurate, up-to-date information
- Help scaffold new projects with appropriate integrations
- Provide context-aware recommendations
- Assist with configuration and deployment
Configuration
json
// .claude/mcp.json or equivalent
{
"mcpServers": {
"tanstack": {
"command": "npx",
"args": ["@tanstack/cli", "mcp"]
}
}
}Generated Project Structure
A typical generated project looks like:
my-app/
├── src/
│ ├── app/
│ │ ├── routes/
│ │ │ ├── __root.tsx
│ │ │ └── index.tsx
│ │ ├── router.tsx
│ │ ├── routeTree.gen.ts
│ │ └── client.tsx
│ ├── lib/
│ │ ├── db.ts # (if drizzle/prisma)
│ │ ├── auth.ts # (if clerk/better-auth)
│ │ └── query.ts # (if tanstack-query)
│ └── components/
├── app.config.ts
├── vite.config.ts
├── package.json
├── tsconfig.json
└── .env.exampleWeb Builder Interface
TanStack CLI also provides an interactive web-based builder:
- Visual technology stack selection
- Preview generated files before exporting
- Integration compatibility checking
- One-click project generation
CLI Commands Reference
| Command | Description |
|---|---|
| Create a new project |
| Create with specific integrations |
| Create from template |
| Start the MCP server |
Best Practices
- Start with minimal integrations - add more as needed rather than including everything upfront
- Use the flag for reproducible project creation in CI/docs
--integrations - Create team templates for consistent project structure across your organization
- Use the MCP server with AI assistants for guided setup
- Check after generation for required environment variables
.env.example - Review generated code before adding business logic - understand the scaffold
- Use deployment integrations to pre-configure hosting platform settings
- Combine auth + db integrations for full-stack auth scaffolding (e.g., )
clerk,drizzle,neon
Common Pitfalls
- Not setting up environment variables after project creation (check )
.env.example - Selecting incompatible integration combinations
- Not running /
npm installafter generationpnpm install - Forgetting to initialize the database when using Drizzle/Prisma integrations
- Not configuring the deployment platform's environment variables
- Using outdated CLI version (always use for latest)
npx @tanstack/cli