bkt

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".

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bkt" with this command: npx skills add avivsinai/bitbucket-cli/avivsinai-bitbucket-cli-bkt

Bitbucket CLI (bkt)

bkt is a unified CLI for Bitbucket Data Center and Bitbucket Cloud. It mirrors gh ergonomics and provides structured JSON/YAML output for automation.

Before You Start

1. Verify installation — always check before running any bkt command:

bkt --version

If not installed:

PlatformCommand
macOS/Linuxbrew install avivsinai/tap/bitbucket-cli
Windowsscoop bucket add avivsinai https://github.com/avivsinai/scoop-bucket && scoop install bitbucket-cli
Gogo install github.com/avivsinai/bitbucket-cli/cmd/bkt@latest
BinaryDownload from GitHub Releases

2. Check authentication — most commands require an active session:

bkt auth status

Bitbucket Cloud Token Requirements:

  • Create an "API token with scopes" (not a general API token)
  • Select Bitbucket as the application
  • Required scope: Account: Read (read:user:bitbucket)
  • Additional scopes as needed: Repositories, Pull requests, Issues

For config-free use in containers and CI pipelines, see headless authentication.

If not authenticated, log in:

# Data Center (PAT-based)
bkt auth login https://bitbucket.example.com --username alice --token <PAT>

# Bitbucket Cloud — OAuth (official binaries open browser out of the box)
bkt auth login https://bitbucket.org --kind cloud --web

# Bitbucket Cloud — API token (--web-token opens Atlassian's token creation page)
bkt auth login https://bitbucket.org --kind cloud --web-token

For source and Nix builds, set BKT_OAUTH_CLIENT_ID and BKT_OAUTH_CLIENT_SECRET env vars before running --web.

3. Set up a context — contexts bind a host to a project/workspace and optional default repo, so you don't repeat flags on every command:

# Data Center
bkt context create dc-prod --host bitbucket.example.com --project ABC --set-active

# Cloud
bkt context create cloud-team --host bitbucket.org --workspace myteam --set-active

Platform Awareness

Some commands are Data Center only or Cloud only — check the command reference for *(DC)* and *(Cloud)* badges. Key splits:

FeatureData CenterCloud
Pull requestsyesyes
Repositoriesyesyes
Branches (list)yesyes
Branches (create/delete/protect)yes
Issuesyes
Pipelinesyes
Permissionsyes
Webhooksyesyes
Auto-merge, tasks, reactionsyes
Variablesyes

When a user's context is DC, do not suggest Cloud-only commands (and vice versa). If the platform is unknown, ask or check with bkt auth status.

Common Workflows

Create a PR from the current branch

bkt pr create --title "feat: add caching" --target main

Source branch, title, and target default to sensible values from git state. Add --draft for work-in-progress, --reviewer alice to request review.

Review cycle

bkt pr checks 42 --wait          # Wait for CI to pass
bkt pr approve 42                # Approve
bkt pr merge 42                  # Merge (closes source branch by default)

Checkout a colleague's PR locally

bkt pr checkout 42               # Creates pr/42 branch

Structured output for scripting

All commands support --json, --yaml, --jq, and --template:

bkt pr list --mine --json | jq '.[].title'

Raw API escape hatch

For endpoints without a dedicated command:

bkt api /rest/api/1.0/projects --param limit=100 --json

Global Flags

Every command accepts these inherited flags:

FlagShortPurpose
--context-cUse a specific named context
--jsonJSON output
--yamlYAML output
--jqApply a jq expression (requires --json)
--templateRender with Go template

References

  • headless / env vars — Config-free CI/container auth (BKT_TOKEN, BKT_HOST) and full env var reference
<!-- auto-generated by cmd/docgen — do not edit below this line -->
  • admin — Administrative operations for Bitbucket (DC)
  • auth — Manage Bitbucket authentication credentials
  • branch — Inspect and manage branches
  • commit — Work with commits
  • context — Manage Bitbucket CLI contexts
  • extension — Manage bkt CLI extensions
  • issue — Work with Bitbucket Cloud issues (Cloud)
  • perms — Manage Bitbucket permissions (DC)
  • pipeline — Run and inspect Bitbucket Cloud pipelines (Cloud)
  • pr — Manage pull requests
  • project — Work with Bitbucket projects (DC)
  • repo — Work with Bitbucket repositories
  • status — Inspect commit and pull request statuses
  • variable — Manage pipeline variables (Cloud)
  • webhook — Manage Bitbucket webhooks
  • other — api
<!-- end auto-generated -->

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Web Research Assistant

AI-powered web research assistant that leverages BrowserAct API to supplement restricted web access by searching the internet for additional information. Designed for OpenClaw and Claude Code.

Registry SourceRecently Updated
2.5K3phheng
Coding

Pandoc Convert

Convert documents between 40+ formats using pandoc CLI. Handles Markdown ↔ Word ↔ PDF ↔ HTML ↔ LaTeX ↔ EPUB with smart defaults, professional templates, and comprehensive tooling.

Registry SourceRecently Updated
Coding

Monitored Ralph Loop

Generate copy-paste bash scripts for Ralph Wiggum/AI agent loops (Codex, Claude Code, OpenCode, Goose). Use when asked for a "Ralph loop", "Ralph Wiggum loop", or an AI loop to plan/build code via PROMPT.md + AGENTS.md, SPECS, and IMPLEMENTATION_PLAN.md, including PLANNING vs BUILDING modes, backpressure, sandboxing, and completion conditions.

Registry SourceRecently Updated
1.3K0endogen
Coding

Forge

Autonomous quality engineering swarm that forges production-ready code through continuous behavioral verification, exhaustive E2E testing, and self-healing fix loops. Combines DDD+ADR+TDD methodology with BDD/Gherkin specifications, 7 quality gates, defect prediction, chaos testing, and cross-context dependency awareness. Architecture-agnostic — works with monoliths, microservices, modular monoliths, and any bounded-context topology.

Registry SourceRecently Updated