A fast, comprehensive command-line interface for Bitbucket Cloud and
Bitbucket Data Center / Server. Inspired by gh
and glab.
Status: early scaffolding. Expect breaking changes.
bb auth— log in with app password / HTTP access token / OAuthbb repo— clone, view, create, fork, listbb pr— list, view, create, checkout, diff, review, mergebb pipelines— list, view, logs, run, cancel (Bitbucket Pipelines & Bamboo)bb issue— list, view, create, commentbb browse— open the current repo / PR / pipeline in a browserbb api— raw API passthrough (likegh api)bb completion— shell completions for bash / zsh / fish / powershell
Works against:
- Bitbucket Cloud (
bitbucket.org, REST API 2.0) - Bitbucket Data Center / Server (self-hosted, REST API 1.0)
Pick the method for your platform. See PUBLISHING.md for how releases are built.
# macOS / Linux — Homebrew
brew install hugs7/tap/bitbucket-cli
# Windows — Scoop
scoop bucket add hugs7 https://github.com/hugs7/scoop-bucket
scoop install bb
# Debian / Ubuntu — apt
curl -1sLf 'https://dl.cloudsmith.io/public/hugs7/bitbucket-cli/setup.deb.sh' | sudo -E bash
sudo apt install bitbucket-cli
# Fedora / RHEL — dnf
curl -1sLf 'https://dl.cloudsmith.io/public/hugs7/bitbucket-cli/setup.rpm.sh' | sudo -E bash
sudo dnf install bitbucket-cli
# Alpine — apk
curl -1sLf 'https://dl.cloudsmith.io/public/hugs7/bitbucket-cli/setup.alpine.sh' | sudo -E bash
sudo apk add bitbucket-cliUseful for CI, Docker images, exotic distros, or just trying it quickly:
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/hugs7/bitbucket-cli/main/scripts/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/hugs7/bitbucket-cli/main/scripts/install.ps1 | iexgit clone https://github.com/hugs7/bitbucket-cli
cd bitbucket-cli
go build -o bb ./cmd/bb
./bb --help| Installed via | Update with |
|---|---|
| Homebrew | brew upgrade bitbucket-cli |
| Scoop | scoop update bb |
| apt (Cloudsmith) | sudo apt update && sudo apt upgrade bitbucket-cli |
| dnf (Cloudsmith) | sudo dnf upgrade bitbucket-cli |
| apk (Cloudsmith) | sudo apk upgrade bitbucket-cli |
curl | sh script / direct binary |
bb upgrade |
bb upgrade checks GitHub Releases and atomically replaces the
running binary on Linux, macOS and Windows. Use bb upgrade --check
to peek without installing.
Config lives at ~/.config/bb/config.yml (override with BB_CONFIG).
default_host: bitbucket.org
hosts:
bitbucket.org:
type: cloud
username: your-username
# token stored separately in OS keyring or env BB_TOKEN
bitbucket.mycorp.example:
type: server
api_base: https://bitbucket.mycorp.example/rest/api/1.0Per-repo overrides go in .bb.yml at the repo root.
MIT