Skip to content

Bitbucket CLI

Clone repos, manage PRs, and automate workflows — all from your terminal. If you know GitHub's gh, you'll feel right at home.

Requires Bun 1.0+ runtime.

Terminal window
npm install -g @pilatos/bitbucket-cli
Terminal window
bb auth login # authenticate
bb repo clone myworkspace/myrepo # clone a repo
bb pr create -t "My awesome feature" # create a PR
bb pr list # list open PRs

Repository Management

Clone, create, list, view, and delete repositories.

Terminal window
bb repo clone workspace/repo
bb repo create my-new-project
bb repo list -w myworkspace

Pull Request Workflows

Full PR lifecycle — create, review, approve, merge.

Terminal window
bb pr create -t "Add feature"
bb pr approve 42
bb pr merge 42 --strategy squash

Code Review

View diffs, checkout PR branches, inspect checks.

Terminal window
bb pr diff 42
bb pr checkout 42
bb pr checks 42

Jump to the Web UI

Open Bitbucket pages — PRs, files, commits, settings — in your browser.

Terminal window
bb browse 42
bb browse src/cli.ts:20
bb browse --pipelines

Scripting & Automation

JSON output on every command. Built for CI/CD.

Terminal window
bb pr list --json | jq '.pullRequests[].title'

Task-focused guides for the shortest path to a result.

All PR commands

This is an unofficial, community-maintained CLI. Not affiliated with Atlassian.