You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cli/README.md
+9-21Lines changed: 9 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -300,7 +300,8 @@ _**Note: The setup uses [mcp-remote](https://github.com/geelen/mcp-remote) as a
300
300
301
301
## Using in CI/CD Pipelines (Beta)
302
302
303
-
The Bucket CLI is designed to work seamlessly in CI/CD pipelines. For automated environments where interactive login is not possible, use the `--api-key` option.
303
+
The Bucket CLI is designed to work seamlessly in CI/CD pipelines. For automated environments where interactive login is not possible, use the `--api-key` option,
304
+
or specify the API key in `BUCKET_API_KEY` environment variable.
304
305
305
306
```bash
306
307
# Generate types in CI/CD
@@ -315,31 +316,18 @@ npx bucket apps list --api-key $BUCKET_API_KEY
315
316
- API keys are bound to one app only. Commands such as `apps list` will only return the bound app.
316
317
- Store API keys securely using your CI/CD platform's secret management.
317
318
318
-
### Primary Use Case: Type Validation in CI/CD
319
-
320
-
Use the `--check-only` flag with `features types` to validate that generated types are up-to-date:
321
-
322
-
```bash
323
-
# Check if types are current (exits with non-zero code if not)
324
-
npx bucket features types --check-only --api-key $BUCKET_API_KEY --app-id ap123456789
325
-
```
326
-
327
-
This is particularly useful for:
328
-
329
-
-**Pull Request validation**: Ensure developers have regenerated types after feature changes.
330
-
-**Build verification**: Confirm types are synchronized before deployment.
331
-
-**Automated quality checks**: Catch type drift in your CI pipeline.
332
-
333
319
Example CI workflow:
334
320
335
321
```yaml
336
322
# GitHub Actions example
337
-
- name: Validate Bucket types
338
-
run: npx bucket features types --check-only --api-key ${{ secrets.BUCKET_API_KEY }}
339
-
340
-
- name: Generate types if validation fails
341
-
if: failure()
323
+
- name: Generate types
342
324
run: npx bucket features types --api-key ${{ secrets.BUCKET_API_KEY }}
0 commit comments