Skip to content
Source
Sign inSign up
TanStack/cli
Open History to see the last commit

README.md

120 lines3.7 KB

1<div align="center">
2 <picture>
3 <source
4 media="(prefers-color-scheme: dark)"
5 srcset="https://tanstack.com/api/readme/cli.png?theme=dark"
6 />
7 <source
8 media="(prefers-color-scheme: light)"
9 srcset="https://tanstack.com/api/readme/cli.png"
10 />
11 <img
12 src="https://tanstack.com/api/readme/cli.png"
13 alt="TanStack CLI"
14 width="900"
15 />
16 </picture>
17</div>
18​
19<div align="center">
20<a href="https://www.npmjs.com/package/@tanstack/cli" target="_parent">
21 <img alt="" src="https://img.shields.io/npm/dm/@tanstack/cli.svg" />
22</a>
23<a href="https://github.com/TanStack/cli/stargazers" target="_parent">
24 <img alt="" src="https://img.shields.io/github/stars/TanStack/cli.svg?style=social&label=Star" />
25</a>
26<a href="https://twitter.com/tan_stack"><img src="https://img.shields.io/twitter/follow/tan_stack.svg?style=social" /></a>
27</div>
28​
29<div align="center">
30​
31### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/)
32​
33</div>
34​
35# TanStack CLI
36​
37Create and manage TanStack Router and Start applications.
38​
39```bash
40npx @tanstack/cli create my-app
41```
42​
43## Features
44​
45- **TanStack Start** - Full-stack SSR framework (default)
46- **TanStack Router** - Type-safe routing (`--router-only` for SPA)
47- **Vite or Rsbuild** - Choose the build tool for React and Solid projects
48- **Add-ons** - Auth, database, deployment, monitoring, and more
49- **CLI Introspection** - Agent-friendly discovery via JSON CLI output
50​
51## Quick Start
52​
53```bash
54# Create TanStack Start app (recommended)
55npx @tanstack/cli create my-app
56​
57# Create a minimal one-route Start app without selection prompts
58npx @tanstack/cli create my-app --blank -y
59​
60# Create Router-only SPA (no SSR)
61npx @tanstack/cli create my-app --router-only
62​
63# Create with Rsbuild
64npx @tanstack/cli create my-app --build-tool rsbuild -y
65​
66# With add-ons
67npx @tanstack/cli create my-app --add-ons clerk,drizzle,tanstack-query
68​
69# Add to existing project
70npx @tanstack/cli add clerk drizzle
71​
72# List available add-ons
73npx @tanstack/cli create --list-add-ons
74​
75# Agent-friendly introspection
76npx @tanstack/cli create --addon-details tanstack-query --json
77npx @tanstack/cli libraries --json
78npx @tanstack/cli search-docs "loaders" --library router --framework react --json
79```
80​
81## Documentation
82​
83- [CLI Reference](https://tanstack.com/cli/latest/docs/cli-reference)
84- [TanStack Start](https://tanstack.com/start)
85- [TanStack Router](https://tanstack.com/router)
86​
87## Telemetry
88​
89TanStack CLI sends anonymous usage telemetry by default.
90​
91- Sent: command usage, durations, selected framework/build tool/package manager/add-on ids, and coarse result metadata
92- Never sent: project names, file paths, target directories, raw search queries, raw template URLs/paths, add-on config values, env vars, or raw error messages
93- Disabled automatically in `CI`, or when `DO_NOT_TRACK=1` or `TANSTACK_CLI_TELEMETRY_DISABLED=1`
94​
95Manage it with:
96​
97```bash
98tanstack telemetry status
99tanstack telemetry disable
100tanstack telemetry enable
101```
102​
103## Get Involved
104​
105- [GitHub Issues](https://github.com/TanStack/cli/issues)
106- [GitHub Discussions](https://github.com/TanStack/cli/discussions)
107- [Discord](https://discord.com/invite/WrRKjPJ)
108- [Contributing Guide](./CONTRIBUTING.md)
109​
110## TanStack Ecosystem
111​
112- [TanStack Query](https://github.com/tanstack/query) - Async state & caching
113- [TanStack Router](https://github.com/tanstack/router) - Type-safe routing
114- [TanStack Start](https://github.com/tanstack/router) - Full-stack SSR
115- [TanStack Form](https://github.com/tanstack/form) - Type-safe forms
116- [TanStack Table](https://github.com/tanstack/table) - Headless datagrids
117- [TanStack Store](https://github.com/tanstack/store) - Reactive state
118- [TanStack Virtual](https://github.com/tanstack/virtual) - Virtualized rendering
119​
120[More at TanStack.com](https://tanstack.com)