Loading...
Loading...
Bitbucket CLI for Data Center and Cloud. Use when users need to manage repositories, pull requests, branches, issues, webhooks, or pipelines in Bitbucket. Triggers include "bitbucket", "bkt", "pull request", "PR", "repo list", "branch create", "Bitbucket Data Center", "Bitbucket Cloud", "keyring timeout".
npx skill4agent add avivsinai/bitbucket-cli bktbktghbktbkt --versionbkt| Platform | Command |
|---|---|
| macOS/Linux | |
| Windows | |
| Go | |
| Binary | Download from GitHub Releases |
bkt# Data Center (opens browser for PAT creation)
bkt auth login https://bitbucket.example.com --web
# Data Center (direct)
bkt auth login https://bitbucket.example.com --username alice --token <PAT>
# Bitbucket Cloud
bkt auth login https://bitbucket.org --kind cloud --web
# Check auth status
bkt auth statusread:user:bitbucket# Create context for Data Center
bkt context create dc-prod --host bitbucket.example.com --project ABC --set-active
# Create context for Cloud
bkt context create cloud-team --host bitbucket.org --workspace myteam --set-active
# List and switch contexts
bkt context list
bkt context use cloud-team| Task | Command |
|---|---|
| List repos | |
| View repo | |
| Clone repo | |
| Create repo | |
| List PRs | |
| View PR | |
| Create PR | |
| Merge PR | |
| PR checks | |
| List branches | |
| Create branch | |
| Delete branch | |
| List issues (Cloud) | |
| Create issue | |
| Webhooks | |
| Run pipeline | |
| API escape hatch | |
bkt repo list --limit 20
bkt repo list --workspace myteam # Cloud workspace override
bkt repo view platform-api
bkt repo create data-pipeline --description "Data ingestion" --project DATA
bkt repo browse --project DATA --repo platform-api
bkt repo clone platform-api --ssh# List and view
bkt pr list --state OPEN --limit 10
bkt pr list --mine # PRs you authored
bkt pr view 42
bkt pr view 42 --web # Open in browser
# Create and edit
bkt pr create --title "feat: cache" --source feature/cache --target main --reviewer alice
bkt pr edit 123 --title "New title" --body "Updated description"
# Review and merge
bkt pr approve 42
bkt pr comment 42 --text "LGTM"
bkt pr merge 42 --message "merge: feature/cache"
bkt pr merge 42 --strategy fast-forward
# CI/build status
bkt pr checks 42 # Show build status
bkt pr checks 42 --wait # Wait for builds to complete
bkt pr checks 42 --wait --timeout 5m # With timeout
bkt pr checks 42 --fail-fast # Exit on first failure
# Checkout locally
bkt pr checkout 42 # Fetches to pr/42 branchbkt branch list
bkt branch list --filter "feature/*"
bkt branch create release/1.9 --from main
bkt branch delete feature/old-stuff
bkt branch set-default main # DC only
bkt branch protect add main --type fast-forward-only # DC onlybkt issue list --state open --kind bug
bkt issue view 42 --comments
bkt issue create -t "Login broken" -k bug -p major
bkt issue edit 42 --assignee "{uuid}" --priority critical
bkt issue close 42
bkt issue reopen 42
bkt issue comment 42 -b "Fixed in v1.2.0"
bkt issue status # Your assigned/created issuesbugenhancementproposaltasktrivialminormajorcriticalblockerbkt webhook list
bkt webhook create --name "CI" --url https://ci.example.com/hook --event repo:refs_changed
bkt webhook delete <id>
bkt webhook test <id>bkt pipeline run --ref main --var ENV=staging
bkt pipeline list # Recent runs
bkt pipeline view <uuid> # Pipeline details
bkt pipeline logs <uuid> # Fetch logs
bkt status pipeline <uuid> # Alt: status checkbkt perms project list --project DATA
bkt perms project grant --project DATA --user alice --perm PROJECT_WRITE
bkt perms repo list --project DATA --repo platform-api
bkt perms repo grant --project DATA --repo api --user alice --perm REPO_WRITEbkt api /rest/api/1.0/projects --param limit=100 --json
bkt api /repositories --param workspace=myteam --field pagelen=50bkt pr list --json # JSON output
bkt pr list --yaml # YAML output
bkt pr list --json | jq '.pull_requests[0].title'--json--yaml--context <name>--project <key>--workspace <name>--repo <slug>BKT_CONFIG_DIRBKT_ALLOW_INSECURE_STOREBKT_KEYRING_TIMEOUT2m