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
chore: release CLI version 2.0.0 with API key support and documentation updates
- Bumped CLI version to 2.0.0 in package.json.
- Added `--api-key` option for non-interactive authentication in README.md.
- Enhanced documentation for using the CLI in CI/CD pipelines.
- Updated success message in `generateTypesAction` for clarity.
- Removed redundant success message in `generateTypesAction` to streamline output.
Copy file name to clipboardExpand all lines: packages/cli/README.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,6 +241,7 @@ These options can be used with any command:
241
241
-`--debug`: Enable debug mode for verbose output.
242
242
-`--base-url <url>`: Set the base URL for Bucket API.
243
243
-`--api-url <url>`: Set the API URL directly (overrides base URL).
244
+
-`--api-key <key>`: Bucket API key for non-interactive authentication.
244
245
-`--help`: Display help information for a command.
245
246
246
247
## AI-Assisted Development
@@ -297,6 +298,50 @@ The command will guide you through:
297
298
298
299
_**Note: The setup uses [mcp-remote](https://github.com/geelen/mcp-remote) as a compatibility layer allowing the remote hosted Bucket MCP server to work with all editors/clients that support MCP STDIO servers. If your editor/client supports HTTP Streaming with OAuth you can connect to the Bucket MCP server directly.**_
299
300
301
+
## Using in CI/CD Pipelines (Beta)
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.
304
+
305
+
```bash
306
+
# Generate types in CI/CD
307
+
npx bucket apps list --api-key $BUCKET_API_KEY
308
+
```
309
+
310
+
**Important restrictions:**
311
+
312
+
- When using `--api-key`, the `login` and `logout` commands are disabled.
313
+
- API keys bypass all interactive authentication flows.
314
+
- Only _read-only_ access to Bucket API is granted at the moment.
315
+
- API keys are bound to one app only. Commands such as `apps list` will only return the bound app.
316
+
- Store API keys securely using your CI/CD platform's secret management.
317
+
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
+
Example CI workflow:
334
+
335
+
```yaml
336
+
# 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()
342
+
run: npx bucket features types --api-key ${{ secrets.BUCKET_API_KEY }}
0 commit comments