blob: 260922b0acd48a73de66975cdd82583c6d91075a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# create-astro
## Scaffolding for Astro projects
**With NPM:**
```bash
npm create astro@latest
```
**With Yarn:**
```bash
yarn create astro
```
**With PNPM:**
```bash
pnpm create astro
```
`create-astro` automatically runs in _interactive_ mode, but you can also specify your project name and template with command line arguments.
```bash
# npm
npm create astro@latest my-astro-project -- --template minimal
# yarn
yarn create astro my-astro-project --template minimal
# pnpm
pnpm create astro my-astro-project --template minimal
```
[Check out the full list][examples] of example templates, available on GitHub.
You can also use any GitHub repo as a template:
```bash
npm create astro@latest my-astro-project -- --template cassidoo/shopify-react-astro
```
### CLI Flags
May be provided in place of prompts
| Name | Description |
| :--------------------------- | :----------------------------------------- |
| `--help` (`-h`) | Display available flags. |
| `--template <name>` | Specify your template. |
| `--install` / `--no-install` | Install dependencies (or not). |
| `--add <integrations>` | Add integrations. |
| `--git` / `--no-git` | Initialize git repo (or not). |
| `--yes` (`-y`) | Skip all prompts by accepting defaults. |
| `--no` (`-n`) | Skip all prompts by declining defaults. |
| `--dry-run` | Walk through steps without executing. |
| `--skip-houston` | Skip Houston animation. |
| `--ref` | Specify an Astro branch (default: latest). |
| `--fancy` | Enable full Unicode support for Windows. |
[examples]: https://github.com/withastro/astro/tree/main/examples
[typescript]: https://github.com/withastro/astro/tree/main/packages/astro/tsconfigs
|