From 2677142c85ba21ca77e20e1c806bc99d93355042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20Va=C5=88kov=C3=A1?= Date: Wed, 21 Jan 2026 00:02:53 +0100 Subject: [PATCH] update zcli commands - add scope project --- .../docs/content/references/zcli/commands.mdx | 64 ++++++++++--------- apps/docs/static/llms-full.txt | 54 ++++++++-------- 2 files changed, 62 insertions(+), 56 deletions(-) diff --git a/apps/docs/content/references/zcli/commands.mdx b/apps/docs/content/references/zcli/commands.mdx index d1d7296b..00310b84 100644 --- a/apps/docs/content/references/zcli/commands.mdx +++ b/apps/docs/content/references/zcli/commands.mdx @@ -72,17 +72,25 @@ For more detailed information about Zerops VPN configuration and troubleshooting ## Project Management -### project list +### scope project -Lists all projects you have access to. +Sets the scope for a project. All commands that require project ID will use the selected one. ```sh -zcli project list +zcli scope project [project-id] +``` + +### scope reset + +Resets the scope for a project. + +```sh +zcli scope reset ``` ### project create -Creates a new project for specified organization. +Creates a new project for a specified organization. ```sh zcli project create [flags] @@ -92,7 +100,7 @@ zcli project create [flags] - `--env-isolation string` - Environment isolation rule [service, none] (default: "service") - `--mode string` - Project mode [light, serious] (default: "light") - `--name string` - Project name -- `--org-id string` - Organization ID to create project for +- `--org-id string` - Organization ID to create a project for - `--out string` - Output format using Go template syntax - `--ssh-isolation string` - SSH isolation rules (default: "vpn") - `--tags strings` - Project tags (comma-separated list or repeated flag) @@ -124,12 +132,20 @@ zcli project env [flags] - `--template string` - Output template (default: "`{{.Key}}={{.Value}}`") - `--user-only` - Exclude all non user env variables +### project list + +Lists all projects you have access to. + +```sh +zcli project list +``` + ### project project-import Creates a new project with one or more services from a YAML definition. ```sh -zcli project project-import importYamlPath [flags] +zcli project project-import [flags] ``` **Flags:** @@ -141,22 +157,10 @@ zcli project project-import importYamlPath [flags] Creates one or more services in an existing project from a YAML definition. ```sh -zcli project service-import importYamlPath [flags] -``` - -**Flags:** -- `-P, --project-id string` - Required when you have access to multiple projects - -### project scope - -Sets or clears the default project scope for commands that require a project ID. - -```sh -zcli project scope [project-id] [flags] +zcli project service-import [flags] ``` **Flags:** -- `--clear` - Clear project scope - `-P, --project-id string` - Required when you have access to multiple projects ## Service Operations @@ -174,7 +178,7 @@ zcli service list [flags] ### service create -Creates a new service for specified project. +Creates a new service for a specified project. ```sh zcli service create [flags] @@ -190,7 +194,7 @@ zcli service create [flags] - `--out string` - Output format using Go template syntax - `-P, --project-id string` - Required when you have access to multiple projects - `--ssh-isolation string` - SSH isolation rules (default: "vpn") -- `--start-without-code` - Start service immediately without deploy +- `--start-without-code` - Start service immediately without deployment - `--working-dir string` - Sets custom working directory (default: "./") - `--zerops-yaml-path string` - Sets custom path to zerops.yml file @@ -213,14 +217,14 @@ zcli service push [service-id-or-name] [flags] - `-v, --verbose` - Log additional debug data to the zCLI [debug log file](/references/zcli/configuration#logging-configuration) - `--version-name string` - Adds a custom version name - `--working-dir string` - Sets a custom working directory (default: "./") -- `-w, --workspace-state string` - Defines version of workspace to push: - - `clean` - pushes the HEAD without local changes - - `staged` - pushes only staged files - - `all` - pushes all staged and unstaged files (default) +- `-w, --workspace-state string` - Defines a version of workspace to push: +- `clean` - pushes the HEAD without local changes +- `staged` - pushes only staged files +- `all` - pushes all staged and unstaged files (default) - `--zerops-yaml-path string` - Sets a custom path to the zerops.yml file :::tip -You can also use `zcli push` as a shorthand for `zcli service push`. +You can also use `zcli push` as shorthand for `zcli service push`. To avoid specifying `--project-id` and `--service-id` flags repeatedly, you can set default values in a `.zcli.yml` file or via environment variables. See the [Configuration](/references/zcli/configuration) page for details. ::: @@ -286,7 +290,7 @@ zcli service log [flags] - `--follow` - Continuously poll for new log messages - `--format string` - Log output format (FULL, SHORT, JSON, JSONSTREAM) (default: "FULL") - `--format-template string` - Custom log format -- `--limit int` - Number of recent log messages to return (1-1000, default: 100) +- `--limit int` - Number of recent log messages to return (1–1000, default: 100) - `--message-type string` - Select APPLICATION or WEBSERVER log messages (default: "APPLICATION") - `--minimum-severity string` - Filter by severity level - `-P, --project-id string` - Required when you have access to multiple projects @@ -336,10 +340,10 @@ zcli completion {bash|fish|powershell|zsh} ``` **Available Shells:** -- `bash` - Generate autocompletion script for Bash -- `fish` - Generate autocompletion script for Fish +- `bash` - Generate an autocompletion script for Bash +- `fish` - Generate an autocompletion script for Fish - `powershell` - Generate autocompletion script for PowerShell -- `zsh` - Generate autocompletion script for Zsh +- `zsh` - Generate an autocompletion script for Zsh **Example:** ```sh diff --git a/apps/docs/static/llms-full.txt b/apps/docs/static/llms-full.txt index 790a0dc6..1d7db514 100644 --- a/apps/docs/static/llms-full.txt +++ b/apps/docs/static/llms-full.txt @@ -21711,13 +21711,18 @@ zcli vpn down For more detailed information about Zerops VPN configuration and troubleshooting, visit the [VPN Documentation](/references/networking/vpn). ::: ## Project Management -### project list -Lists all projects you have access to. +### scope project +Sets the scope for a project. All commands that require project ID will use the selected one. ```sh -zcli project list +zcli scope project [project-id] +``` +### scope reset +Resets the scope for a project. +```sh +zcli scope reset ``` ### project create -Creates a new project for specified organization. +Creates a new project for a specified organization. ```sh zcli project create [flags] ``` @@ -21725,7 +21730,7 @@ zcli project create [flags] - `--env-isolation string` - Environment isolation rule [service, none] (default: "service") - `--mode string` - Project mode [light, serious] (default: "light") - `--name string` - Project name -- `--org-id string` - Organization ID to create project for +- `--org-id string` - Organization ID to create a project for - `--out string` - Output format using Go template syntax - `--ssh-isolation string` - SSH isolation rules (default: "vpn") - `--tags strings` - Project tags (comma-separated list or repeated flag) @@ -21748,10 +21753,15 @@ zcli project env [flags] - `--service string` - Service name, in which context the environment variables are output - `--template string` - Output template (default: "`{{.Key}}={{.Value}}`") - `--user-only` - Exclude all non user env variables +### project list +Lists all projects you have access to. +```sh +zcli project list +``` ### project project-import Creates a new project with one or more services from a YAML definition. ```sh -zcli project project-import importYamlPath [flags] +zcli project project-import [flags] ``` **Flags:** - `--org-id string` - Organization ID where the project should be created (required for multiple organizations) @@ -21759,17 +21769,9 @@ zcli project project-import importYamlPath [flags] ### project service-import Creates one or more services in an existing project from a YAML definition. ```sh -zcli project service-import importYamlPath [flags] -``` -**Flags:** -- `-P, --project-id string` - Required when you have access to multiple projects -### project scope -Sets or clears the default project scope for commands that require a project ID. -```sh -zcli project scope [project-id] [flags] +zcli project service-import [flags] ``` **Flags:** -- `--clear` - Clear project scope - `-P, --project-id string` - Required when you have access to multiple projects ## Service Operations ### service list @@ -21780,7 +21782,7 @@ zcli service list [flags] **Flags:** - `-P, --project-id string` - Required when you have access to multiple projects ### service create -Creates a new service for specified project. +Creates a new service for a specified project. ```sh zcli service create [flags] ``` @@ -21794,7 +21796,7 @@ zcli service create [flags] - `--out string` - Output format using Go template syntax - `-P, --project-id string` - Required when you have access to multiple projects - `--ssh-isolation string` - SSH isolation rules (default: "vpn") -- `--start-without-code` - Start service immediately without deploy +- `--start-without-code` - Start service immediately without deployment - `--working-dir string` - Sets custom working directory (default: "./") - `--zerops-yaml-path string` - Sets custom path to zerops.yml file ### service push @@ -21813,13 +21815,13 @@ zcli service push [service-id-or-name] [flags] - `-v, --verbose` - Log additional debug data to the zCLI [debug log file](/references/zcli/configuration#logging-configuration) - `--version-name string` - Adds a custom version name - `--working-dir string` - Sets a custom working directory (default: "./") -- `-w, --workspace-state string` - Defines version of workspace to push: - - `clean` - pushes the HEAD without local changes - - `staged` - pushes only staged files - - `all` - pushes all staged and unstaged files (default) +- `-w, --workspace-state string` - Defines a version of workspace to push: +- `clean` - pushes the HEAD without local changes +- `staged` - pushes only staged files +- `all` - pushes all staged and unstaged files (default) - `--zerops-yaml-path string` - Sets a custom path to the zerops.yml file :::tip -You can also use `zcli push` as a shorthand for `zcli service push`. +You can also use `zcli push` as shorthand for `zcli service push`. To avoid specifying `--project-id` and `--service-id` flags repeatedly, you can set default values in a `.zcli.yml` file or via environment variables. See the [Configuration](/references/zcli/configuration) page for details. ::: ### service deploy @@ -21864,7 +21866,7 @@ zcli service log [flags] - `--follow` - Continuously poll for new log messages - `--format string` - Log output format (FULL, SHORT, JSON, JSONSTREAM) (default: "FULL") - `--format-template string` - Custom log format -- `--limit int` - Number of recent log messages to return (1-1000, default: 100) +- `--limit int` - Number of recent log messages to return (1–1000, default: 100) - `--message-type string` - Select APPLICATION or WEBSERVER log messages (default: "APPLICATION") - `--minimum-severity string` - Filter by severity level - `-P, --project-id string` - Required when you have access to multiple projects @@ -21897,10 +21899,10 @@ Generates shell autocompletion scripts. zcli completion {bash|fish|powershell|zsh} ``` **Available Shells:** -- `bash` - Generate autocompletion script for Bash -- `fish` - Generate autocompletion script for Fish +- `bash` - Generate an autocompletion script for Bash +- `fish` - Generate an autocompletion script for Fish - `powershell` - Generate autocompletion script for PowerShell -- `zsh` - Generate autocompletion script for Zsh +- `zsh` - Generate an autocompletion script for Zsh **Example:** ```sh zcli completion bash > ~/.zerops-completion.bash