Open History to see the last commit
1---
2id: templates
3title: Templates
4---
5
6Templates are reusable starting points for projects. They include source files and metadata, and can also declare add-on dependencies.
7
8## Use a Template
9
10```bash
11tanstack create my-app --template ecommerce
12tanstack create my-app --template https://example.com/template.json
13tanstack create my-app --template ./template.json
14```
15
16`--template` accepts both URL/path values and built-in template IDs.
17
18## Create a Template
19
20```bash
21# 1. Create a project with the shape you want
22tanstack create my-template --add-ons clerk,drizzle,sentry
23
24# 2. Initialize template metadata
25cd my-template
26tanstack template init
27
28# 3. Edit template-info.json, then compile the output JSON
29tanstack template compile
30
31# 4. Use or distribute the compiled template file
32tanstack create new-app --template ./template.json
33```
34
35## Maintain a Template
36
37When the source project changes:
38
39```bash
40cd my-template
41tanstack template compile
42```
43
44Then publish the updated `template.json` to the URL your team uses.
45
46## Registry Format
47
48Registry entries can expose templates under `templates` or `starters`.