Open source · Not affiliated with Atlassian
A command-line interface for Bitbucket Cloud
Manage pull requests, repositories, and pipelines from your terminal. Use --json for structured output and --jq to filter it without an external jq binary.
$npm install -g @pilatos/bitbucket-cliCommands20 command groups
bb prfull pull-request lifecycle, comments, reviewersbb pr merge 42 --strategy squashbb repoclone, create, list, view, deletebb repo clone workspace/repobb pipelinerun, view, logs, stopbb pipeline logs 42bb commitcommit history and detailsbb commit list --limit 10bb snippetcreate and share snippetsbb snippet create -t notes -f a.txtbb configmanage local configurationbb config set defaultWorkspace myworkspacebb authlogin, logout, status, tokenbb auth loginbb projectprojects inside workspacesbb project view PROJbb webhookrepository and workspace webhooksbb webhook listbb branch-restrictionbranch protection rulesbb branch-restriction listbb deploymentdeployments and environmentsbb deployment listbb ssh-keySSH keys on your accountbb ssh-key add ~/.ssh/id_ed25519.pubbb gpg-keyGPG keys for signed commitsbb gpg-key listbb workspaceworkspaces you belong tobb workspace listbb statuspublish commit build statusesbb status set abc1234 --key build --state SUCCESSFULbb aliaspersonal command shortcutsbb alias set co 'pr checkout'bb searchcode search across a workspacebb search code parseConfigbb browseopen the web UI at PRs, files, linesbb browse src/cli.ts:20bb apiraw 2.0 endpoints, paginatedbb api /userbb completionshell completionsbb completion install
Principleswhy it's built this way
01Machines are users tooUse
--json for structured output and --jq to select values. See the JSON reference for command shapes and projection limits.02No jq dependency
--jq evaluates in-process without an external jq binary. Windows requires Bun 1.4.2+.03Error codes you can branch onCommand errors under
--json include a numeric code. Argument-parser errors can remain plain text; interrupted prompts exit with 130.04Generated API clientThe API client is generated from one pinned OpenAPI spec; CI fails if the generated code drifts from it.
05Local credential storageCredentials are stored with
0600 permissions in your platform's config directory. The file holds plaintext credentials. bb auth token deliberately prints credentials for scripts.# workspace and repo resolved from your git remote
$bb pr list --json --jq '.pullRequests[].title'
"feat: streaming pipeline logs"
"fix: retry on 429 rate limits"
$bb pr merge 47 --strategy squash
✓ Merged pull request #47: feat: streaming pipeline logs
$bb pipeline run --branch main --json --jq '.pipeline.build_number'
313
Community
Section titled “Community”This is an unofficial, community-maintained CLI. Not affiliated with Atlassian.