Skip to content

Commit c0f7e01

Browse files
authored
zcli project scope & project env (#282)
1 parent 738f857 commit c0f7e01

File tree

3 files changed

+299
-254
lines changed

3 files changed

+299
-254
lines changed

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

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ zcli project delete [project-id] [flags]
109109
- `--confirm` - Skip confirmation prompts for destructive operations
110110
- `-P, --project-id string` - Required when you have access to multiple projects
111111

112+
### project env
113+
114+
Displays environment variables for the current project scope.
115+
116+
```sh
117+
zcli project env [flags]
118+
```
119+
120+
**Flags:**
121+
- `--export` - Prepends export keyword to each env in output: `export {{.Key}}={{.Value}}`
122+
- `-P, --project-id string` - Required when you have access to multiple projects
123+
- `--service string` - Service name, in which context the environment variables are output
124+
- `--template string` - Output template (default: "`{{.Key}}={{.Value}}`")
125+
- `--user-only` - Exclude all non user env variables
126+
112127
### project project-import
113128

114129
Creates a new project with one or more services from a YAML definition.
@@ -132,25 +147,17 @@ zcli project service-import importYamlPath [flags]
132147
**Flags:**
133148
- `-P, --project-id string` - Required when you have access to multiple projects
134149

135-
### scope project
150+
### project scope
136151

137-
Sets the default project for commands that require a project ID.
152+
Sets or clears the default project scope for commands that require a project ID.
138153

139154
```sh
140-
zcli scope project [project-id]
155+
zcli project scope [project-id] [flags]
141156
```
142157

143-
:::tip
144-
Instead of using the `scope project` command, you can also set a default project ID in a `.zcli.yml` file or via the `ZEROPS_PROJECTID` environment variable. See the [Configuration](/references/cli/configuration) page for details.
145-
:::
146-
147-
### scope reset
148-
149-
Resets the default project and service scope.
150-
151-
```sh
152-
zcli scope reset
153-
```
158+
**Flags:**
159+
- `--clear` - Clear project scope
160+
- `-P, --project-id string` - Required when you have access to multiple projects
154161

155162
## Service Operations
156163

0 commit comments

Comments
 (0)