bk build annotations lists build and job annotations
Introduced 2026-10-20 · score 0.98
HOW TO USE IT
When inspecting or scripting against annotations for a Buildkite build, run `bk build annotations` with a build number, qualified selector, or Buildkite build URL. Add `--pipeline` if pipeline inference is ambiguous, then choose a text, JSON, or YAML output format.
bk build annotations 123 --pipeline <pipeline> --jsonbk build annotations <org>/<pipeline>/123 --textbk build annotations <buildkite-build-url> --yamlWHY THIS HELPS
Inspect or script against annotations attached to a Buildkite build.
BEFORE THIS CHANGE
Annotations were available inside `bk build view`; there was no standalone command to retrieve them for inspection or scripting.
REQUIREMENTS AND LIMITATIONS
- Version: v3.64.2
- build argument (required): Build number, `<org>/<pipeline>/<number>` selector, or Buildkite build URL.
- --pipeline, -p: Pipeline slug or `<org>/<pipeline>`; inferred from configuration or repository if omitted. Use when inference is ambiguous.
- --json: Output as JSON.
- --yaml: Output as YAML.
- --text: Output as text.
- --output, -o: Select `json`, `yaml`, or `text`; the format flags are mutually exclusive with each other.
- Prerequisite: An authenticated Buildkite CLI configuration; targeting another organization requires credentials for that organization.
- Prerequisite: The token must have the `read_builds` scope.
- Requires the `read_builds` token scope.
- JSON/YAML never prompts for pipeline selection; specify `--pipeline` when inference is ambiguous.
- Qualified selectors use the target organization's credentials.
- Annotation bodies are rendered HTML, not original Markdown; text output also preserves HTML.
- Errors, including a failed later page, return a nonzero exit status with no partial results on stdout.
FIRST-PARTY EVIDENCE
- https://github.com/buildkite/cli/releases/tag/v3.64.2
- https://github.com/buildkite/cli/pull/1051
- https://github.com/buildkite/cli/blob/v3.64.2/cmd/build/annotations.go
- https://github.com/buildkite/cli/blob/v3.64.2/pkg/output/flags.go
- https://github.com/buildkite/cli/blob/v3.64.2/README.md
Check the installed version and the source before using it. Entry JSON