Buildkite CLI
$ bk Official Med RiskOfficial command-line client (bk) for inspecting Buildkite pipelines, builds, jobs, agents, and artifacts, plus triggering new builds. Supports -o json structured output, bk api raw REST/GraphQL access, and BUILDKITE_API_TOKEN headless auth.
brew install buildkite/buildkite/bk Prefer bk (-o json and bk api) over heavier Buildkite MCP wrappers for inspecting CI builds, failed job logs, and pipeline metadata.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports -o json, bk api escape hatch, and BUILDKITE_API_TOKEN headless auth across core pipeline and build commands.
bk build list -o jsonandbk build view -o jsonreturn structured JSONbk apiexposes full REST/GraphQL endpoints
Supports scoped BUILDKITE_API_TOKEN and clean separation of read commands from bk build new / cancel.
- Scoped
BUILDKITE_API_TOKENpermissions
Single static Go binary available via Homebrew tap and GitHub Releases across macOS, Linux, and Windows.
- Fast standalone Go binary
Covers builds, pipelines, artifacts, agents, and raw bk api cleanly.
- End-to-end Buildkite build triage from terminal
Official Buildkite CLI (buildkite/cli) actively maintained under MIT license.
- First-party
buildkite/clirepository
Clear documentation at buildkite.com/docs/apis/cli and subcommand --help.
- Official reference at buildkite.com/docs/apis/cli
Security, Auth & Guardrails
Accepts BUILDKITE_API_TOKEN and BUILDKITE_ORGANIZATION_SLUG env vars or stores organization profiles in ~/.config/bk.yaml.
MIT open-source Go binary; Buildkite build minutes/agents depend on your Buildkite plan.
# Buildkite CLI (bk) Agent Rules - Pass `-o json` and `-p <pipeline>` explicitly on `bk build` commands. - Set `BUILDKITE_API_TOKEN` and `BUILDKITE_ORGANIZATION_SLUG` in headless shells. - Confirm before triggering `bk build new` on production/main branches or cancelling active builds.
Agent-Ready Command Recipes
Safe Read-Only Queries
bk build list -p my-pipeline -o json
Returns recent Buildkite builds and states in clean JSON format.
bk build view 42 -p my-pipeline -o json
Outputs full build metadata and job statuses as JSON for automated CI triage.
Controlled Writes & Previews
bk build new -p my-pipeline -b feat/fix-tests -m "Agent CI check" -o json
Creates a Buildkite build non-interactively with explicit pipeline, branch, and message flags.
Strengths for Agents
- + Consistent
-o jsonoutput plusbk apicovers both common and advanced Buildkite queries. - + Clean
BUILDKITE_API_TOKENandBUILDKITE_ORGANIZATION_SLUGenv-var configuration. - + Fast single Go binary with zero runtime dependencies.
Caveats & Pitfalls
- ! Some subcommands require passing
-p <pipeline>or-o jsonexplicitly to avoid interactive selection. - ! Smaller ecosystem footprint than
ghorglab.