diff --git a/src/content/docs/en/reference/cli-reference.mdx b/src/content/docs/en/reference/cli-reference.mdx index 154aaf7a9ae94..d7347750533dc 100644 --- a/src/content/docs/en/reference/cli-reference.mdx +++ b/src/content/docs/en/reference/cli-reference.mdx @@ -125,6 +125,7 @@ Flags --host Expose on a network IP address at --open Automatically open the app in the browser on server start --force Clear the content layer cache, forcing a full rebuild. + --no-lock Start the dev server even if another one is already running, without checking or writing the lock file. --help (-h) See all available flags. ``` @@ -212,6 +213,20 @@ astro dev --background --force See [Background mode for AI coding agents](/en/guides/build-with-ai/#background-mode) for more about automatic agent detection and the health endpoint. +#### `--no-lock` + +

+ +Starts the dev server without checking or writing the lock file used to detect other running dev servers. This allows a new dev server to start alongside one that's already running for the same project, instead of erroring. + +```shell +astro dev --no-lock --port 4322 +``` + +The new server is not tracked by `astro dev stop`, `astro dev status`, or `astro dev logs`. + +When combined with `--background` (including when triggered by an AI coding agent) or `--force`, an error is throwned, as both rely on the lock file. +

Subcommands