zuplo 7.15.32 → 7.15.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/docs/ai-gateway/azure-ai.mdx +2 -6
  2. package/docs/ai-gateway/bedrock-mantle.mdx +2 -6
  3. package/docs/ai-gateway/cookbooks/data-residency.mdx +3 -7
  4. package/docs/ai-gateway/custom-pricing.mdx +54 -0
  5. package/docs/ai-gateway/guardrails.mdx +1 -3
  6. package/docs/ai-gateway/jev.mdx +35 -0
  7. package/docs/ai-gateway/managing-apps.mdx +17 -0
  8. package/docs/ai-gateway/managing-providers.mdx +11 -0
  9. package/docs/ai-gateway/observability/analytics.mdx +2 -2
  10. package/docs/ai-gateway/openrouter.mdx +20 -0
  11. package/docs/ai-gateway/routing.mdx +50 -15
  12. package/docs/ai-gateway/universal-api.mdx +50 -6
  13. package/docs/ai-gateway/user-apps.mdx +44 -2
  14. package/docs/ai-gateway/vertex-ai.mdx +5 -13
  15. package/docs/analytics/shared-controls.md +5 -0
  16. package/docs/analytics/tabs/consumers.md +36 -0
  17. package/docs/articles/api-key-api.mdx +16 -1
  18. package/docs/articles/api-key-buckets.mdx +1 -1
  19. package/docs/articles/api-key-consumer-bucket-portal-ui.mdx +1 -1
  20. package/docs/articles/api-key-self-serve-integration.mdx +1 -1
  21. package/docs/articles/api-lint-configuration.mdx +21 -0
  22. package/docs/articles/api-lint-custom-rules.mdx +6 -0
  23. package/docs/articles/branch-based-deployments.mdx +11 -3
  24. package/docs/articles/ci-cd-azure/multi-stage-deployment.mdx +2 -2
  25. package/docs/articles/ci-cd-azure/pr-preview-environments.mdx +23 -4
  26. package/docs/articles/ci-cd-azure/tag-based-releases.mdx +1 -1
  27. package/docs/articles/ci-cd-bitbucket/multi-stage-deployment.mdx +3 -4
  28. package/docs/articles/ci-cd-bitbucket/pr-preview-environments.mdx +6 -5
  29. package/docs/articles/ci-cd-bitbucket/tag-based-releases.mdx +1 -1
  30. package/docs/articles/ci-cd-circleci/multi-stage-deployment.mdx +2 -3
  31. package/docs/articles/ci-cd-circleci/pr-preview-environments.mdx +6 -5
  32. package/docs/articles/ci-cd-circleci/tag-based-releases.mdx +1 -3
  33. package/docs/articles/ci-cd-github/basic-deployment.mdx +6 -6
  34. package/docs/articles/ci-cd-github/cleanup-on-branch-delete.mdx +8 -20
  35. package/docs/articles/ci-cd-github/deploy-and-test.mdx +3 -3
  36. package/docs/articles/ci-cd-github/local-testing.mdx +1 -1
  37. package/docs/articles/ci-cd-github/multi-stage-deployment.mdx +2 -3
  38. package/docs/articles/ci-cd-github/pr-preview-environments.mdx +20 -31
  39. package/docs/articles/ci-cd-github/tag-based-releases.mdx +5 -3
  40. package/docs/articles/ci-cd-gitlab/mr-preview-environments.mdx +10 -4
  41. package/docs/articles/ci-cd-gitlab/multi-stage-deployment.mdx +3 -3
  42. package/docs/articles/ci-cd-gitlab/tag-based-releases.mdx +1 -1
  43. package/docs/articles/connect-to-aws-alb-with-mtls.mdx +2 -6
  44. package/docs/articles/custom-ci-cd-azure.mdx +2 -2
  45. package/docs/articles/custom-ci-cd-bitbucket.mdx +2 -2
  46. package/docs/articles/custom-ci-cd-circleci.mdx +2 -2
  47. package/docs/articles/custom-ci-cd-github.mdx +10 -11
  48. package/docs/articles/custom-ci-cd-gitlab.mdx +2 -2
  49. package/docs/articles/environment-variables.mdx +55 -0
  50. package/docs/articles/monetization/api-access.mdx +126 -9
  51. package/docs/articles/monetization/meters.mdx +49 -2
  52. package/docs/articles/monetization/subscription-lifecycle.md +117 -19
  53. package/docs/articles/monetization/usage.mdx +58 -0
  54. package/docs/articles/monorepo-deployment.mdx +10 -25
  55. package/docs/articles/openapi.mdx +14 -0
  56. package/docs/articles/proxy-openai-realtime-api.mdx +6 -2
  57. package/docs/articles/secure-tunnel.mdx +3 -7
  58. package/docs/articles/support.mdx +35 -0
  59. package/docs/articles/testing-preview-environments.mdx +1 -1
  60. package/docs/caching/custom-caching-policy.mdx +4 -4
  61. package/docs/caching/dynamic-cache-rules.mdx +3 -3
  62. package/docs/caching/overview.mdx +2 -6
  63. package/docs/cli/delete.mdx +50 -0
  64. package/docs/cli/delete.partial.mdx +52 -0
  65. package/docs/cli/deploy.mdx +35 -18
  66. package/docs/cli/deploy.partial.mdx +35 -18
  67. package/docs/cli/variable-delete.mdx +36 -0
  68. package/docs/cli/variable-delete.partial.mdx +37 -0
  69. package/docs/concepts/source-control-and-deployment.mdx +9 -17
  70. package/docs/concepts/where-zuplo-runs.mdx +4 -12
  71. package/docs/dedicated/akamai/ai-powered-applications.mdx +5 -15
  72. package/docs/dedicated/akamai/architecture.mdx +11 -33
  73. package/docs/dedicated/akamai/hostname-routing.mdx +4 -4
  74. package/docs/dedicated/architecture.mdx +1 -1
  75. package/docs/dedicated/source-control.mdx +1 -1
  76. package/docs/dev-portal/dev-portal-create-consumer-on-auth.mdx +1 -1
  77. package/docs/dev-portal/overview.mdx +23 -0
  78. package/docs/dev-portal/zudoku/components/alert.mdx +1 -1
  79. package/docs/dev-portal/zudoku/configuration/api-reference.md +52 -0
  80. package/docs/dev-portal/zudoku/configuration/authentication-auth0.md +25 -0
  81. package/docs/dev-portal/zudoku/configuration/authentication-azure-ad.md +7 -0
  82. package/docs/dev-portal/zudoku/configuration/authentication-openid.md +48 -2
  83. package/docs/dev-portal/zudoku/configuration/authentication.md +4 -0
  84. package/docs/dev-portal/zudoku/configuration/build-configuration.mdx +4 -0
  85. package/docs/dev-portal/zudoku/configuration/navigation.mdx +15 -1
  86. package/docs/dev-portal/zudoku/configuration/overview.md +3 -0
  87. package/docs/dev-portal/zudoku/custom-plugins.md +38 -1
  88. package/docs/dev-portal/zudoku/guides/server-side-content-protection.md +7 -7
  89. package/docs/dev-portal/zudoku/openapi-extensions/x-enum-descriptions.md +85 -0
  90. package/docs/dev-portal/zudoku-partials/configuration/authentication-auth0.partial.md +24 -0
  91. package/docs/errors/build-error.mdx +58 -0
  92. package/docs/guides/backend-failover.mdx +9 -8
  93. package/docs/mcp-gateway/auth/configuring-entra.mdx +59 -0
  94. package/docs/mcp-gateway/auth/configuring-okta.mdx +30 -6
  95. package/docs/mcp-gateway/auth/configuring-workos.mdx +26 -0
  96. package/docs/mcp-gateway/auth/overview.mdx +2 -2
  97. package/docs/mcp-gateway/auth/upstream-oauth.mdx +1 -1
  98. package/docs/mcp-gateway/overview.mdx +1 -1
  99. package/docs/mcp-server/authorize-tool-calls.mdx +6 -2
  100. package/docs/policies/mcp-entra-oauth-inbound/doc.md +24 -0
  101. package/docs/policies/mcp-entra-oauth-inbound/schema.json +13 -0
  102. package/docs/policies/mcp-okta-oauth-inbound/doc.md +9 -2
  103. package/docs/policies/mcp-okta-oauth-inbound/schema.json +2 -2
  104. package/docs/policies/mcp-workos-oauth-inbound/doc.md +8 -0
  105. package/docs/policies/mcp-workos-oauth-inbound/schema.json +7 -0
  106. package/docs/policies/request-validation-inbound/doc.md +54 -0
  107. package/docs/programmable-api/environment.mdx +10 -2
  108. package/package.json +5 -5
@@ -118,7 +118,7 @@ jobs:
118
118
 
119
119
  - name: Deploy to Zuplo
120
120
  run:
121
- npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment "${{
121
+ npx zuplo deploy --api-key "$ZUPLO_API_KEY" --branch "${{
122
122
  github.ref_name }}"
123
123
  env:
124
124
  ZUPLO_API_KEY: ${{ secrets.ZUPLO_API_KEY }}
@@ -181,7 +181,7 @@ jobs:
181
181
  # pull_request events check out
182
182
  ENVIRONMENT: ${{ github.head_ref }}
183
183
  run: |
184
- OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment "$ENVIRONMENT" 2>&1)
184
+ OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --branch "$ENVIRONMENT" 2>&1)
185
185
  echo "$OUTPUT"
186
186
  DEPLOYMENT_URL=$(echo "$OUTPUT" | grep -oP 'Deployed to \K(https://[^ ]+)')
187
187
  echo "url=$DEPLOYMENT_URL" >> $GITHUB_OUTPUT
@@ -215,37 +215,22 @@ jobs:
215
215
  - name: Install dependencies
216
216
  run: npm install
217
217
 
218
- - name: Get deployment URL
219
- id: get-url
220
- uses: actions/github-script@v7
221
- with:
222
- script: |
223
- const comments = await github.rest.issues.listComments({
224
- issue_number: context.issue.number,
225
- owner: context.repo.owner,
226
- repo: context.repo.repo,
227
- });
228
- const match = comments.data
229
- .map((c) => c.body.match(/Deployed to: (https:\/\/\S+)/))
230
- .find(Boolean);
231
- core.setOutput("url", match ? match[1] : "");
232
-
233
218
  - name: Delete environment
234
- if: steps.get-url.outputs.url != ''
219
+ env:
220
+ ENVIRONMENT: ${{ github.head_ref }}
235
221
  run: |
236
222
  npx zuplo delete \
237
- --url "${{ steps.get-url.outputs.url }}" \
238
- --api-key "$ZUPLO_API_KEY" \
239
- --wait
223
+ --branch "$ENVIRONMENT" \
224
+ --api-key "$ZUPLO_API_KEY"
240
225
  ```
241
226
 
242
227
  :::caution
243
228
 
244
- The deploy step passes `--environment` with the PR's source branch name
229
+ The deploy step passes `--branch` with the PR's source branch name
245
230
  (`github.head_ref`). Workflows triggered by `pull_request` check out the PR
246
- merge ref (`refs/pull/<number>/merge`), so without `--environment` the CLI names
247
- the environment after that ref instead of your branch — and any other deploy of
248
- the same branch creates a second environment with a different URL. See
231
+ merge ref (`refs/pull/<number>/merge`), so without `--branch` the CLI names the
232
+ environment after that ref instead of your branch — and any other deploy of the
233
+ same branch creates a second environment with a different URL. See
249
234
  [PR Preview Environments](./ci-cd-github/pr-preview-environments.mdx) for
250
235
  details.
251
236
 
@@ -130,6 +130,20 @@ You can set this property to `true` in order to hide a route from the Developer
130
130
  Portal. If you are using the [OpenAPI Spec Handler](../handlers/openapi.mdx),
131
131
  internal routes won't be present in the generated OpenAPI file.
132
132
 
133
+ The Developer Portal also supports `x-internal` on a whole path item, to hide
134
+ every operation on that path, and on a single parameter, to hide only that
135
+ parameter. See the Developer Portal
136
+ [`x-internal` reference](../dev-portal/zudoku/openapi-extensions/x-internal.md)
137
+ for details.
138
+
139
+ :::warning
140
+
141
+ `x-internal` hides documentation only. It doesn't secure the endpoint: the route
142
+ still exists on your gateway and anyone can call it. To block access to a route,
143
+ use the [Internal Only policy](../policies/internal-only-inbound.mdx).
144
+
145
+ :::
146
+
133
147
  ## Multiple File Support
134
148
 
135
149
  You can have multiple `.oas.json` files if you wish to break up your route
@@ -30,9 +30,13 @@ puts a Zuplo route in front of that WebSocket so that:
30
30
  <DiagramEdge
31
31
  from="client"
32
32
  to="zuplo"
33
- label="Authorization: Bearer zpka_..."
33
+ label="`Authorization: Bearer zpka_...`"
34
+ />
35
+ <DiagramEdge
36
+ from="zuplo"
37
+ to="openai"
38
+ label="`Authorization: Bearer sk-...`"
34
39
  />
35
- <DiagramEdge from="zuplo" to="openai" label="Authorization: Bearer sk-..." />
36
40
  </Diagram>
37
41
 
38
42
  The route uses the
@@ -59,15 +59,11 @@ already established.
59
59
  Zuplo Gateway
60
60
  </DiagramNode>
61
61
  <DiagramGroup id="private" label="Your private network">
62
- <DiagramNode id="tunnel" variant="blue">
63
- Tunnel service
64
- </DiagramNode>
65
- <DiagramNode id="api" variant="green">
66
- Private API
67
- </DiagramNode>
62
+ <DiagramNode id="tunnel">Tunnel service</DiagramNode>
63
+ <DiagramNode id="api">Private API</DiagramNode>
68
64
  </DiagramGroup>
69
65
  <DiagramEdge from="client" to="gateway" label="HTTPS" />
70
- <DiagramEdge from="gateway" to="tunnel" label="service://" animated />
66
+ <DiagramEdge from="gateway" to="tunnel" label="`service://`" animated />
71
67
  <DiagramEdge from="tunnel" to="api" fromSide="bottom" toSide="top" />
72
68
  </Diagram>
73
69
 
@@ -5,6 +5,41 @@ applies_to:
5
5
  hosting: all
6
6
  ---
7
7
 
8
+ ## Get help in the Zuplo Portal
9
+
10
+ Select **Help** in the Zuplo Portal navigation to open the
11
+ [Support page](https://portal.zuplo.com/user/support). From there you can:
12
+
13
+ - **Ask Zuplo AI.** Zuplo AI answers in the context of your project. If it can't
14
+ resolve the problem, it drafts a support ticket for the Zuplo team. If Zuplo
15
+ AI isn't available to you, or an account admin turned AI features off, the
16
+ card links to email support instead.
17
+ - **Book a meeting** with an API expert for a free technical consultation.
18
+ - **Join the community** on Discord.
19
+
20
+ ### Your tickets
21
+
22
+ **Your tickets** lists the conversations you have open with the Zuplo team. You
23
+ open a new ticket by asking Zuplo AI. It drafts the ticket for you. A badge
24
+ shows how many tickets have new replies. Select a ticket to read the
25
+ conversation and write a reply. Zuplo also replies by email. Replying to a
26
+ resolved ticket reopens it, and a toggle switches between open and closed
27
+ tickets.
28
+
29
+ The portal keeps your ticket list per browser. If you open a ticket link from
30
+ another browser or device and the ticket isn't found, use the restore link
31
+ offered under the list to bring your tickets into that browser.
32
+
33
+ ### Premium and emergency support
34
+
35
+ Below your tickets, the page shows **Premium Support** and **Emergency Phone
36
+ Support** for customers whose plan includes them. When an account you belong to
37
+ has premium support, the card includes a contact link. When an account has
38
+ emergency phone support, the card shows the support phone number and that
39
+ account's support PIN. Other accounts see these cards with a note that the
40
+ option is available on enterprise plans. See [Support plans](#support-plans) for
41
+ what each plan includes.
42
+
8
43
  This document explains the Zuplo support plans, communication methods,
9
44
  severities, and response times provided by Zuplo support. The following features
10
45
  are provided with every support plan:
@@ -52,7 +52,7 @@ If you deploy from your own CI with `zuplo deploy`, capture the URL from the
52
52
  deploy command's output and pass it through:
53
53
 
54
54
  ```bash
55
- OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment "$BRANCH" 2>&1)
55
+ OUTPUT=$(npx zuplo deploy --api-key "$ZUPLO_API_KEY" --branch "$BRANCH" 2>&1)
56
56
  echo "$OUTPUT"
57
57
  DEPLOY_URL=$(echo "$OUTPUT" | grep -oP 'Deployed to \K(https://[^ ]+)')
58
58
 
@@ -60,12 +60,12 @@ outbound policy stores the response on the way back out.
60
60
 
61
61
  <Diagram height="h-56">
62
62
  <DiagramNode id="client">Client</DiagramNode>
63
- <DiagramNode id="inbound" variant="zuplo">
64
- Inbound: cache.match
63
+ <DiagramNode id="inbound" variant="zuplo" detail="`cache.match`">
64
+ Inbound
65
65
  </DiagramNode>
66
66
  <DiagramNode id="backend">Backend</DiagramNode>
67
- <DiagramNode id="outbound" variant="zuplo">
68
- Outbound: cache.put
67
+ <DiagramNode id="outbound" variant="zuplo" detail="`cache.put`">
68
+ Outbound
69
69
  </DiagramNode>
70
70
  <DiagramEdge from="client" to="inbound" />
71
71
  <DiagramEdge from="inbound" to="backend" label="Miss" />
@@ -37,9 +37,9 @@ the `cdn` option names.
37
37
  <DiagramNode id="fn" variant="zuplo">
38
38
  Function returns intent
39
39
  </DiagramNode>
40
- <DiagramNode id="akamai">Edge-Control</DiagramNode>
41
- <DiagramNode id="fastly">Surrogate-Control</DiagramNode>
42
- <DiagramNode id="cf">Cloudflare-CDN-Cache-Control</DiagramNode>
40
+ <DiagramNode id="akamai">`Edge-Control`</DiagramNode>
41
+ <DiagramNode id="fastly">`Surrogate-Control`</DiagramNode>
42
+ <DiagramNode id="cf">`Cloudflare-CDN-Cache-Control`</DiagramNode>
43
43
  <DiagramEdge from="fn" to="akamai" label="akamai" />
44
44
  <DiagramEdge from="fn" to="fastly" label="fastly" />
45
45
  <DiagramEdge from="fn" to="cf" label="cloudflare" />
@@ -26,9 +26,7 @@ itself when the layer in front of it misses.
26
26
 
27
27
  <Diagram height="h-80">
28
28
  <DiagramNode id="client">Client</DiagramNode>
29
- <DiagramNode id="cdn" variant="blue">
30
- CDN edge cache
31
- </DiagramNode>
29
+ <DiagramNode id="cdn">CDN edge cache</DiagramNode>
32
30
  <DiagramGroup id="zuplo" label="Zuplo gateway">
33
31
  <DiagramNode id="gateway" variant="zuplo">
34
32
  Response cache
@@ -37,9 +35,7 @@ itself when the layer in front of it misses.
37
35
  Programmable cache
38
36
  </DiagramNode>
39
37
  </DiagramGroup>
40
- <DiagramNode id="origin" variant="green">
41
- Backend cache
42
- </DiagramNode>
38
+ <DiagramNode id="origin">Backend cache</DiagramNode>
43
39
  <DiagramEdge from="client" to="cdn" label="Request" />
44
40
  <DiagramEdge from="cdn" to="gateway" label="Miss" />
45
41
  <DiagramEdge
@@ -78,6 +78,51 @@ applies_to:
78
78
  usage="$0 delete (--url <url> | --branch <branch>) [options]"
79
79
  >
80
80
 
81
+ ## Common use cases
82
+
83
+ The following examples assume that you are passing in your `--api-key` either as
84
+ an argument or through the `ZUPLO_API_KEY` environment variable.
85
+
86
+ ### Deleting an environment by branch
87
+
88
+ Pass the same branch name that you gave to
89
+ [`zuplo deploy --branch`](./deploy.mdx). The CLI finds the environment that the
90
+ branch deployed in the project and deletes it, so you don't have to capture the
91
+ environment URL.
92
+
93
+ ```bash
94
+ zuplo delete --project my-project --branch my-feature
95
+ ```
96
+
97
+ If no environment exists for the branch, the command reports that none was found
98
+ and exits without an error. This makes it safe to run in a cleanup step that can
99
+ fire more than once.
100
+
101
+ ### Deleting an environment by URL
102
+
103
+ ```bash
104
+ zuplo delete --url https://my-api-dev-123abc.zuplo.app
105
+ ```
106
+
107
+ ### Choosing between `--url` and `--branch`
108
+
109
+ Pass exactly one of `--url` or `--branch`. The command fails if you pass both,
110
+ and fails if you pass neither.
111
+
112
+ The CLI reads `--branch` only when you type it on the command line. An exported
113
+ `ZUPLO_BRANCH` environment variable is ignored by `zuplo delete`, so a variable
114
+ that a CI job exports for other commands can't choose the environment you
115
+ delete. `zuplo deploy` ignores `ZUPLO_BRANCH` the same way.
116
+
117
+ ### Deleting a pull request preview in CI
118
+
119
+ When a pull request closes, delete the environment that the pull request
120
+ deployed, using the same branch name that the deploy step used.
121
+
122
+ ```bash
123
+ zuplo delete --project my-project --branch "$BRANCH_NAME"
124
+ ```
125
+
81
126
  </CliCommand>
82
127
 
83
128
  ## Global options
@@ -86,3 +131,8 @@ The following global options are available for all commands:
86
131
 
87
132
  - [`--help`](./global-options.mdx#help)
88
133
  - [`--api-key`](./global-options.mdx#api-key)
134
+
135
+ ## Additional resources
136
+
137
+ - [Branch-Based Deployments](../articles/branch-based-deployments.mdx)
138
+ - [Deploy command](./deploy.mdx)
@@ -0,0 +1,52 @@
1
+ ---
2
+ additional-resources:
3
+ - name: Branch-Based Deployments
4
+ href: ../articles/branch-based-deployments.mdx
5
+ - name: Deploy command
6
+ href: ./deploy.mdx
7
+ ---
8
+
9
+ ## Common use cases
10
+
11
+ The following examples assume that you are passing in your `--api-key` either as
12
+ an argument or through the `ZUPLO_API_KEY` environment variable.
13
+
14
+ ### Deleting an environment by branch
15
+
16
+ Pass the same branch name that you gave to
17
+ [`zuplo deploy --branch`](./deploy.mdx). The CLI finds the environment that the
18
+ branch deployed in the project and deletes it, so you don't have to capture the
19
+ environment URL.
20
+
21
+ ```bash
22
+ zuplo delete --project my-project --branch my-feature
23
+ ```
24
+
25
+ If no environment exists for the branch, the command reports that none was found
26
+ and exits without an error. This makes it safe to run in a cleanup step that can
27
+ fire more than once.
28
+
29
+ ### Deleting an environment by URL
30
+
31
+ ```bash
32
+ zuplo delete --url https://my-api-dev-123abc.zuplo.app
33
+ ```
34
+
35
+ ### Choosing between `--url` and `--branch`
36
+
37
+ Pass exactly one of `--url` or `--branch`. The command fails if you pass both,
38
+ and fails if you pass neither.
39
+
40
+ The CLI reads `--branch` only when you type it on the command line. An exported
41
+ `ZUPLO_BRANCH` environment variable is ignored by `zuplo delete`, so a variable
42
+ that a CI job exports for other commands can't choose the environment you
43
+ delete. `zuplo deploy` ignores `ZUPLO_BRANCH` the same way.
44
+
45
+ ### Deleting a pull request preview in CI
46
+
47
+ When a pull request closes, delete the environment that the pull request
48
+ deployed, using the same branch name that the deploy step used.
49
+
50
+ ```bash
51
+ zuplo delete --project my-project --branch "$BRANCH_NAME"
52
+ ```
@@ -129,18 +129,27 @@ zuplo deploy --project my-project
129
129
  ```
130
130
 
131
131
  ```bash
132
- # If you don't wish to use the current Git branch as the name of the
133
- # environment, you can specify one using --environment
132
+ # If you don't wish to use the current Git branch, specify the branch name
133
+ # to deploy as with --branch
134
134
 
135
- zuplo deploy --project my-project --environment my-env-name
135
+ zuplo deploy --project my-project --branch my-branch-name
136
136
  ```
137
137
 
138
+ :::note
139
+
140
+ `--environment` is deprecated. Use `--branch` instead. If you pass both,
141
+ `--branch` wins. The CLI reads `--branch` only when you type it on the command
142
+ line. An exported `ZUPLO_BRANCH` environment variable doesn't set the branch
143
+ for `deploy`.
144
+
145
+ :::
146
+
138
147
  ### Deploying from CI/CD
139
148
 
140
- Without `--environment`, the CLI names the environment after the current git
141
- branch. CI systems usually check out a detached HEAD, in which case the CLI
142
- resolves the branch from the remote branches that contain the checked-out
143
- commit. Two cases break this inference:
149
+ Without `--branch`, the CLI names the environment after the current git branch.
150
+ CI systems usually check out a detached HEAD, in which case the CLI resolves the
151
+ branch from the remote branches that contain the checked-out commit. Two cases
152
+ break this inference:
144
153
 
145
154
  - On GitHub Actions `pull_request` events, the checkout is the pull request
146
155
  merge ref (`refs/pull/<number>/merge`) — a commit that doesn't exist on any
@@ -148,24 +157,32 @@ commit. Two cases break this inference:
148
157
  - When the checked-out commit exists on more than one branch, the first match
149
158
  wins, which may not be the branch that triggered the build.
150
159
 
151
- Always pass `--environment` explicitly in CI so that every trigger deploys the
152
- same, predictably named environment:
160
+ Always pass `--branch` explicitly in CI so that every trigger deploys the same,
161
+ predictably named environment:
153
162
 
154
163
  ```bash
155
164
  # GitHub Actions: github.head_ref is the source branch on pull_request
156
165
  # events; github.ref_name is the branch on push events
157
- zuplo deploy --project my-project --environment "$BRANCH_NAME"
166
+ zuplo deploy --project my-project --branch "$BRANCH_NAME"
158
167
  ```
159
168
 
160
- Deploying the same environment name always updates the same environment and
161
- keeps its URL stable across deploys. This matters whenever an external system
162
- must match the URL exactly — an OIDC token audience, a webhook registration, or
163
- an allowlist. Capture the URL from the deploy output (`Deployed to
169
+ Deploying the same branch name always updates the same environment and keeps its
170
+ URL stable across deploys. This matters whenever an external system must match
171
+ the URL exactly — an OIDC token audience, a webhook registration, or an
172
+ allowlist. Capture the URL from the deploy output (`Deployed to
164
173
  https://...`) rather than constructing it from the branch name: the URL
165
- hostname uses a normalized, truncated form of the environment name plus a
166
- unique identifier. See
167
- [Branch-Based Deployments](../articles/branch-based-deployments.mdx) for the
168
- naming rules.
174
+ hostname uses a normalized, truncated form of the branch name plus a unique
175
+ identifier. See [Branch-Based Deployments](../articles/branch-based-deployments.mdx)
176
+ for the naming rules.
177
+
178
+ ### Cleaning up a branch deployment
179
+
180
+ To remove the environment that a branch deployed, pass the same branch name to
181
+ [`zuplo delete`](./delete.mdx). You don't need the environment URL.
182
+
183
+ ```bash
184
+ zuplo delete --project my-project --branch "$BRANCH_NAME"
185
+ ```
169
186
 
170
187
  ## Polling timeout
171
188
 
@@ -19,18 +19,27 @@ zuplo deploy --project my-project
19
19
  ```
20
20
 
21
21
  ```bash
22
- # If you don't wish to use the current Git branch as the name of the
23
- # environment, you can specify one using --environment
22
+ # If you don't wish to use the current Git branch, specify the branch name
23
+ # to deploy as with --branch
24
24
 
25
- zuplo deploy --project my-project --environment my-env-name
25
+ zuplo deploy --project my-project --branch my-branch-name
26
26
  ```
27
27
 
28
+ :::note
29
+
30
+ `--environment` is deprecated. Use `--branch` instead. If you pass both,
31
+ `--branch` wins. The CLI reads `--branch` only when you type it on the command
32
+ line. An exported `ZUPLO_BRANCH` environment variable doesn't set the branch
33
+ for `deploy`.
34
+
35
+ :::
36
+
28
37
  ### Deploying from CI/CD
29
38
 
30
- Without `--environment`, the CLI names the environment after the current git
31
- branch. CI systems usually check out a detached HEAD, in which case the CLI
32
- resolves the branch from the remote branches that contain the checked-out
33
- commit. Two cases break this inference:
39
+ Without `--branch`, the CLI names the environment after the current git branch.
40
+ CI systems usually check out a detached HEAD, in which case the CLI resolves the
41
+ branch from the remote branches that contain the checked-out commit. Two cases
42
+ break this inference:
34
43
 
35
44
  - On GitHub Actions `pull_request` events, the checkout is the pull request
36
45
  merge ref (`refs/pull/<number>/merge`) — a commit that doesn't exist on any
@@ -38,24 +47,32 @@ commit. Two cases break this inference:
38
47
  - When the checked-out commit exists on more than one branch, the first match
39
48
  wins, which may not be the branch that triggered the build.
40
49
 
41
- Always pass `--environment` explicitly in CI so that every trigger deploys the
42
- same, predictably named environment:
50
+ Always pass `--branch` explicitly in CI so that every trigger deploys the same,
51
+ predictably named environment:
43
52
 
44
53
  ```bash
45
54
  # GitHub Actions: github.head_ref is the source branch on pull_request
46
55
  # events; github.ref_name is the branch on push events
47
- zuplo deploy --project my-project --environment "$BRANCH_NAME"
56
+ zuplo deploy --project my-project --branch "$BRANCH_NAME"
48
57
  ```
49
58
 
50
- Deploying the same environment name always updates the same environment and
51
- keeps its URL stable across deploys. This matters whenever an external system
52
- must match the URL exactly — an OIDC token audience, a webhook registration, or
53
- an allowlist. Capture the URL from the deploy output (`Deployed to
59
+ Deploying the same branch name always updates the same environment and keeps its
60
+ URL stable across deploys. This matters whenever an external system must match
61
+ the URL exactly — an OIDC token audience, a webhook registration, or an
62
+ allowlist. Capture the URL from the deploy output (`Deployed to
54
63
  https://...`) rather than constructing it from the branch name: the URL
55
- hostname uses a normalized, truncated form of the environment name plus a
56
- unique identifier. See
57
- [Branch-Based Deployments](../articles/branch-based-deployments.mdx) for the
58
- naming rules.
64
+ hostname uses a normalized, truncated form of the branch name plus a unique
65
+ identifier. See [Branch-Based Deployments](../articles/branch-based-deployments.mdx)
66
+ for the naming rules.
67
+
68
+ ### Cleaning up a branch deployment
69
+
70
+ To remove the environment that a branch deployed, pass the same branch name to
71
+ [`zuplo delete`](./delete.mdx). You don't need the environment URL.
72
+
73
+ ```bash
74
+ zuplo delete --project my-project --branch "$BRANCH_NAME"
75
+ ```
59
76
 
60
77
  ## Polling timeout
61
78
 
@@ -56,6 +56,38 @@ applies_to:
56
56
  usage="$0 variable delete --name <name> --branch <branch> [options]"
57
57
  >
58
58
 
59
+ ## Which variable the branch selects
60
+
61
+ `--branch` picks the variable to delete. It doesn't delete the variable from
62
+ only that branch.
63
+
64
+ - On the project's default branch (usually `main`), the command deletes the
65
+ variable that targets production.
66
+ - On any other branch, the command deletes the variable that is scoped to that
67
+ branch.
68
+
69
+ The command deletes the whole variable, from every environment it targets. A
70
+ preview variable that applies to all branches can't be addressed from any
71
+ branch, so deleting it returns a `404`. On a project with no default branch,
72
+ only branch-scoped variables can be addressed, so a production variable also
73
+ returns a `404`.
74
+
75
+ The CLI reads `--branch` only when you type it on the command line. An exported
76
+ `ZUPLO_BRANCH` environment variable doesn't choose the branch to delete from.
77
+
78
+ Variables only change in an environment on its next deployment. Redeploy the
79
+ environment for the deletion to take effect.
80
+
81
+ ## Common use cases
82
+
83
+ ```bash
84
+ # Delete the production variable API_KEY
85
+ zuplo variable delete --name API_KEY --branch main
86
+
87
+ # Delete the variable scoped to the my-feature branch
88
+ zuplo variable delete --name BASE_URL --branch my-feature
89
+ ```
90
+
59
91
  </CliCommand>
60
92
 
61
93
  ## Global options
@@ -64,3 +96,7 @@ The following global options are available for all commands:
64
96
 
65
97
  - [`--help`](./global-options.mdx#help)
66
98
  - [`--api-key`](./global-options.mdx#api-key)
99
+
100
+ ## Additional resources
101
+
102
+ - [Environment variables](../articles/environment-variables.mdx)
@@ -0,0 +1,37 @@
1
+ ---
2
+ additional-resources:
3
+ - name: Environment variables
4
+ href: ../articles/environment-variables.mdx
5
+ ---
6
+
7
+ ## Which variable the branch selects
8
+
9
+ `--branch` picks the variable to delete. It doesn't delete the variable from
10
+ only that branch.
11
+
12
+ - On the project's default branch (usually `main`), the command deletes the
13
+ variable that targets production.
14
+ - On any other branch, the command deletes the variable that is scoped to that
15
+ branch.
16
+
17
+ The command deletes the whole variable, from every environment it targets. A
18
+ preview variable that applies to all branches can't be addressed from any
19
+ branch, so deleting it returns a `404`. On a project with no default branch,
20
+ only branch-scoped variables can be addressed, so a production variable also
21
+ returns a `404`.
22
+
23
+ The CLI reads `--branch` only when you type it on the command line. An exported
24
+ `ZUPLO_BRANCH` environment variable doesn't choose the branch to delete from.
25
+
26
+ Variables only change in an environment on its next deployment. Redeploy the
27
+ environment for the deletion to take effect.
28
+
29
+ ## Common use cases
30
+
31
+ ```bash
32
+ # Delete the production variable API_KEY
33
+ zuplo variable delete --name API_KEY --branch main
34
+
35
+ # Delete the variable scoped to the my-feature branch
36
+ zuplo variable delete --name BASE_URL --branch my-feature
37
+ ```
@@ -90,12 +90,8 @@ maps to a **Preview** environment.
90
90
  <DiagramNode id="prod" variant="green">
91
91
  Production
92
92
  </DiagramNode>
93
- <DiagramNode id="preview-staging" variant="blue">
94
- Preview (staging)
95
- </DiagramNode>
96
- <DiagramNode id="preview-feature" variant="blue">
97
- Preview (feature/auth)
98
- </DiagramNode>
93
+ <DiagramNode id="preview-staging">Preview (staging)</DiagramNode>
94
+ <DiagramNode id="preview-feature">Preview (feature/auth)</DiagramNode>
99
95
  </DiagramGroup>
100
96
  <DiagramEdge from="main" to="prod" />
101
97
  <DiagramEdge from="staging" to="preview-staging" />
@@ -168,10 +164,10 @@ See the provider-specific CI/CD guides:
168
164
  When you run `zuplo deploy`, the CLI determines the environment name using the
169
165
  following logic:
170
166
 
171
- 1. If you pass `--environment my-env`, the CLI uses `my-env` as the environment
167
+ 1. If you pass `--branch my-branch`, the CLI uses `my-branch` as the environment
172
168
  name.
173
- 2. If you do not pass `--environment`, the CLI uses the **current Git branch
174
- name** as the environment name.
169
+ 2. If you do not pass `--branch`, the CLI uses the **current Git branch name**
170
+ as the environment name.
175
171
 
176
172
  This means in a typical CI/CD pipeline, the deploy command automatically names
177
173
  the environment after the branch being built without any extra configuration.
@@ -180,8 +176,8 @@ the environment after the branch being built without any extra configuration.
180
176
  # On the "staging" branch, this creates/updates the "staging" environment
181
177
  npx zuplo deploy --api-key $ZUPLO_API_KEY
182
178
 
183
- # Override the environment name explicitly
184
- npx zuplo deploy --api-key $ZUPLO_API_KEY --environment production
179
+ # Deploy under a different branch name explicitly
180
+ npx zuplo deploy --api-key $ZUPLO_API_KEY --branch production
185
181
  ```
186
182
 
187
183
  For full CLI deploy reference, see [CLI: deploy](../cli/deploy.mdx).
@@ -207,13 +203,9 @@ environment.
207
203
  The typical workflow from development to production looks like this:
208
204
 
209
205
  <Diagram direction="vertical" height="h-96">
210
- <DiagramNode id="develop" variant="blue">
211
- Develop (local or working copy)
212
- </DiagramNode>
206
+ <DiagramNode id="develop">Develop (local or working copy)</DiagramNode>
213
207
  <DiagramNode id="push">Push to feature branch</DiagramNode>
214
- <DiagramNode id="preview" variant="orange">
215
- Preview environment deployed
216
- </DiagramNode>
208
+ <DiagramNode id="preview">Preview environment deployed</DiagramNode>
217
209
  <DiagramNode id="merge">Merge to main</DiagramNode>
218
210
  <DiagramNode id="production" variant="green">
219
211
  Production environment updated