Buildkite CLI pipeline command

The bk pipeline command allows you to manage pipelines from the command line.

Commands

Command Description
bk pipeline copy Copy an existing pipeline.
bk pipeline create Create a new pipeline.
bk pipeline list List pipelines.
bk pipeline migrate Migrate a CI/CD pipeline configuration to Buildkite format.
bk pipeline validate Validate a pipeline YAML file.
bk pipeline view View a pipeline.

Copy pipeline

Copy an existing pipeline.

bk pipeline copy [<pipeline>] [flags]

Arguments

Argument Description
[<pipeline>] Source pipeline to copy (slug or org/slug). Uses current pipeline if not specified.

Flags

Flag Description
-c, --cluster=STRING Cluster name or ID for the new pipeline (required for cross-org copies if target org uses clusters)
-o, --output="json" Output format: json, yaml, text
-t, --target=STRING Name for the new pipeline, or org/name to copy to a different organization
--debug Enable debug output for REST API calls
--dry-run Show what would be copied without creating the pipeline

Examples

Copy the current pipeline to a new pipeline:

bk pipeline cp --target "my-pipeline-v2"

Copy a specific pipeline:

bk pipeline cp my-existing-pipeline --target "my-new-pipeline"

Copy a pipeline from another org (if you have access):

bk pipeline cp other-org/their-pipeline --target "my-copy"

Copy to a different organization:

bk pipeline cp my-pipeline --target "other-org/my-pipeline" --cluster "8302f0b-9b99-4663-23f3-2d64f88s693e"

Interactive mode - prompts for source and target:

bk pipeline cp

Preview what would be copied without creating:

bk pipeline cp my-pipeline --target "copy" --dry-run

Output the new pipeline details as JSON:

bk pipeline cp my-pipeline -t "new-pipeline" -o json

Create a pipeline

Create a new pipeline.

bk pipeline create <name> [flags]

Arguments

Argument Description
<name> Name of the pipeline

Flags

Flag Description
-c, --cluster-id=STRING Cluster name or ID to assign the pipeline to
-d, --description=STRING Description of the pipeline
-o, --output="json" Outputs the created pipeline. One of: json, yaml, text
-r, --repository=STRING Repository URL
--debug Enable debug output for REST API calls
--dry-run Simulate pipeline creation without actually creating it

Examples

Create a new pipeline:

bk pipeline create "My Pipeline" --description "My pipeline description" --repository "git@github.com:org/repo.git"

Create a new pipeline and view the created pipeline in JSON format:

bk pipeline create "My Pipeline" --description "My pipeline description" --repository "git@github.com:org/repo.git" --output json

Create a pipeline with a cluster (by name):

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" -c "my-cluster"

Create a pipeline with a cluster (by ID):

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" -c "cluster-id-123"

Simulate creating a pipeline and view the output in yaml format:

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" --dry-run --output yaml

List pipelines

List pipelines.

bk pipeline list [flags]

Flags

Flag Description
-l, --limit=100 Maximum number of pipelines to return (max: 3000)
-n, --name=STRING Filter pipelines by name (supports partial matches, case insensitive)
-o, --output="json" Output format. One of: json, yaml, text
-r, --repository=STRING Filter pipelines by repository URL (supports partial matches, case insensitive)
--debug Enable debug output for REST API calls

Examples

List all pipelines (default limit: 100):

bk pipeline list

List pipelines matching a name pattern:

bk pipeline list --name pipeline

List pipelines by repository:

bk pipeline list --repo my-repo

Get more pipelines (automatically paginates):

bk pipeline list --limit 500

Output as JSON:

bk pipeline list --name pipeline -o json

Use with other commands (e.g., get longest builds from matching pipelines):

bk pipeline list --name pipeline | xargs -I {} bk build list --pipeline {} --since 48h --duration 1h

Migrate a pipeline

Migrate a CI/CD pipeline configuration to Buildkite format.

bk pipeline migrate --file=STRING [flags]

Flags

Flag Description
-F, --file=STRING Path to the pipeline file to migrate (required)
-o, --output=STRING Custom path to save the migrated pipeline (default: .buildkite/pipeline..yml)
-v, --vendor=STRING CI/CD vendor (auto-detected if not specified)
--ai Use AI-powered migration (recommended for Jenkins)
--debug Enable debug output for REST API calls
--timeout=300 Timeout in seconds (use 600+ for AI migrations)

Examples

Migrate a GitHub Actions workflow:

bk pipeline migrate -F .github/workflows/ci.yml

Migrate with explicit vendor specification:

bk pipeline migrate -F pipeline.yml --vendor circleci

Migrate Jenkins pipeline with AI support:

bk pipeline migrate -F Jenkinsfile --ai

Save output to a file:

bk pipeline migrate -F .github/workflows/ci.yml -o .buildkite/pipeline.yml

Validate a pipeline

Validate a pipeline YAML file.

bk pipeline validate [flags]

Flags

Flag Description
-f, --file=FILE,... Path to the pipeline YAML file(s) to validate
--debug Enable debug output for REST API calls

Examples

Validate the default pipeline file:

bk pipeline validate

Validate a specific pipeline file:

bk pipeline validate --file path/to/pipeline.yaml

Validate multiple pipeline files:

bk pipeline validate --file path/to/pipeline1.yaml --file path/to/pipeline2.yaml

View a pipeline

View a pipeline.

bk pipeline view [<pipeline>] [flags]

Arguments

Argument Description
[<pipeline>] The pipeline to view. This can be a {pipeline slug} or in the format {org slug}/{pipeline slug}.

Flags

Flag Description
-o, --output="json" Output format. One of: json, yaml, text
-w, --web Open the pipeline in a web browser.
--debug Enable debug output for REST API calls

Examples

View a pipeline:

bk pipeline view my-pipeline

View a pipeline in a specific organization:

bk pipeline view my-org/my-pipeline

Open pipeline in browser:

bk pipeline view my-pipeline --web

Output as JSON:

bk pipeline view my-pipeline -o json