Command-line reference overview

The agent has a command line interface (CLI) that lets you interact with and control the agent through the command line. The comprehensive command set lets you interact with Buildkite Pipelines, manage agent configuration, control job execution, and manipulate artifacts. These commands are essential for managing your build infrastructure, automating tasks, and troubleshooting issues.

The agent CLI has the following commands and built-in help. Select a linked command to see more detailed help about it.

$ buildkite-agent --help
Usage:

  buildkite-agent <command> [options...]

Available commands are:

  start             Starts a Buildkite agent
  acknowledgements  Prints the licenses and notices of open source software incorporated into this software.
  tool              Utilities for working with the Buildkite Agent
  help, h           Shows a list of commands or help for one command

Commands that can be run within a Buildkite job:

  annotate    Annotate the build page in the Buildkite UI with information from within a Buildkite job
  annotation  Make changes to annotations on the currently running build
  artifact    Upload/download artifacts from Buildkite jobs
  build       Interact with a Buildkite build
  env         Interact with the environment of the currently running build
  job         Interact with a Buildkite job
  lock        Lock or unlock resources for the currently running build
  redactor    Redact sensitive information from logs
  meta-data   Get/set metadata from Buildkite jobs
  oidc        Interact with Buildkite OpenID Connect (OIDC)
  pause       Pause the agent
  pipeline    Make changes to the pipeline of the currently running build
  resume      Resume the agent
  secret      Interact with Pipelines Secrets
  step        Get or update an attribute of a build step, or cancel unfinished jobs for a step
  stop        Stop the agent

Internal commands, not intended to be run by users:

  bootstrap               Harness used internally by the agent to run jobs as subprocesses
  kubernetes-bootstrap    Harness used internally by the agent to run jobs on Kubernetes
  git-credentials-helper  Internal process used by hosted compute jobs to authenticate with Github

Use "buildkite-agent <command> --help" for more information about a command.