From efe59ef9c68f69e10ff3a91174f8be123e3acbd2 Mon Sep 17 00:00:00 2001 From: serverpod Date: Mon, 6 Jul 2026 18:18:21 +0000 Subject: [PATCH] docs: Update framework CLI command reference (serverpod@c6b3469) --- docs/06-concepts/cli/_generated/create.md | 19 +++--- .../cli/_generated/global_options.md | 1 + docs/06-concepts/cli/_generated/quickstart.md | 15 ++--- docs/06-concepts/cli/_generated/start.md | 20 +++++++ .../cli/commands/start/_category_.json | 2 +- docs/06-concepts/cli/commands/start/start.mdx | 58 +------------------ 6 files changed, 42 insertions(+), 73 deletions(-) create mode 100644 docs/06-concepts/cli/_generated/start.md diff --git a/docs/06-concepts/cli/_generated/create.md b/docs/06-concepts/cli/_generated/create.md index 8b58b5a8..840a2d45 100644 --- a/docs/06-concepts/cli/_generated/create.md +++ b/docs/06-concepts/cli/_generated/create.md @@ -4,18 +4,19 @@ Creates a new Serverpod project, specify project name (must be lowercase with no special characters). Usage: serverpod create [arguments] --h, --help Print this usage information. --f, --force Create the project even if there are issues that prevent it from running out of the box. --n, --name (mandatory) The name of the project to create. - Can also be specified as the first argument. +-h, --help Print this usage information. +-f, --force Create the project even if there are issues that prevent it from running out of the box. +-n, --name (mandatory) The name of the project to create. + Can also be specified as the first argument. Project Template - --mini Shortcut for --template mini. --t, --template Template to use when creating a new project + --mini Shortcut for --template mini. +-t, --template Template to use when creating a new project - [mini] Mini project with minimal features and no database - [server] (default) Server project with standard features including database - [module] Serverpod Module project + [mini] Mini project with minimal features and no database + [fullstack] (default) Fullstack project including a server and a companion Flutter app + [server] Server project with standard features including database + [module] Serverpod Module project Run "serverpod help" to see global options. ``` diff --git a/docs/06-concepts/cli/_generated/global_options.md b/docs/06-concepts/cli/_generated/global_options.md index 7c985b9d..ffc6a6fd 100644 --- a/docs/06-concepts/cli/_generated/global_options.md +++ b/docs/06-concepts/cli/_generated/global_options.md @@ -26,6 +26,7 @@ Available commands: mcp-server Start an MCP bridge to the `serverpod start` runner of one server project. quickstart Creates a new Serverpod project with basic options. run Run a script defined in the "serverpod/scripts" section of pubspec.yaml. + start Start the full development stack with hot reload: generates code, runs the server, and launches the companion Flutter apps in an interactive terminal UI. upgrade Upgrade Serverpod to the latest version. version Prints the active version of the Serverpod CLI. diff --git a/docs/06-concepts/cli/_generated/quickstart.md b/docs/06-concepts/cli/_generated/quickstart.md index 3eb35bef..c507f67b 100644 --- a/docs/06-concepts/cli/_generated/quickstart.md +++ b/docs/06-concepts/cli/_generated/quickstart.md @@ -6,15 +6,16 @@ Suitable for a simple project or quick experiment. Specify project name (must be lowercase with no special characters). Usage: serverpod quickstart [arguments] --h, --help Print this usage information. --f, --force Create the project even if there are issues that prevent it from running out of the box. --t, --template Template to use when creating a new project +-h, --help Print this usage information. +-f, --force Create the project even if there are issues that prevent it from running out of the box. +-t, --template Template to use when creating a new project - [server] (default) Server project with standard features including database - [module] Serverpod Module project + [fullstack] (default) Fullstack project including a server and a companion Flutter app + [server] Server project with standard features including database + [module] Serverpod Module project --n, --name (mandatory) The name of the project to create. - Can also be specified as the first argument. +-n, --name (mandatory) The name of the project to create. + Can also be specified as the first argument. Run "serverpod help" to see global options. ``` diff --git a/docs/06-concepts/cli/_generated/start.md b/docs/06-concepts/cli/_generated/start.md new file mode 100644 index 00000000..09896356 --- /dev/null +++ b/docs/06-concepts/cli/_generated/start.md @@ -0,0 +1,20 @@ +## Usage + +```console +Start the full development stack with hot reload: generates code, runs the server, and launches the companion Flutter apps in an interactive terminal UI. + +Usage: serverpod start [-- ] +-h, --help Print this usage information. +-w, --[no-]watch Watch files and use the Frontend Server for fast incremental compilation. With --no-watch, the server is started via `dart run`. + (defaults to on) +-d, --directory The server directory (defaults to auto-detect from current directory). + (defaults to "") + --[no-]docker Start Docker Compose services if a docker-compose.yaml exists. Default off; pass --docker to opt in to compose-managed services (typically Redis when running PostgreSQL separately). + --[no-]tui Show interactive terminal UI. + (defaults to on) + --[no-]flutter Auto-launch the companion Flutter apps as configured on the server pubspec.yaml with `auto_launch: true`. Use --no-flutter to disable auto-launch. Apps can still be started on demand from the TUI. + (defaults to on) + +Run "serverpod help" to see global options. +``` + diff --git a/docs/06-concepts/cli/commands/start/_category_.json b/docs/06-concepts/cli/commands/start/_category_.json index 9968e713..308b5809 100644 --- a/docs/06-concepts/cli/commands/start/_category_.json +++ b/docs/06-concepts/cli/commands/start/_category_.json @@ -1 +1 @@ -{"label": "start"} +{"label": "start"} \ No newline at end of file diff --git a/docs/06-concepts/cli/commands/start/start.mdx b/docs/06-concepts/cli/commands/start/start.mdx index 6f191151..5634bf0a 100644 --- a/docs/06-concepts/cli/commands/start/start.mdx +++ b/docs/06-concepts/cli/commands/start/start.mdx @@ -2,62 +2,8 @@ title: "" --- import MaintainedCommandIntro from './_start.md'; +import Start from '../../_generated/start.md'; -When it boots the server, `serverpod start` applies any pending migrations. While it runs, you create and apply new migrations from the terminal UI (see [Terminal UI shortcuts](#terminal-ui-shortcuts)). - -## Usage - -```bash -serverpod start [options] [-- ] -``` - -## Options - -| Option | Default | Description | -| --- | --- | --- | -| `-w`, `--watch` / `--no-watch` | `true` | Watch files and hot-reload using the Frontend Server for fast incremental compilation. Pass `--no-watch` to start the server with `dart run` instead. | -| `-d`, `--directory ` | auto-detect | Set the server package directory. Auto-detected from the current directory when omitted. | -| `--docker` / `--no-docker` | `false` | Start Docker Compose services if a `docker-compose.yaml` exists (typically Redis when running Postgres separately). Off by default; pass `--docker` to opt in. | -| `--tui` / `--no-tui` | `true` | Show the interactive terminal UI. Pass `--no-tui` to run without it, for example in scripts or non-interactive shells. | -| `--flutter` / `--no-flutter` | `true` | Launch the companion Flutter app alongside the server. Pass `--no-flutter` to start only the server. | -| `--flutter-device ` | `chrome` | Choose the device passed to `flutter run -d`. Use `web-server` for headless or CI runs. | -| `--flutter-option ` | none | Forward an extra argument to [`flutter run`](https://docs.flutter.dev/reference/flutter-cli). Repeatable, e.g. `--flutter-option=--web-port=8090`. | -| `-h`, `--help` | | Print usage information. | - -## Terminal UI shortcuts - -The interactive terminal UI lists its shortcuts along the bottom. With the `serverpod start` terminal focused: - -| Key | Action | -| --- | --- | -| **R** | Hot restart the server. | -| **M** | Create a migration from your current model changes (`Shift+M` to force). | -| **A** | Apply pending migrations to the database. | -| **P** | Create a repair migration to reconcile a drifted database (`Shift+P` to force). | - -Saving a file hot-reloads the server automatically while watching is enabled. - -## Passing arguments to the server - -Arguments after `--` are forwarded to the running server. For example, to start it in a specific run mode: - -```bash -serverpod start -- --mode staging -``` - -The server accepts the following arguments: - -| Argument | Allowed values | Default | Description | -| --- | --- | --- | --- | -| `-m`, `--mode` | `development`, `test`, `staging`, `production` | `development` | Set the run mode the server starts in. | -| `-r`, `--role` | `monolith`, `serverless`, `maintenance` | `monolith` | Set the role the server runs as. | -| `-l`, `--logging` | `normal`, `verbose` | `normal` | Set the logging level. | -| `-i`, `--server-id` | any | `default` | Set the id of this server instance. | -| `-a`, `--apply-migrations` | | `false` | Apply pending database migrations on boot. | -| `-A`, `--apply-repair-migration` | | `false` | Apply the repair migration on boot. | - -:::note -`serverpod start` is intended for local development. For production, deploy the server instead. See [Deploy to Serverpod Cloud](../../../../08-deployments/01-deploy-to-serverpod-cloud.md) or [Custom hosting](../../../../08-deployments/custom-hosting/01-choosing-a-strategy.md). -::: +