switchroom 0.13.2 → 0.13.3

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 (66) hide show
  1. package/dist/agent-scheduler/index.js +2 -2
  2. package/dist/auth-broker/index.js +2 -2
  3. package/dist/cli/switchroom.js +21 -18
  4. package/dist/host-control/main.js +2 -2
  5. package/dist/vault/approvals/kernel-server.js +2 -2
  6. package/dist/vault/broker/server.js +2 -2
  7. package/package.json +1 -1
  8. package/telegram-plugin/dist/gateway/gateway.js +42 -10
  9. package/telegram-plugin/gateway/boot-probes.ts +13 -6
  10. package/telegram-plugin/gateway/gateway.ts +44 -6
  11. package/telegram-plugin/hooks/silent-end-interrupt-stop.mjs +5 -1
  12. package/telegram-plugin/silent-end.ts +56 -0
  13. package/telegram-plugin/tests/boot-probes.test.ts +26 -2
  14. package/telegram-plugin/tests/silent-end.test.ts +69 -0
  15. package/skills/buildkite-agent-infrastructure/SKILL.md +0 -321
  16. package/skills/buildkite-agent-infrastructure/agents/openai.yaml +0 -6
  17. package/skills/buildkite-agent-infrastructure/assets/buildkite-icon-large.png +0 -0
  18. package/skills/buildkite-agent-infrastructure/assets/buildkite-icon-small.png +0 -0
  19. package/skills/buildkite-agent-infrastructure/references/audit-logging.md +0 -87
  20. package/skills/buildkite-agent-infrastructure/references/graphql-mutations.md +0 -690
  21. package/skills/buildkite-agent-infrastructure/references/instance-shapes.md +0 -38
  22. package/skills/buildkite-agent-infrastructure/references/pipeline-templates.md +0 -73
  23. package/skills/buildkite-agent-infrastructure/references/self-hosted-agents.md +0 -137
  24. package/skills/buildkite-agent-infrastructure/references/sso-saml.md +0 -92
  25. package/skills/buildkite-agent-runtime/SKILL.md +0 -509
  26. package/skills/buildkite-agent-runtime/agents/openai.yaml +0 -6
  27. package/skills/buildkite-agent-runtime/assets/buildkite-icon-large.png +0 -0
  28. package/skills/buildkite-agent-runtime/assets/buildkite-icon-small.png +0 -0
  29. package/skills/buildkite-agent-runtime/references/flag-reference.md +0 -417
  30. package/skills/buildkite-agent-runtime/references/patterns-and-recipes.md +0 -555
  31. package/skills/buildkite-api/SKILL.md +0 -308
  32. package/skills/buildkite-api/agents/openai.yaml +0 -6
  33. package/skills/buildkite-api/assets/buildkite-icon-large.png +0 -0
  34. package/skills/buildkite-api/assets/buildkite-icon-small.png +0 -0
  35. package/skills/buildkite-api/references/graphql-reference.md +0 -195
  36. package/skills/buildkite-api/references/patterns.md +0 -44
  37. package/skills/buildkite-api/references/webhooks.md +0 -161
  38. package/skills/buildkite-cli/SKILL.md +0 -397
  39. package/skills/buildkite-cli/agents/openai.yaml +0 -6
  40. package/skills/buildkite-cli/assets/buildkite-icon-large.png +0 -0
  41. package/skills/buildkite-cli/assets/buildkite-icon-small.png +0 -0
  42. package/skills/buildkite-cli/references/command-reference.md +0 -181
  43. package/skills/buildkite-migration/SKILL.md +0 -195
  44. package/skills/buildkite-pipelines/SKILL.md +0 -481
  45. package/skills/buildkite-pipelines/agents/openai.yaml +0 -6
  46. package/skills/buildkite-pipelines/assets/buildkite-icon-large.png +0 -0
  47. package/skills/buildkite-pipelines/assets/buildkite-icon-small.png +0 -0
  48. package/skills/buildkite-pipelines/examples/basic-pipeline.yml +0 -24
  49. package/skills/buildkite-pipelines/examples/optimized-pipeline.yml +0 -100
  50. package/skills/buildkite-pipelines/references/advanced-patterns.md +0 -286
  51. package/skills/buildkite-pipelines/references/retry-and-error-codes.md +0 -131
  52. package/skills/buildkite-pipelines/references/step-types-reference.md +0 -225
  53. package/skills/buildkite-secure-delivery/SKILL.md +0 -182
  54. package/skills/buildkite-secure-delivery/agents/openai.yaml +0 -6
  55. package/skills/buildkite-secure-delivery/assets/buildkite-icon-large.png +0 -0
  56. package/skills/buildkite-secure-delivery/assets/buildkite-icon-small.png +0 -0
  57. package/skills/buildkite-secure-delivery/references/oidc-cloud-providers.md +0 -83
  58. package/skills/buildkite-secure-delivery/references/package-publishing.md +0 -100
  59. package/skills/buildkite-test-engine/SKILL.md +0 -256
  60. package/skills/buildkite-test-engine/agents/openai.yaml +0 -6
  61. package/skills/buildkite-test-engine/assets/buildkite-icon-large.png +0 -0
  62. package/skills/buildkite-test-engine/assets/buildkite-icon-small.png +0 -0
  63. package/skills/buildkite-test-engine/examples/bktec-splitting.yml +0 -16
  64. package/skills/buildkite-test-engine/examples/collector-pipeline.yml +0 -11
  65. package/skills/buildkite-test-engine/references/collectors.md +0 -198
  66. package/skills/buildkite-test-engine/references/splitting-examples.md +0 -93
@@ -1,161 +0,0 @@
1
- # Webhooks
2
-
3
- Webhooks deliver HTTP POST requests to a specified URL when events occur in Buildkite. Use them for event-driven automation: failure notifications, auto-retry logic, deployment triggers, status dashboards.
4
-
5
- ## Creating a Webhook
6
-
7
- ```bash
8
- curl -sS -X POST "https://api.buildkite.com/v2/organizations/my-org/webhooks" \
9
- -H "Authorization: Bearer $BUILDKITE_API_TOKEN" \
10
- -H "Content-Type: application/json" \
11
- -d '{
12
- "description": "Build failure handler",
13
- "webhook_url": "https://my-server.example.com/webhooks/buildkite",
14
- "events": ["build.finished", "job.finished"],
15
- "verify_tls_certificates": true,
16
- "token": "my-webhook-secret",
17
- "pipeline_selection": {
18
- "type": "all"
19
- }
20
- }'
21
- ```
22
-
23
- Webhook creation parameters:
24
-
25
- | Field | Required | Description |
26
- |-------|----------|-------------|
27
- | `description` | Yes | Webhook name/description |
28
- | `webhook_url` | Yes | Target URL for POST requests |
29
- | `events` | Yes | Array of event types to subscribe to |
30
- | `verify_tls_certificates` | No | Verify TLS certificates (default: `true`) |
31
- | `token` | No | Secret sent as `X-Buildkite-Token` header |
32
- | `signature_key` | No | Secret for HMAC-SHA256 signature verification |
33
- | `pipeline_selection` | Yes | Object with `type`: `all`, `some`, `teams`, or `clusters` |
34
- | `branch_filter` | No | Branch pattern filter (e.g., `main production/*`) |
35
-
36
- Pipeline selection `type` values: `all` (all pipelines), `some` (add `pipeline_slugs` array), `teams` (add `team_slugs` array), `clusters` (add `cluster_uuids` array).
37
-
38
- ## Event Types
39
-
40
- **Build events:** `build.scheduled`, `build.running`, `build.failing`, `build.finished`, `build.skipped`
41
-
42
- **Job events:** `job.scheduled`, `job.started`, `job.finished`, `job.activated` (block step unblocked)
43
-
44
- **Agent events:** `agent.created`, `agent.destroyed`, `agent.connected`, `agent.disconnected`, `agent.authorized`, `agent.unauthorized`, `agent.busy`, `agent.idle`
45
-
46
- **Other:** `ping` (webhook settings changed), `cluster_token.registration_blocked` (IP restriction)
47
-
48
- The most commonly used events are `build.finished` (react to build completion), `job.finished` (react to individual job results), and `build.failing` (early failure notification).
49
-
50
- ## Webhook Payload Structure
51
-
52
- All payloads contain top-level `event`, `build`, `pipeline`, and `sender` fields:
53
-
54
- ```json
55
- {
56
- "event": "build.finished",
57
- "build": {
58
- "id": "build-uuid",
59
- "url": "https://api.buildkite.com/v2/organizations/my-org/pipelines/my-pipeline/builds/42",
60
- "web_url": "https://buildkite.com/my-org/my-pipeline/builds/42",
61
- "number": 42,
62
- "state": "failed",
63
- "blocked": false,
64
- "message": "Fix login flow",
65
- "commit": "abc123def456",
66
- "branch": "main",
67
- "source": "webhook",
68
- "created_at": "2024-01-15T10:30:00.000Z",
69
- "finished_at": "2024-01-15T10:35:00.000Z",
70
- "meta_data": {},
71
- "creator": { "id": "user-uuid", "name": "Jane Developer" }
72
- },
73
- "pipeline": { "slug": "my-pipeline", "name": "My Pipeline", "repository": "git@github.com:my-org/my-repo.git" },
74
- "sender": { "id": "user-uuid", "name": "Jane Developer" }
75
- }
76
- ```
77
-
78
- Job events (`job.*`) add a `job` field with `id`, `type`, `name`, `state`, `exit_status`, `started_at`, `finished_at`, and `agent` object.
79
-
80
- **Webhook payload gaps:** Webhook payloads lack retry context (whether a job is a retry, original vs. retried) and manual-vs-automatic action flags. For complete build/job context including retry metadata, query the GraphQL API using the IDs from the webhook payload.
81
-
82
- ## HTTP Headers
83
-
84
- Every webhook request includes:
85
-
86
- | Header | Description | Example |
87
- |--------|-------------|---------|
88
- | `X-Buildkite-Event` | Event type | `build.finished` |
89
- | `X-Buildkite-Token` | Plain text secret (if `token` configured) | `my-webhook-secret` |
90
- | `X-Buildkite-Signature` | HMAC-SHA256 signature (if `signature_key` configured) | `timestamp=1234567890,signature=abc123...` |
91
- | `Content-Type` | Always `application/json` | `application/json` |
92
- | `User-Agent` | Buildkite user agent | `Buildkite-Webhook/1.0` |
93
-
94
- ## Signature Verification
95
-
96
- When `signature_key` is configured, verify the `X-Buildkite-Signature` header to confirm the request came from Buildkite.
97
-
98
- The signature format is: `timestamp=<unix_ts>,signature=<hex_hmac>`
99
-
100
- Compute the expected signature over `<timestamp>.<raw_body>`:
101
-
102
- **Node.js / Express:**
103
-
104
- ```javascript
105
- const crypto = require("crypto");
106
-
107
- function verifyWebhookSignature(req, secret) {
108
- const header = req.headers["x-buildkite-signature"];
109
- if (!header) return false;
110
-
111
- const parts = Object.fromEntries(
112
- header.split(",").map(p => p.split("=", 2))
113
- );
114
-
115
- const expected = crypto
116
- .createHmac("sha256", secret)
117
- .update(`${parts.timestamp}.${req.rawBody}`)
118
- .digest("hex");
119
-
120
- return crypto.timingSafeEqual(
121
- Buffer.from(parts.signature),
122
- Buffer.from(expected)
123
- );
124
- }
125
- ```
126
-
127
- For Python, use `hmac.new(secret, f"{timestamp}.{body}", hashlib.sha256).hexdigest()` with `hmac.compare_digest` for timing-safe comparison.
128
-
129
- ## Webhook Handler Example
130
-
131
- Express handler that verifies signatures and auto-retries failed builds:
132
-
133
- ```javascript
134
- const express = require("express");
135
- const crypto = require("crypto");
136
- const app = express();
137
-
138
- app.use(express.json({ verify: (req, res, buf) => { req.rawBody = buf.toString(); } }));
139
-
140
- app.post("/webhooks/buildkite", async (req, res) => {
141
- const sig = req.headers["x-buildkite-signature"];
142
- if (sig) {
143
- const parts = Object.fromEntries(sig.split(",").map(p => p.split("=", 2)));
144
- const expected = crypto.createHmac("sha256", process.env.BUILDKITE_WEBHOOK_SECRET)
145
- .update(`${parts.timestamp}.${req.rawBody}`).digest("hex");
146
- if (!crypto.timingSafeEqual(Buffer.from(parts.signature), Buffer.from(expected)))
147
- return res.status(401).send("Invalid signature");
148
- }
149
-
150
- const { event, build } = req.body;
151
- if (event === "build.finished" && build.state === "failed" && build.branch === "main") {
152
- await fetch(`${build.url}/rebuild`, {
153
- method: "PUT",
154
- headers: { "Authorization": `Bearer ${process.env.BUILDKITE_API_TOKEN}` }
155
- });
156
- }
157
- res.status(200).send("OK");
158
- });
159
-
160
- app.listen(3000);
161
- ```
@@ -1,397 +0,0 @@
1
- ---
2
- name: buildkite-cli
3
- description: >
4
- Use when the user wants to drive Buildkite from the terminal via the `bk`
5
- CLI — triggering, retrying, cancelling, watching, or listing builds;
6
- uploading or downloading artifacts; managing pipeline secrets; or
7
- creating and listing pipelines from the command line.
8
- Triggers on natural phrasings including: "Help me retry a build.",
9
- "List builds, please.", "Let's upload artifacts.", "Let's manage secrets.",
10
- "Help me upload artifacts.", "Could you create a pipeline for me?",
11
- "hey, cancel a build?", "pls list builds", "quick q — can i manage secrets",
12
- "I want to do this from the terminal", "scripting it locally would be easier",
13
- "I'd rather not click around the UI", and typo'd variants like
14
- "list bbuilds", "list pieplines", "retry abuild".
15
- Also fires on `bk`, `bk build`, `bk job`, `bk pipeline`, `bk secret`,
16
- `bk artifact`, `bk cluster`, `bk package`, `bk auth`, `bk configure`,
17
- `bk use`, `bk init`, `bk api`, Buildkite CLI install, terminal-based
18
- Buildkite workflows, or command-line CI/CD operations.
19
- Do NOT use when authoring `.buildkite/pipeline.yml`, standardizing pipelines
20
- across teams, adding plugins, or showing test failures on the build page —
21
- those are `buildkite-pipelines`. Do NOT use for scripted programmatic access
22
- or REST/GraphQL calls — that's `buildkite-api`. Do NOT use for cluster
23
- admin tasks like "create a queue", "configure SSO", "manage cluster
24
- secrets", "set up hosted agents" — those are `buildkite-agent-infrastructure`.
25
- Do NOT use when the user's message starts with "In Buildkite cluster
26
- admin," — that prefix is a hard trigger for `buildkite-agent-infrastructure`
27
- and ALWAYS wins over this skill, even when the action ("create a queue",
28
- "scale queues", "manage secrets") sounds like something `bk` could do
29
- from the terminal; cluster-admin prefix means provisioning intent, not
30
- terminal-workflow intent.
31
- ---
32
-
33
- # Buildkite CLI
34
-
35
- The Buildkite CLI (`bk`) provides terminal access to builds, jobs, pipelines, secrets, artifacts, clusters, and packages. Use it to trigger builds, tail logs, manage secrets, and automate CI/CD workflows without leaving the command line.
36
-
37
- ## Quick Start
38
-
39
- ```bash
40
- # Install
41
- brew tap buildkite/buildkite && brew install buildkite/buildkite/bk
42
-
43
- # Authenticate
44
- bk configure
45
-
46
- # Trigger a build on the current branch
47
- bk build create --pipeline my-app
48
-
49
- # Watch it run
50
- bk build watch 42 --pipeline my-app
51
-
52
- # View logs for a failed job
53
- bk job log <job-id> --pipeline my-app --build 42
54
- ```
55
-
56
- ## Installation
57
-
58
- ```bash
59
- brew tap buildkite/buildkite && brew install buildkite/buildkite/bk
60
- ```
61
-
62
- For binary downloads, shell completion, and verification, see `references/command-reference.md`.
63
-
64
- ## Authentication
65
-
66
- Run `bk configure` to set the organization slug and API access token. This creates `$HOME/.config/bk.yaml` on first run.
67
-
68
- ```bash
69
- bk configure
70
- # Non-interactive (CI/Docker): bk configure --org my-org --token "$BUILDKITE_API_TOKEN" --no-input
71
- ```
72
-
73
- Or use keychain-based auth (v3.31+): `bk auth login`
74
-
75
- ### Token creation
76
-
77
- 1. Open Buildkite > user avatar > **Personal Settings** > **API Access Tokens**
78
- 2. Select **New API Access Token**
79
- 3. Grant scopes: `read_builds`, `write_builds`, `read_pipelines`, `read_artifacts` at minimum
80
- 4. Copy the token and pass it to `bk configure`
81
-
82
- For the full `bk auth` subcommand reference and organization switching (`bk use`), see `references/command-reference.md`.
83
-
84
- ## Builds
85
-
86
- Manage pipeline builds — create, view, list, cancel, retry, and watch.
87
-
88
- ### Create a build
89
-
90
- ```bash
91
- # Build the current branch and commit
92
- bk build create --pipeline my-app
93
-
94
- # Build with environment variables
95
- bk build create --pipeline my-app --branch feature/auth --commit abc1234 --env "DEPLOY_ENV=staging"
96
- ```
97
-
98
- | Flag | Short | Default | Description |
99
- |------|-------|---------|-------------|
100
- | `--pipeline` | `-p` | — | Pipeline slug (required) |
101
- | `--branch` | `-b` | current branch | Git branch to build |
102
- | `--commit` | `-c` | HEAD | Git commit SHA |
103
- | `--message` | `-m` | — | Build message |
104
-
105
- ### View a build
106
-
107
- ```bash
108
- bk build view 42 --pipeline my-app
109
- ```
110
-
111
- ### List builds
112
-
113
- ```bash
114
- # List recent builds for a pipeline
115
- bk build list --pipeline my-app
116
-
117
- # List only failed builds
118
- bk build list --pipeline my-app --state failed
119
- ```
120
-
121
- | Flag | Short | Default | Description |
122
- |------|-------|---------|-------------|
123
- | `--pipeline` | `-p` | — | Pipeline slug (omit for org-wide listing) |
124
- | `--state` | `-s` | — | Filter by state: `running`, `scheduled`, `passed`, `failed`, `blocked`, `canceled`, `canceling`, `skipped`, `not_run`, `finished` |
125
- | `--output` | `-o` | `text` | Output format: `text`, `json` |
126
-
127
- ### Watch a build
128
-
129
- Stream real-time build progress to the terminal. Blocks until the build completes or is canceled.
130
-
131
- ```bash
132
- bk build watch 42 --pipeline my-app
133
- ```
134
-
135
- ### Cancel a build
136
-
137
- ```bash
138
- bk build cancel 42 --pipeline my-app
139
- ```
140
-
141
- The build must be in a `scheduled`, `running`, or `failing` state.
142
-
143
- ### Retry a build
144
-
145
- ```bash
146
- bk build retry 42 --pipeline my-app
147
- ```
148
-
149
- ### Build workflow: trigger and watch
150
-
151
- Combine `create` and `watch` for a complete trigger-and-follow workflow:
152
-
153
- ```bash
154
- # Trigger a build and immediately stream progress
155
- bk build create --pipeline my-app --branch main && bk build watch --pipeline my-app
156
- ```
157
-
158
- ## Jobs
159
-
160
- Manage individual jobs within a build — view logs, retry failures, cancel running jobs.
161
-
162
- ### View job logs
163
-
164
- ```bash
165
- bk job log <job-id> --pipeline my-app --build 42 --follow
166
- ```
167
-
168
- | Flag | Short | Default | Description |
169
- |------|-------|---------|-------------|
170
- | `--pipeline` | `-p` | — | Pipeline slug (required) |
171
- | `--build` | `-b` | — | Build number (required) |
172
- | `--follow` | `-f` | `false` | Stream logs in real-time |
173
-
174
- ### Retry a job
175
-
176
- Each job ID can only be retried once — subsequent retries must use the new job ID returned by the first retry.
177
-
178
- ```bash
179
- bk job retry <job-id> --pipeline my-app --build 42
180
- ```
181
-
182
- ### Cancel a job
183
-
184
- ```bash
185
- bk job cancel <job-id> --pipeline my-app --build 42
186
- ```
187
-
188
- ### Debugging workflow: find failures and read logs
189
-
190
- ```bash
191
- # Find failed builds
192
- bk build list --pipeline my-app --state failed
193
-
194
- # View the build to identify which jobs failed
195
- bk build view 42 --pipeline my-app
196
-
197
- # Read logs for the failed job
198
- bk job log <job-id> --pipeline my-app --build 42
199
- ```
200
-
201
- ## Pipelines
202
-
203
- Manage pipeline configuration — list, create, and update pipelines.
204
-
205
- > For converting pipelines from other CI systems, see the **buildkite-migration** skill.
206
-
207
- ### Convert a pipeline from another CI system
208
-
209
- Convert a GitHub Actions, Jenkins, CircleCI, Bitbucket, GitLab, Harness, or Bitrise pipeline to Buildkite YAML. No login required — uses a public API.
210
-
211
- ```bash
212
- # Auto-detect vendor from file path and save to .buildkite/pipeline.<vendor>.yml
213
- bk pipeline convert -F .github/workflows/ci.yml
214
- bk pipeline convert -F .circleci/config.yml
215
- bk pipeline convert -F Jenkinsfile
216
-
217
- # Specify vendor explicitly (required for gitlab, harness, bitrise)
218
- bk pipeline convert -F .gitlab-ci.yml --vendor gitlab
219
-
220
- # Custom output path
221
- bk pipeline convert -F .github/workflows/ci.yml --output .buildkite/pipeline.yml
222
-
223
- # Read from stdin
224
- cat .github/workflows/ci.yml | bk pipeline convert --vendor github
225
- ```
226
-
227
- | Flag | Short | Default | Description |
228
- |------|-------|---------|-------------|
229
- | `--file` | `-F` | — | Path to source pipeline file (required unless using stdin) |
230
- | `--vendor` | `-v` | auto-detected | Source CI vendor: `github`, `bitbucket`, `circleci`, `jenkins`, `gitlab`, `harness`, `bitrise` |
231
- | `--output` | `-o` | `.buildkite/pipeline.<vendor>.yml` | Output file path |
232
- | `--timeout` | — | `300` | Cancellation timeout in seconds |
233
-
234
- ### List pipelines
235
-
236
- ```bash
237
- bk pipeline list
238
- ```
239
-
240
- ### Create a pipeline
241
-
242
- ```bash
243
- bk pipeline create --name "My App" --repository "git@github.com:org/my-app.git"
244
- ```
245
-
246
- | Flag | Short | Default | Description |
247
- |------|-------|---------|-------------|
248
- | `--name` | `-n` | — | Pipeline name (required) |
249
- | `--repository` | `-r` | — | Git repository URL (required) |
250
- | `--cluster` | | — | Cluster UUID to assign the pipeline to |
251
- | `--description` | `-d` | — | Pipeline description |
252
-
253
- > For pipeline YAML configuration after creation, see the **buildkite-pipelines** skill.
254
-
255
- ### Update a pipeline
256
-
257
- ```bash
258
- bk pipeline update my-app --description "Production application pipeline"
259
- ```
260
-
261
- ## Secrets
262
-
263
- Manage cluster-scoped secrets for pipelines. Secrets are encrypted and accessible to all agents within a cluster.
264
-
265
- > For using secrets inside pipeline YAML (`secrets:` key) and inside job steps (`buildkite-agent secret get`), see the **buildkite-pipelines** skill and **buildkite-agent-runtime** skill respectively.
266
-
267
- ### Create a secret
268
-
269
- ```bash
270
- bk secret create MY_SECRET --cluster my-cluster --value "$TOKEN"
271
- ```
272
-
273
- | Flag | Short | Default | Description |
274
- |------|-------|---------|-------------|
275
- | `--cluster` | | — | Cluster UUID or slug (required) |
276
- | `--value` | | — | Secret value (omit for interactive prompt) |
277
- | `--description` | `-d` | — | Human-readable description |
278
-
279
- **Naming rules:**
280
- - Keys must contain only letters, numbers, and underscores
281
- - Keys cannot begin with `buildkite` or `bk` (case-insensitive)
282
- - Exception: `BUILDKITE_API_TOKEN` is allowed
283
-
284
- ### List secrets
285
-
286
- ```bash
287
- bk secret list --cluster my-cluster
288
- ```
289
-
290
- ### Update a secret
291
-
292
- ```bash
293
- bk secret update MY_SECRET --cluster my-cluster --value "$NEW_TOKEN"
294
- ```
295
-
296
- ### Delete a secret
297
-
298
- ```bash
299
- bk secret delete MY_SECRET --cluster my-cluster
300
- ```
301
-
302
- ## Artifacts
303
-
304
- Upload and download build artifacts from the terminal.
305
-
306
- ### Download artifacts
307
-
308
- ```bash
309
- bk artifact download "dist/*.tar.gz" --pipeline my-app --build 42
310
- ```
311
-
312
- ### Upload artifacts
313
-
314
- ```bash
315
- bk artifact upload "dist/**/*" --pipeline my-app --build 42 --job <job-id>
316
- ```
317
-
318
- > For uploading artifacts from within a running job step, use `buildkite-agent artifact upload` — see the **buildkite-agent-runtime** skill. For declaring artifact paths in pipeline YAML (`artifact_paths:`), see the **buildkite-pipelines** skill.
319
-
320
- ## Clusters
321
-
322
- List and view clusters with `bk cluster list` and `bk cluster view <slug>`. For flags and examples, see `references/command-reference.md`.
323
-
324
- > For cluster creation, queue management, and infrastructure provisioning, see the **buildkite-agent-infrastructure** skill.
325
-
326
- ## Packages
327
-
328
- List registries with `bk package list` and push packages with `bk package push <file> --registry <slug>`. For flags and supported formats, see `references/command-reference.md`.
329
-
330
- > For OIDC-based authentication to package registries (no static credentials), see the **buildkite-secure-delivery** skill.
331
-
332
- ## Raw API Access
333
-
334
- Make direct REST or GraphQL API calls with `bk api <path>` (REST) or `bk api --graphql --data '<query>'` (GraphQL). For flags and examples, see `references/command-reference.md`.
335
-
336
- > For comprehensive REST and GraphQL API documentation (endpoints, mutations, pagination, webhooks), see the **buildkite-api** skill.
337
-
338
- ## Users
339
-
340
- Invite users with `bk user invite user@example.com`. See `references/command-reference.md` for details.
341
-
342
- ## Pipeline Initialization
343
-
344
- Scaffold a starter `pipeline.yaml` with `bk init`. For pipeline YAML syntax and step types, see the **buildkite-pipelines** skill. See `references/command-reference.md` for details.
345
-
346
- ## MCP Server Alternatives
347
-
348
- When the Buildkite MCP server is available, agents can use MCP tools for direct access without shell execution. The table below maps CLI commands to their MCP equivalents:
349
-
350
- | CLI Command | MCP Tool | Notes |
351
- |-------------|----------|-------|
352
- | `bk build create` | `create_build` | MCP handles auth automatically |
353
- | `bk build view` | `get_build` | MCP returns structured data |
354
- | `bk build list` | `list_builds` | MCP supports the same filters |
355
- | `bk job log` | `read_logs`, `tail_logs` | MCP supports streaming |
356
- | `bk pipeline list` | `list_pipelines` | |
357
- | `bk pipeline create` | `create_pipeline` | |
358
- | `bk pipeline update` | `update_pipeline` | |
359
- | `bk artifact download` | `list_artifacts_for_build`, `get_artifact` | |
360
- | `bk cluster list` | `list_clusters` | |
361
- | `bk auth status` | `current_user`, `access_token` | |
362
- | `bk secret create/list/delete` | — | No MCP equivalent; CLI required |
363
- | `bk package push` | — | No MCP equivalent; CLI required |
364
- | `bk job retry` | — | No MCP equivalent; CLI required |
365
- | `bk job cancel` | — | No MCP equivalent; CLI required |
366
- | `bk build watch` | — | No MCP equivalent; CLI required |
367
- | `bk api` | — | Use MCP tools for read operations; CLI for custom API calls |
368
-
369
- **When to use CLI vs MCP:** Use MCP tools when available — they handle authentication, pagination, and response parsing automatically. Fall back to the CLI when MCP does not cover the operation (secrets, packages, job retry, build watch) or when the agent needs to execute commands in a Bash workflow.
370
-
371
- ## Common Mistakes
372
-
373
- | Mistake | What happens | Fix |
374
- |---------|-------------|-----|
375
- | Running `bk` commands before `bk configure` | Every command fails with authentication errors | Run `bk configure` or `bk auth login` first |
376
- | Running `bk configure` in Docker/CI without `--no-input` | Hangs or fails trying to read from TTY or system keychain | Add `--no-input` flag: `bk configure --org my-org --token "$TOKEN" --no-input` |
377
- | Omitting `--pipeline` on build commands | Command fails or targets the wrong pipeline | Always pass `--pipeline <slug>` explicitly |
378
- | Retrying a job ID that was already retried | API returns 422 error — each job ID can only be retried once | Use the new job ID returned by the first retry |
379
- | Creating secrets with keys starting with `buildkite` or `bk` | Creation fails — reserved prefix | Choose a different key name (exception: `BUILDKITE_API_TOKEN`) |
380
- | Passing secret values as literal strings in `--value` | Values persist in shell history and process list | Use env var references (`--value "$TOKEN"`) or interactive prompts |
381
- | Using `bk build cancel` on a completed build | API returns error — only `scheduled`, `running`, or `failing` builds can be canceled | Check build state with `bk build view` first |
382
- | Expecting `bk artifact download` to work cross-cluster | Artifacts are cluster-scoped by default | Ensure both pipelines are in the same cluster or configure cross-cluster artifact access |
383
- | Confusing `bk` CLI with `buildkite-agent` | `bk` runs on local machines to interact with the Buildkite API; `buildkite-agent` runs inside CI job steps | Use `bk` from terminal, `buildkite-agent` inside pipeline step commands |
384
-
385
- ## Additional Resources
386
-
387
- ### Reference Files
388
- - **`references/command-reference.md`** — Full installation methods, auth subcommands, organization switching, and detailed flags/examples for clusters, packages, API access, users, and pipeline initialization
389
-
390
- ## Further Reading
391
-
392
- - [Buildkite Docs for LLMs](https://buildkite.com/docs/llms.txt)
393
- - [Buildkite CLI overview](https://buildkite.com/docs/platform/cli.md)
394
- - [CLI command reference](https://buildkite.com/docs/platform/cli/reference.md)
395
- - [CLI installation](https://buildkite.com/docs/platform/cli/installation.md)
396
- - [CLI configuration and authentication](https://buildkite.com/docs/platform/cli/configuration.md)
397
- - [Managing secrets](https://buildkite.com/docs/pipelines/security/secrets/buildkite-secrets.md)
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Buildkite CLI"
3
- short_description: "bk commands for builds, jobs, pipelines, secrets, and artifacts"
4
- icon_small: "./assets/buildkite-icon-small.png"
5
- icon_large: "./assets/buildkite-icon-large.png"
6
- brand_color: "#00D974"