bb

Bitbucket Cloud CLI

A fast, interactive command-line interface for Bitbucket Cloud. Manage repositories, pull requests, and pipelines without leaving your terminal.

curl -sSL https://tyrantkhan.github.io/bitbucket-cli/install.sh | sh
bb pr status output

Everything you need

Pull Requests

Create, review, merge, approve, and track PRs. View diffs and activity feeds right in your terminal.

Pipelines

Trigger, monitor, and tail pipeline logs. Run custom pipelines with variables from the command line.

Repositories

List, view, create, and clone repos. Works with all your workspaces and projects.

Smart Defaults

Workspace, repo, and branch are auto-detected from your git remotes. Just run commands and go.

Install

macOS note

Binary signing is in progress. Installs via Homebrew, mise, or binary download will require removing the quarantine attribute:

xattr -d com.apple.quarantine "$(which bb)"

The curl | sh and go install methods are not affected.

Homebrew

brew install tyrantkhan/tap/bb

mise

mise use -g ubi:tyrantkhan/bitbucket-cli[exe=bb]

Shell script

curl -sSL https://tyrantkhan.github.io/bitbucket-cli/install.sh | sh

Installs to ~/.local/bin. The script will tell you if it's not in your PATH.

Go

go install github.com/tyrantkhan/bb@latest

Binary releases

Download pre-built binaries from GitHub Releases.

Quick start

# Authenticate

bb auth login

# List repos in your workspace

bb repo list

# View open pull requests

bb pr list

# Create a pull request from the current branch

bb pr create

# Run a pipeline

bb pipeline run

Shell completions

# Bash — add to ~/.bashrc

if command -v bb >/dev/null; then source <(bb completion bash); fi

# Zsh — add to ~/.zshrc

if command -v bb >/dev/null; then source <(bb completion zsh); fi

# Fish

bb completion fish > ~/.config/fish/completions/bb.fish

# PowerShell

bb completion pwsh > bb.ps1

Commands

Auth 3 commands
bb auth login Authenticate with Bitbucket Cloud
bb auth logout Remove stored credentials
bb auth status Show authentication status
Repositories 4 commands
bb repo list List repositories in a workspace
bb repo view View repository details
bb repo create Create a new repository
bb repo clone Clone a repository
Pull Requests 13 commands
bb pr list List pull requests
bb pr view View pull request details
bb pr create Create a pull request
bb pr merge Merge a pull request
bb pr approve Approve a pull request
bb pr decline Decline a pull request
bb pr comment Add a comment
bb pr diff Show the diff
bb pr activity Show activity feed
bb pr status Show status of relevant PRs
bb pr ready Mark draft PR as ready for review
bb pr draft Convert PR to draft
bb pr edit Edit title, description, or reviewers
Pipelines 5 commands
bb pipeline list List pipelines
bb pipeline view View pipeline details
bb pipeline run Run a pipeline
bb pipeline stop Stop a running pipeline
bb pipeline logs View step logs
Search 1 command
bb search code Search for code across repositories
Completion 1 command
bb completion <shell> Generate shell completion script (bash, zsh, fish, pwsh)

Run bb reference for the full command reference.

AI skill

Download the bb skill file and add it to your project so AI coding assistants (Claude Code, Cursor, etc.) can help you with Bitbucket operations.

Download bb-skill.zip

Extract into your project's .claude/skills/ directory to enable the skill in Claude Code.