Skip to content

Commit 5add7d6

Browse files
authored
update zcli commands - add scope project (#311)
1 parent 56fe0f4 commit 5add7d6

2 files changed

Lines changed: 62 additions & 56 deletions

File tree

apps/docs/content/references/zcli/commands.mdx

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,25 @@ For more detailed information about Zerops VPN configuration and troubleshooting
7272

7373
## Project Management
7474

75-
### project list
75+
### scope project
7676

77-
Lists all projects you have access to.
77+
Sets the scope for a project. All commands that require project ID will use the selected one.
7878

7979
```sh
80-
zcli project list
80+
zcli scope project [project-id]
81+
```
82+
83+
### scope reset
84+
85+
Resets the scope for a project.
86+
87+
```sh
88+
zcli scope reset
8189
```
8290

8391
### project create
8492

85-
Creates a new project for specified organization.
93+
Creates a new project for a specified organization.
8694

8795
```sh
8896
zcli project create [flags]
@@ -92,7 +100,7 @@ zcli project create [flags]
92100
- `--env-isolation string` - Environment isolation rule [service, none] (default: "service")
93101
- `--mode string` - Project mode [light, serious] (default: "light")
94102
- `--name string` - Project name
95-
- `--org-id string` - Organization ID to create project for
103+
- `--org-id string` - Organization ID to create a project for
96104
- `--out string` - Output format using Go template syntax
97105
- `--ssh-isolation string` - SSH isolation rules (default: "vpn")
98106
- `--tags strings` - Project tags (comma-separated list or repeated flag)
@@ -124,12 +132,20 @@ zcli project env [flags]
124132
- `--template string` - Output template (default: "`{{.Key}}={{.Value}}`")
125133
- `--user-only` - Exclude all non user env variables
126134

135+
### project list
136+
137+
Lists all projects you have access to.
138+
139+
```sh
140+
zcli project list
141+
```
142+
127143
### project project-import
128144

129145
Creates a new project with one or more services from a YAML definition.
130146

131147
```sh
132-
zcli project project-import importYamlPath [flags]
148+
zcli project project-import <importYamlPath> [flags]
133149
```
134150

135151
**Flags:**
@@ -141,22 +157,10 @@ zcli project project-import importYamlPath [flags]
141157
Creates one or more services in an existing project from a YAML definition.
142158

143159
```sh
144-
zcli project service-import importYamlPath [flags]
145-
```
146-
147-
**Flags:**
148-
- `-P, --project-id string` - Required when you have access to multiple projects
149-
150-
### project scope
151-
152-
Sets or clears the default project scope for commands that require a project ID.
153-
154-
```sh
155-
zcli project scope [project-id] [flags]
160+
zcli project service-import <importYamlPath> [flags]
156161
```
157162

158163
**Flags:**
159-
- `--clear` - Clear project scope
160164
- `-P, --project-id string` - Required when you have access to multiple projects
161165

162166
## Service Operations
@@ -174,7 +178,7 @@ zcli service list [flags]
174178

175179
### service create
176180

177-
Creates a new service for specified project.
181+
Creates a new service for a specified project.
178182

179183
```sh
180184
zcli service create [flags]
@@ -190,7 +194,7 @@ zcli service create [flags]
190194
- `--out string` - Output format using Go template syntax
191195
- `-P, --project-id string` - Required when you have access to multiple projects
192196
- `--ssh-isolation string` - SSH isolation rules (default: "vpn")
193-
- `--start-without-code` - Start service immediately without deploy
197+
- `--start-without-code` - Start service immediately without deployment
194198
- `--working-dir string` - Sets custom working directory (default: "./")
195199
- `--zerops-yaml-path string` - Sets custom path to zerops.yml file
196200

@@ -213,14 +217,14 @@ zcli service push [service-id-or-name] [flags]
213217
- `-v, --verbose` - Log additional debug data to the zCLI [debug log file](/references/zcli/configuration#logging-configuration)
214218
- `--version-name string` - Adds a custom version name
215219
- `--working-dir string` - Sets a custom working directory (default: "./")
216-
- `-w, --workspace-state string` - Defines version of workspace to push:
217-
- `clean` - pushes the HEAD without local changes
218-
- `staged` - pushes only staged files
219-
- `all` - pushes all staged and unstaged files (default)
220+
- `-w, --workspace-state string` - Defines a version of workspace to push:
221+
- `clean` - pushes the HEAD without local changes
222+
- `staged` - pushes only staged files
223+
- `all` - pushes all staged and unstaged files (default)
220224
- `--zerops-yaml-path string` - Sets a custom path to the zerops.yml file
221225

222226
:::tip
223-
You can also use `zcli push` as a shorthand for `zcli service push`.
227+
You can also use `zcli push` as shorthand for `zcli service push`.
224228

225229
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.
226230
:::
@@ -286,7 +290,7 @@ zcli service log [flags]
286290
- `--follow` - Continuously poll for new log messages
287291
- `--format string` - Log output format (FULL, SHORT, JSON, JSONSTREAM) (default: "FULL")
288292
- `--format-template string` - Custom log format
289-
- `--limit int` - Number of recent log messages to return (1-1000, default: 100)
293+
- `--limit int` - Number of recent log messages to return (11000, default: 100)
290294
- `--message-type string` - Select APPLICATION or WEBSERVER log messages (default: "APPLICATION")
291295
- `--minimum-severity string` - Filter by severity level
292296
- `-P, --project-id string` - Required when you have access to multiple projects
@@ -336,10 +340,10 @@ zcli completion {bash|fish|powershell|zsh}
336340
```
337341

338342
**Available Shells:**
339-
- `bash` - Generate autocompletion script for Bash
340-
- `fish` - Generate autocompletion script for Fish
343+
- `bash` - Generate an autocompletion script for Bash
344+
- `fish` - Generate an autocompletion script for Fish
341345
- `powershell` - Generate autocompletion script for PowerShell
342-
- `zsh` - Generate autocompletion script for Zsh
346+
- `zsh` - Generate an autocompletion script for Zsh
343347

344348
**Example:**
345349
```sh

apps/docs/static/llms-full.txt

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21711,21 +21711,26 @@ zcli vpn down
2171121711
For more detailed information about Zerops VPN configuration and troubleshooting, visit the [VPN Documentation](/references/networking/vpn).
2171221712
:::
2171321713
## Project Management
21714-
### project list
21715-
Lists all projects you have access to.
21714+
### scope project
21715+
Sets the scope for a project. All commands that require project ID will use the selected one.
2171621716
```sh
21717-
zcli project list
21717+
zcli scope project [project-id]
21718+
```
21719+
### scope reset
21720+
Resets the scope for a project.
21721+
```sh
21722+
zcli scope reset
2171821723
```
2171921724
### project create
21720-
Creates a new project for specified organization.
21725+
Creates a new project for a specified organization.
2172121726
```sh
2172221727
zcli project create [flags]
2172321728
```
2172421729
**Flags:**
2172521730
- `--env-isolation string` - Environment isolation rule [service, none] (default: "service")
2172621731
- `--mode string` - Project mode [light, serious] (default: "light")
2172721732
- `--name string` - Project name
21728-
- `--org-id string` - Organization ID to create project for
21733+
- `--org-id string` - Organization ID to create a project for
2172921734
- `--out string` - Output format using Go template syntax
2173021735
- `--ssh-isolation string` - SSH isolation rules (default: "vpn")
2173121736
- `--tags strings` - Project tags (comma-separated list or repeated flag)
@@ -21748,28 +21753,25 @@ zcli project env [flags]
2174821753
- `--service string` - Service name, in which context the environment variables are output
2174921754
- `--template string` - Output template (default: "`{{.Key}}={{.Value}}`")
2175021755
- `--user-only` - Exclude all non user env variables
21756+
### project list
21757+
Lists all projects you have access to.
21758+
```sh
21759+
zcli project list
21760+
```
2175121761
### project project-import
2175221762
Creates a new project with one or more services from a YAML definition.
2175321763
```sh
21754-
zcli project project-import importYamlPath [flags]
21764+
zcli project project-import [flags]
2175521765
```
2175621766
**Flags:**
2175721767
- `--org-id string` - Organization ID where the project should be created (required for multiple organizations)
2175821768
- `--working-dir string` - Sets a custom working directory (default: "./")
2175921769
### project service-import
2176021770
Creates one or more services in an existing project from a YAML definition.
2176121771
```sh
21762-
zcli project service-import importYamlPath [flags]
21763-
```
21764-
**Flags:**
21765-
- `-P, --project-id string` - Required when you have access to multiple projects
21766-
### project scope
21767-
Sets or clears the default project scope for commands that require a project ID.
21768-
```sh
21769-
zcli project scope [project-id] [flags]
21772+
zcli project service-import [flags]
2177021773
```
2177121774
**Flags:**
21772-
- `--clear` - Clear project scope
2177321775
- `-P, --project-id string` - Required when you have access to multiple projects
2177421776
## Service Operations
2177521777
### service list
@@ -21780,7 +21782,7 @@ zcli service list [flags]
2178021782
**Flags:**
2178121783
- `-P, --project-id string` - Required when you have access to multiple projects
2178221784
### service create
21783-
Creates a new service for specified project.
21785+
Creates a new service for a specified project.
2178421786
```sh
2178521787
zcli service create [flags]
2178621788
```
@@ -21794,7 +21796,7 @@ zcli service create [flags]
2179421796
- `--out string` - Output format using Go template syntax
2179521797
- `-P, --project-id string` - Required when you have access to multiple projects
2179621798
- `--ssh-isolation string` - SSH isolation rules (default: "vpn")
21797-
- `--start-without-code` - Start service immediately without deploy
21799+
- `--start-without-code` - Start service immediately without deployment
2179821800
- `--working-dir string` - Sets custom working directory (default: "./")
2179921801
- `--zerops-yaml-path string` - Sets custom path to zerops.yml file
2180021802
### service push
@@ -21813,13 +21815,13 @@ zcli service push [service-id-or-name] [flags]
2181321815
- `-v, --verbose` - Log additional debug data to the zCLI [debug log file](/references/zcli/configuration#logging-configuration)
2181421816
- `--version-name string` - Adds a custom version name
2181521817
- `--working-dir string` - Sets a custom working directory (default: "./")
21816-
- `-w, --workspace-state string` - Defines version of workspace to push:
21817-
- `clean` - pushes the HEAD without local changes
21818-
- `staged` - pushes only staged files
21819-
- `all` - pushes all staged and unstaged files (default)
21818+
- `-w, --workspace-state string` - Defines a version of workspace to push:
21819+
- `clean` - pushes the HEAD without local changes
21820+
- `staged` - pushes only staged files
21821+
- `all` - pushes all staged and unstaged files (default)
2182021822
- `--zerops-yaml-path string` - Sets a custom path to the zerops.yml file
2182121823
:::tip
21822-
You can also use `zcli push` as a shorthand for `zcli service push`.
21824+
You can also use `zcli push` as shorthand for `zcli service push`.
2182321825
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.
2182421826
:::
2182521827
### service deploy
@@ -21864,7 +21866,7 @@ zcli service log [flags]
2186421866
- `--follow` - Continuously poll for new log messages
2186521867
- `--format string` - Log output format (FULL, SHORT, JSON, JSONSTREAM) (default: "FULL")
2186621868
- `--format-template string` - Custom log format
21867-
- `--limit int` - Number of recent log messages to return (1-1000, default: 100)
21869+
- `--limit int` - Number of recent log messages to return (11000, default: 100)
2186821870
- `--message-type string` - Select APPLICATION or WEBSERVER log messages (default: "APPLICATION")
2186921871
- `--minimum-severity string` - Filter by severity level
2187021872
- `-P, --project-id string` - Required when you have access to multiple projects
@@ -21897,10 +21899,10 @@ Generates shell autocompletion scripts.
2189721899
zcli completion {bash|fish|powershell|zsh}
2189821900
```
2189921901
**Available Shells:**
21900-
- `bash` - Generate autocompletion script for Bash
21901-
- `fish` - Generate autocompletion script for Fish
21902+
- `bash` - Generate an autocompletion script for Bash
21903+
- `fish` - Generate an autocompletion script for Fish
2190221904
- `powershell` - Generate autocompletion script for PowerShell
21903-
- `zsh` - Generate autocompletion script for Zsh
21905+
- `zsh` - Generate an autocompletion script for Zsh
2190421906
**Example:**
2190521907
```sh
2190621908
zcli completion bash > ~/.zerops-completion.bash

0 commit comments

Comments
 (0)