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
Copy file name to clipboardExpand all lines: src/content/docs/en/reference/cli-reference.mdx
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ Global Flags
82
82
--silent Disable all logging.
83
83
--version Show the version number and exit.
84
84
--help Show this help message.
85
+
--json Enables JSON logging.
85
86
```
86
87
87
88
@@ -114,18 +115,20 @@ The following message will display in your terminal:
114
115
astro dev [command] [...flags]
115
116
116
117
Commands
117
-
stop Stop a running background dev server.
118
-
status Check if a dev server is running.
119
-
logs [--follow] View logs from a background dev server.
118
+
stop Stop a running background dev server.
119
+
status Check if a dev server is running.
120
+
logs [--follow] View logs from a background dev server.
120
121
121
122
Flags
122
-
--background Start the dev server as a background process.
123
-
--port Specify which port to run on. Defaults to 4321.
124
-
--host Listen on all addresses, including LAN and public addresses.
125
-
--host <custom-address> Expose on a network IP address at <custom-address>
126
-
--open Automatically open the app in the browser on server start
127
-
--force Clear the content layer cache, forcing a full rebuild.
128
-
--help (-h) See all available flags.
123
+
--background Start the dev server as a background process.
124
+
--mode Specify the mode of the project. Defaults to "development".
125
+
--port Specify which port to run on. Defaults to 4321.
126
+
--host Listen on all addresses, including LAN and public addresses.
127
+
--host <custom-address> Expose on a network IP address at <custom-address>
128
+
--open Automatically open the app in the browser on server start
129
+
--force Clear the content layer cache, forcing a full rebuild.
130
+
--allowed-hosts Specify a comma-separated list of allowed hosts or allow any hostname.
131
+
--help (-h) See all available flags.
129
132
```
130
133
131
134
:::note
@@ -196,6 +199,8 @@ The following hotkeys can be used in the terminal where the Astro development se
196
199
197
200
<p><Since v="7.0.0" /></p>
198
201
202
+
The command accepts [common flags](#common-flags) and the following additional flags.
203
+
199
204
#### `--background`
200
205
201
206
Starts the dev server as a detached background process and enables [JSON logging](#--json). This flag is provided automatically when an AI agent is detected. You can also use it manually:
@@ -232,7 +237,7 @@ Displays logs from a background dev server. Only works when the server was start
232
237
233
238
###### `--follow` (`-f`)
234
239
235
-
Stream new log output as it's written, similar to `tail -f`. Without this flag, the current log file contents are printed and the command exits.
240
+
Streams new log output as it's written, similar to `tail -f`. Without this flag, the current log file contents are printed and the command exits.
0 commit comments