Open source · Not affiliated with Atlassian
A command-line interface for Bitbucket Cloud
Fast, scriptable, and honest about its output. Fourteen command groups over the full 2.0 REST API — every command outputs JSON, --json projects exactly the fields you name, --jq filters in-process.
$npm install -g @pilatos/bitbucket-cliCommands15 command groups
bb prfull pull-request lifecycle, comments, reviewers24bb pr merge 42 --strategy squashbb repoclone, create, list, view, delete8bb repo clone workspace/repobb pipelinerun, watch, logs, stop7bb pipeline logs 42bb commithistory and build statuses4bb commit list --limit 10bb snippetcreate and share snippets4bb snippet create -t notes -f a.txtbb configmanage local configuration3bb config set editor vimbb authlogin, logout, whoami3bb auth loginbb projectprojects inside workspaces3bb project view PROJbb workspaceworkspaces you belong to2bb workspace listbb statuspublish commit build statuses1bb status set abc1234 --state SUCCESSFULbb aliaspersonal command shortcuts1bb alias set co 'pr checkout'bb browseopen the web UI at PRs, files, lines1bb browse src/cli.ts:20bb apiraw 2.0 endpoints, paginated1bb api /userbb completionshell completions1bb completion zsh
Principleswhy it's built this way
01Machines are users too
--json id,title projects exactly the fields you name; dotted paths keep their full key as the object key.02No jq dependency
--jq evaluates in-process. It works in the most minimal CI image you can build.03Error codes you can branch onEvery failure carries a numeric
code in the JSON payload — the process exit status stays 1. All codes are documented in the reference.04Types can't driftThe API client is generated from one pinned OpenAPI spec; CI fails if the generated code drifts from it.
05Secrets stay putCredentials are stored with
0600 permissions in your platform's config directory. Never logged, never printed.# workspace and repo resolved from your git remote
$bb pr list --state OPEN
#47 feat: streaming pipeline logs OPEN
#46 fix: retry on 429 rate limits OPEN
$bb pr merge 47 --strategy squash
✓ Merged pull request #47 into main (squash)
$bb pipeline run --branch main --json --jq '.build_number'
313
Community
Section titled “Community”This is an unofficial, community-maintained CLI. Not affiliated with Atlassian.