2022-10-06 09:15:30 +00:00
|
|
|
---
|
|
|
|
title: "nuxi init"
|
|
|
|
description: The init command initializes a fresh Nuxt project.
|
|
|
|
---
|
|
|
|
|
2022-04-06 05:56:08 +00:00
|
|
|
# `nuxi init`
|
|
|
|
|
|
|
|
```{bash}
|
|
|
|
npx nuxi init|create [--verbose|-v] [--template,-t] [dir]
|
|
|
|
```
|
|
|
|
|
2022-09-10 13:37:25 +00:00
|
|
|
The `init` command initializes a fresh Nuxt project using [unjs/giget](https://github.com/unjs/giget).
|
|
|
|
|
|
|
|
## Options
|
2022-04-06 05:56:08 +00:00
|
|
|
|
|
|
|
Option | Default | Description
|
|
|
|
-------------------------|-----------------|------------------
|
2022-09-10 13:37:25 +00:00
|
|
|
`--template, -t` | `v3` | Specify template name or git repository to use as a template. Format is `gh:org/name` to use a custom github template.
|
2022-09-08 15:43:04 +00:00
|
|
|
`--force` | `false` | Force clone to any existing directory.
|
|
|
|
`--offline` | `false` | Do not attempt to download from github and only use local cache.
|
2022-09-10 13:37:25 +00:00
|
|
|
`--prefer-offline` | `false` | Try local cache first to download templates.
|
|
|
|
`--shell` | `false` | Open shell in cloned directory (experimental).
|
|
|
|
|
|
|
|
## Environment variables
|
|
|
|
|
|
|
|
- `NUXI_INIT_REGISTRY`: Set to a custom template registry. ([learn more](https://github.com/unjs/giget#custom-registry)).
|
|
|
|
- Default registry is loaded from [nuxt/starter/templates](https://github.com/nuxt/starter/tree/templates/templates)
|