Buildkite CLI team command

The bk team command allows you to manage organization teams from the command line.

Commands

Command Description
bk team list List teams.
bk team view View team information.
bk team create Create a new team.
bk team update Update a team.
bk team delete Delete a team.

List teams

List teams.

List the teams for an organization. By default, shows up to 100 teams.

bk team list [flags]

Flags

Flag Description
-o, --output="" Output format. One of: json, yaml, text
--debug Log HTTP API traffic to stderr; bodies may contain sensitive data
--json Output as JSON
--limit=100 Maximum number of teams to return
--org=STRING Organization slug for this invocation (overrides environment and configuration)
--per-page=30 Number of teams per page
--text Output as text
--yaml Output as YAML

Examples

List all teams:

bk team list

List teams in JSON format:

bk team list -o json

List up to 200 teams:

bk team list --limit 200

View a team

View team information.

It accepts a team UUID.

bk team view <team-uuid> [flags]

Arguments

Argument Description
<team-uuid> UUID of the team to view

Flags

Flag Description
-o, --output="" Output format. One of: json, yaml, text
--debug Log HTTP API traffic to stderr; bodies may contain sensitive data
--json Output as JSON
--org=STRING Organization slug for this invocation (overrides environment and configuration)
--text Output as text
--yaml Output as YAML

Examples

View a team:

bk team view my-team-uuid

View team in JSON format:

bk team view my-team-uuid -o json

Create a team

Create a new team.

Create a new team in the organization.

bk team create <name> [flags]

Arguments

Argument Description
<name> Name of the team

Flags

Flag Description
-o, --output="" Output format. One of: json, yaml, text
--[no-]members-can-create-pipelines Whether members can create pipelines
--[no-]members-can-create-registries Whether members can create registries
--[no-]members-can-create-suites Whether members can create test suites
--[no-]members-can-destroy-packages Whether members can destroy packages
--[no-]members-can-destroy-registries Whether members can destroy registries
--debug Log HTTP API traffic to stderr; bodies may contain sensitive data
--default Whether this is the default team for new members
--default-member-role="member" Default role for new members: member or maintainer
--description=STRING Description of the team
--json Output as JSON
--org=STRING Organization slug for this invocation (overrides environment and configuration)
--privacy="visible" Privacy setting for the team: visible or secret
--text Output as text
--yaml Output as YAML

Examples

Create a team with default settings:

bk team create my-team

Create a private team with a description:

bk team create my-team --description "My team" --privacy secret

Create a team where members cannot create pipelines:

bk team create my-team --no-members-can-create-pipelines

Update a team

Update a team.

Update an existing team's settings.

bk team update <team-uuid> [flags]

Arguments

Argument Description
<team-uuid> UUID of the team to update

Flags

Flag Description
-o, --output="" Output format. One of: json, yaml, text
--[no-]members-can-create-pipelines Whether members can create pipelines
--[no-]members-can-create-registries Whether members can create registries
--[no-]members-can-create-suites Whether members can create test suites
--[no-]members-can-destroy-packages Whether members can destroy packages
--[no-]members-can-destroy-registries Whether members can destroy registries
--debug Log HTTP API traffic to stderr; bodies may contain sensitive data
--default Whether this is the default team for new members
--default-member-role=STRING Default role for new members: member or maintainer
--description=DESCRIPTION New description for the team
--json Output as JSON
--name=STRING New name for the team
--org=STRING Organization slug for this invocation (overrides environment and configuration)
--privacy=STRING Privacy setting: visible or secret
--text Output as text
--yaml Output as YAML

Examples

Rename a team:

bk team update my-team-uuid --name "New Team Name"

Change a team's privacy:

bk team update my-team-uuid --privacy secret

Update description and default member role:

bk team update my-team-uuid --description "Updated description" --default-member-role maintainer

Delete a team

Delete a team.

Delete a team from the organization.

You will be prompted to confirm deletion unless --yes is set.

bk team delete <team-uuid>

Arguments

Argument Description
<team-uuid> UUID of the team to delete

Flags

Flag Description
--debug Log HTTP API traffic to stderr; bodies may contain sensitive data
--org=STRING Organization slug for this invocation (overrides environment and configuration)

Examples

Delete a team (with confirmation prompt):

bk team delete my-team-uuid

Delete a team without confirmation:

bk team delete my-team-uuid --yes