diff --git a/cloud_docs/reference/cli/_generated/context.md b/cloud_docs/reference/cli/_generated/context.md new file mode 100644 index 00000000..f8cd2ef7 --- /dev/null +++ b/cloud_docs/reference/cli/_generated/context.md @@ -0,0 +1,82 @@ +## Usage + +```console +Manage the global project context. + +The global project context is a locally stored setting that selects the project to use when it is +not specified by other means. Commands that act on a project use it as a last resort, after command +line arguments, environment variables, and the scloud.yaml project configuration file. + +Usage: scloud context [arguments] +-h, --help Print this usage information. + +Available subcommands: + list List the Serverpod Cloud projects available as context. + set Set the global project context to the given project ID. + show Show the current global project context. + unset Unset the global project context. + +Run "scloud help" to see global options. + +See the full documentation at: https://docs.serverpod.dev/cloud/reference/cli/commands/context + +``` + +### Sub commands + +#### `list` + +```console +List the Serverpod Cloud projects available as context. + +Usage: scloud context list [arguments] +-h, --help Print this usage information. + +Run "scloud help" to see global options. + +See the full documentation at: https://docs.serverpod.dev/cloud/reference/cli/commands/context + +``` + +#### `show` + +```console +Show the current global project context. + +Usage: scloud context show [arguments] +-h, --help Print this usage information. + +Run "scloud help" to see global options. + +See the full documentation at: https://docs.serverpod.dev/cloud/reference/cli/commands/context + +``` + +#### `set` + +```console +Set the global project context to the given project ID. + +Usage: scloud context set [arguments] +-h, --help Print this usage information. +-p, --project (mandatory) The ID of the project. Can be passed as the first argument. + +Run "scloud help" to see global options. + +See the full documentation at: https://docs.serverpod.dev/cloud/reference/cli/commands/context + +``` + +#### `unset` + +```console +Unset the global project context. + +Usage: scloud context unset [arguments] +-h, --help Print this usage information. + +Run "scloud help" to see global options. + +See the full documentation at: https://docs.serverpod.dev/cloud/reference/cli/commands/context + +``` diff --git a/cloud_docs/reference/cli/_generated/db.md b/cloud_docs/reference/cli/_generated/db.md index c72513ea..94c96683 100644 --- a/cloud_docs/reference/cli/_generated/db.md +++ b/cloud_docs/reference/cli/_generated/db.md @@ -33,8 +33,9 @@ Show the connection details for a Serverpod Cloud DB. Usage: scloud db connection [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. Run "scloud help" to see global options. @@ -109,8 +110,9 @@ Irreversibly wipe and recreate the database, deleting all data and schema change Usage: scloud db wipe [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. Run "scloud help" to see global options. diff --git a/cloud_docs/reference/cli/_generated/deploy.md b/cloud_docs/reference/cli/_generated/deploy.md index dacc8779..9e3f604b 100644 --- a/cloud_docs/reference/cli/_generated/deploy.md +++ b/cloud_docs/reference/cli/_generated/deploy.md @@ -6,11 +6,13 @@ Deploy a Serverpod project to the cloud. Usage: scloud deploy [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. Can be passed as the first argument. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. -c, --concurrency= Number of concurrent files processed when zipping the project. (defaults to "5") - --dry-run Do not actually deploy, just print the deployment steps. + --wet-run Perform every step except the deployment, leaving the hosted + application untouched. Local files may still be modified. --show-files Display the file tree that will be uploaded. -o, --output Save the deployment zip file to the specified path. Must end with .zip @@ -35,15 +37,15 @@ Examples (marked with "(ignored)"). This is useful for verifying that your .gitignore and .scloudignore files are working as expected. - You can combine it with --dry-run to preview the file tree without actually deploying: + You can combine it with --wet-run to preview the file tree without actually deploying: - $ scloud deploy --dry-run --show-files + $ scloud deploy --wet-run --show-files Save the deployment zip file locally - $ scloud deploy --output deployment.zip --dry-run + $ scloud deploy --output deployment.zip --wet-run - Save the deployment zip and still upload it (unless --dry-run is set) + Save the deployment zip and still upload it (unless --wet-run is set) $ scloud deploy --output deployment.zip diff --git a/cloud_docs/reference/cli/_generated/deployment.md b/cloud_docs/reference/cli/_generated/deployment.md index ddc4f96f..38f66d9c 100644 --- a/cloud_docs/reference/cli/_generated/deployment.md +++ b/cloud_docs/reference/cli/_generated/deployment.md @@ -28,8 +28,9 @@ Show the status of a deployment. Usage: scloud deployment show [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and + `scloud context set --help`. -u, --[no-]utc Display timestamps in UTC timezone instead of local. --deploy=<> View a specific deployment, with uuid or sequence number, 0 for latest. Can be passed as the first argument. @@ -76,8 +77,9 @@ List recent deployments. Usage: scloud deployment list [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --limit= The maximum number of records to fetch. (defaults to "10") -u, --[no-]utc Display timestamps in UTC timezone instead of local. @@ -109,8 +111,9 @@ View a deployment's build log. Usage: scloud deployment build-log [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and + `scloud context set --help`. -u, --[no-]utc Display timestamps in UTC timezone instead of local. --deploy=<> View a specific deployment, with uuid or sequence number, 0 for latest. Can be passed as the first argument. diff --git a/cloud_docs/reference/cli/_generated/domain.md b/cloud_docs/reference/cli/_generated/domain.md index 6bf5a072..71648c3a 100644 --- a/cloud_docs/reference/cli/_generated/domain.md +++ b/cloud_docs/reference/cli/_generated/domain.md @@ -49,8 +49,9 @@ The valid targets are: Usage: scloud domain attach [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. - See `scloud project link --help`. + Can be omitted for existing projects that are linked + or if a global project context is set. See `scloud + project link --help` and `scloud context set --help`. --name (mandatory) The custom domain name. Can be passed as the first argument. -t, --target= (mandatory) The Serverpod server target of the custom domain, @@ -70,8 +71,9 @@ List all custom domains. Usage: scloud domain list [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. Run "scloud help" to see global options. @@ -87,8 +89,9 @@ Detach a custom domain. Usage: scloud domain detach [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The custom domain name. Can be passed as the first argument. Run "scloud help" to see global options. @@ -105,8 +108,9 @@ Verify the DNS record for a custom domain. Usage: scloud domain verify [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The custom domain name. Can be passed as the first argument. Run "scloud help" to see global options. diff --git a/cloud_docs/reference/cli/_generated/global_options.md b/cloud_docs/reference/cli/_generated/global_options.md index 963edac3..aab7f25a 100644 --- a/cloud_docs/reference/cli/_generated/global_options.md +++ b/cloud_docs/reference/cli/_generated/global_options.md @@ -23,6 +23,7 @@ Global options: Available commands: completion Command line completion commands + context Manage the global project context. settings Manage local CLI user settings. version Prints the version of the Serverpod Cloud CLI. diff --git a/cloud_docs/reference/cli/_generated/launch.md b/cloud_docs/reference/cli/_generated/launch.md index 1b31b4da..e69b3dd8 100644 --- a/cloud_docs/reference/cli/_generated/launch.md +++ b/cloud_docs/reference/cli/_generated/launch.md @@ -19,7 +19,9 @@ Usage: scloud launch [arguments] Deployment options -c, --concurrency= Number of concurrent files processed when zipping the project. (defaults to "5") - --dry-run Do not actually deploy, just print the deployment steps. + --wet-run Perform every step except the deployment, leaving the hosted + application untouched. Local files and the cloud project setup may + still be modified. --show-files Display the file tree that will be uploaded. -o, --output Save the deployment zip file to the specified path. Must end with .zip diff --git a/cloud_docs/reference/cli/_generated/log.md b/cloud_docs/reference/cli/_generated/log.md index c2b2e6eb..017a187e 100644 --- a/cloud_docs/reference/cli/_generated/log.md +++ b/cloud_docs/reference/cli/_generated/log.md @@ -7,8 +7,10 @@ Usage: scloud log [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. Can be omitted for existing - projects that are linked. See - `scloud project link --help`. + projects that are linked or if a + global project context is set. See + `scloud project link --help` and + `scloud context set --help`. --limit= The maximum number of log records to fetch. (defaults to "50") diff --git a/cloud_docs/reference/cli/_generated/password.md b/cloud_docs/reference/cli/_generated/password.md index 90e7da84..be7aa7ab 100644 --- a/cloud_docs/reference/cli/_generated/password.md +++ b/cloud_docs/reference/cli/_generated/password.md @@ -42,8 +42,9 @@ List all passwords, both user-set and platform-managed. Usage: scloud password list [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. Run "scloud help" to see global options. @@ -63,8 +64,9 @@ Set a password. Usage: scloud password set [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The name of the password (without SERVERPOD_PASSWORD_ prefix). Can be passed as the first argument. @@ -86,8 +88,9 @@ Unset a password, can only unset user-set passwords. Usage: scloud password unset [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The name of the password (without SERVERPOD_PASSWORD_ prefix). Can be passed as the first argument. diff --git a/cloud_docs/reference/cli/_generated/secret.md b/cloud_docs/reference/cli/_generated/secret.md index 6c8895d3..d70bb223 100644 --- a/cloud_docs/reference/cli/_generated/secret.md +++ b/cloud_docs/reference/cli/_generated/secret.md @@ -27,8 +27,9 @@ Set a secret (create or update). Usage: scloud secret set [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The name of the secret. Can be passed as the first argument. Value @@ -49,8 +50,9 @@ List all secrets. Usage: scloud secret list [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. Run "scloud help" to see global options. @@ -66,8 +68,9 @@ Remove a secret. Usage: scloud secret unset [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The name of the secret. Can be passed as the first argument. Run "scloud help" to see global options. diff --git a/cloud_docs/reference/cli/_generated/variable.md b/cloud_docs/reference/cli/_generated/variable.md index 80d27df3..f41b24d1 100644 --- a/cloud_docs/reference/cli/_generated/variable.md +++ b/cloud_docs/reference/cli/_generated/variable.md @@ -27,8 +27,9 @@ Lists all environment variables for the project. Usage: scloud variable list [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. Run "scloud help" to see global options. @@ -44,8 +45,9 @@ Set an environment variable (create or update). Usage: scloud variable set [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The name of the environment variable. Can be passed as the first argument. @@ -80,8 +82,9 @@ Remove an environment variable. Usage: scloud variable unset [arguments] -h, --help Print this usage information. -p, --project (mandatory) The ID of the project. - Can be omitted for existing projects that are linked. See `scloud - project link --help`. + Can be omitted for existing projects that are linked or if a global + project context is set. See `scloud project link --help` and `scloud + context set --help`. --name (mandatory) The name of the environment variable. Can be passed as the first argument. diff --git a/cloud_docs/reference/cli/commands/context/_category_.json b/cloud_docs/reference/cli/commands/context/_category_.json new file mode 100644 index 00000000..fcfe5d2a --- /dev/null +++ b/cloud_docs/reference/cli/commands/context/_category_.json @@ -0,0 +1 @@ +{"label": "context"} \ No newline at end of file diff --git a/cloud_docs/reference/cli/commands/context/_context.md b/cloud_docs/reference/cli/commands/context/_context.md new file mode 100644 index 00000000..e69de29b diff --git a/cloud_docs/reference/cli/commands/context/context.mdx b/cloud_docs/reference/cli/commands/context/context.mdx new file mode 100644 index 00000000..aa60a3b8 --- /dev/null +++ b/cloud_docs/reference/cli/commands/context/context.mdx @@ -0,0 +1,9 @@ +--- +title: "" +--- +import MaintainedCommandIntro from './_context.md'; +import Context from '../../_generated/context.md'; + + + +