You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Adds documentation for the new `nitric add` command,
including how to add websites and stacks to a project.
This provides users with clear instructions on how to use
the CLI to scaffold new resources.
---------
Co-authored-by: Rak <[email protected]>
Copy file name to clipboardExpand all lines: docs/reference/cli.mdx
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,52 @@ There are a few common commands that you will use frequently:
21
21
-`nitric start` runs the Nitric server locally
22
22
-`nitric up` deploys your stack to the cloud
23
23
-`nitric down` destroys your stack from the cloud
24
+
-`nitric add` adds new resources to your project
25
+
26
+
## Adding Resources
27
+
28
+
The `add` command helps you add new resources to your project:
29
+
30
+
```bash
31
+
nitric add
32
+
```
33
+
34
+
### Adding a Website
35
+
36
+
To add a new website to your project:
37
+
38
+
```bash
39
+
nitric add website
40
+
```
41
+
42
+
This will walk you through an interactive process to:
43
+
44
+
- Name your website
45
+
- Select a tool/framework (currently supports [Astro](https://astro.build/), [Vite](https://vite.dev/), and [Hugo](https://gohugo.io/))
46
+
- Configure the website's base URL path and dev server port
47
+
48
+
You can also specify the website name and tool directly:
49
+
50
+
```bash
51
+
# For Astro
52
+
nitric add website my-site astro
53
+
54
+
# For Vite
55
+
nitric add website my-site vite
56
+
57
+
# For Hugo
58
+
nitric add website my-site hugo
59
+
```
60
+
61
+
### Adding a Stack
62
+
63
+
The `add stack` command is an alias for `stack new` and can be used to create a new stack:
64
+
65
+
```bash
66
+
nitric add stack
67
+
```
68
+
69
+
This will walk you through an interactive process to create a new stack configuration for a particular cloud provider. For more details about stack configuration and options, see the [Stacks section](#stacks) below.
0 commit comments