Skip to content

Commit 640df7d

Browse files
Add missing flags to the help output in CLI reference (#14239)
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
1 parent 957d403 commit 640df7d

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

src/content/docs/en/reference/cli-reference.mdx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Global Flags
8282
--silent Disable all logging.
8383
--version Show the version number and exit.
8484
--help Show this help message.
85+
--json Enables JSON logging.
8586
```
8687

8788

@@ -114,18 +115,20 @@ The following message will display in your terminal:
114115
astro dev [command] [...flags]
115116

116117
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.
120121

121122
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.
129132
```
130133
131134
:::note
@@ -196,6 +199,8 @@ The following hotkeys can be used in the terminal where the Astro development se
196199
197200
<p><Since v="7.0.0" /></p>
198201
202+
The command accepts [common flags](#common-flags) and the following additional flags.
203+
199204
#### `--background`
200205
201206
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
232237
233238
###### `--follow` (`-f`)
234239
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.
236241
237242
## `astro build`
238243

0 commit comments

Comments
 (0)