The Buildkite CLI

The Buildkite CLI is a command-line interface (CLI) tool for interacting directly with Buildkite itself. This tool provides command line/terminal access to work with a subset of Buildkite's features, as you normally would through Buildkite's web interface.

Using the Buildkite CLI, you can view builds, create and cancel builds, unblock jobs, stop agents, along with several other actions.

Installation

The Buildkite CLI can be installed on all major platforms. Learn more about how to install the tool on your platform in Buildkite CLI installation.

Usage

$ bk
Usage: bk  [flags]

Work with Buildkite from the command line.

Flags:
  -h, --help        Show context-sensitive help.
  -y, --yes         Skip all confirmation prompts
      --no-input    Disable all interactive prompts
  -q, --quiet       Suppress progress output

Commands:
  agent pause  [flags]
    Pause a Buildkite agent.

  agent list [flags]
    List agents.

  agent resume 
    Resume a Buildkite agent.

  agent stop [ ...] [flags]
    Stop Buildkite agents.

  agent view  [flags]
    View details of an agent.

  api [ ...] [flags]
    Interact with the Buildkite API

  artifacts download 
    Download an artifact by its UUID.

  artifacts list [] [flags]
    List artifacts for a build or a job in a build.

  build create (new) [flags]
    Create a new build.

  build cancel  [flags]
    Cancel a build.

  build view [] [flags]
    View build information.

  build list [flags]
    List builds.

  build download [] [flags]
    Download resources for a build.

  build rebuild [] [flags]
    Rebuild a build.

  build watch [] [flags]
    Watch a build's progress in real-time.

  cluster list [flags]
    List clusters.

  cluster view  [flags]
    View cluster information.

  configure [ ...] [flags]
    Configure Buildkite API token

  init [ ...] [flags]
    Initialize a pipeline.yaml file

  job cancel  [flags]
    Cancel a job.

  job list [flags]
    List jobs.

  job retry 
    Retry a job.

  job unblock  [flags]
    Unblock a job.

  pipeline create  [flags]
    Create a new pipeline.

  pipeline list [flags]
    List pipelines.

  pipeline migrate --file=STRING [flags]
    Migrate a CI/CD pipeline configuration to Buildkite format.

  pipeline validate [flags]
    Validate a pipeline YAML file.

  pipeline view [] [flags]
    View a pipeline.

  package [ ...] [flags]
    Manage packages

  use [ ...] [flags]
    Select an organization

  user [ ...] [flags]
    Invite users to the organization

  version [ ...] [flags]
    Print the version of the CLI being used

  whoami [flags]
    Print the current user and organization

Run "bk  --help" for more information on a command.

Configuration

The Buildkite CLI requires an API access token to interact with Buildkite and your Buildkite organizations. Learn more about how to configure these API access tokens in Buildkite CLI configuration.