Stay in Your Terminal
No more context-switching to the browser. Clone repos, create PRs, and review code without leaving your workflow.
If you’ve used GitHub’s gh CLI and loved it, you’ve probably wished for something similar for Bitbucket. Now you have it.
Stay in Your Terminal
No more context-switching to the browser. Clone repos, create PRs, and review code without leaving your workflow.
Automate Everything
JSON output, scriptable commands, and CI/CD integration. Build automated workflows with ease.
Familiar Patterns
Inspired by GitHub CLI, so if you know gh, you’ll feel right at home with bb.
Smart Context Detection
Automatically detects workspace and repo from your git directory. Less typing, more doing.
Get productive in 60 seconds:
npm install -g @pilatos/bitbucket-clibun install -g @pilatos/bitbucket-clipnpm add -g @pilatos/bitbucket-cli# Authenticatebb auth login
# Clone a repobb repo clone myworkspace/myrepo
# Create a PRbb pr create -t "My awesome feature"
# List open PRsbb pr listRepository Management
Clone, create, list, view, and delete repositories. Full control over your Bitbucket repos.
bb repo clone workspace/repobb repo create my-new-projectbb repo list -w myworkspacePull Request Workflows
Complete PR lifecycle management — create, review, approve, merge, and more.
bb pr create -t "Add feature"bb pr view 42bb pr approve 42bb pr merge 42 --squashCode Review
View diffs, checkout PR branches locally, and review code efficiently.
bb pr diff 42bb pr checkout 42bb pr diff --statScripting & Automation
JSON output for all commands. Perfect for CI/CD pipelines and automation scripts.
bb pr list --json | jq '.[].title'| Feature | Description |
|---|---|
| Smart Context | Auto-detects workspace/repo from git remote |
| JSON Output | Machine-readable output for scripting |
| Shell Completion | Tab completion for Bash, Zsh, and Fish |
| Secure Auth | API token authentication with local storage |
| Cross-Platform | Works on macOS, Linux, and Windows |
Command Reference
Complete documentation for all commands and options.
Scripting Guide
Learn to use bb in scripts, automation, and CI/CD.
Troubleshooting
Common issues and how to solve them.
FAQ
Answers to frequently asked questions.
This is an unofficial, community-maintained CLI. Not affiliated with Atlassian.