hashgraph-online/awesome-codex-plugins / plugins/avivsinai/bitbucket-cli/skills/bkt
bkt
VerifiedOperate Bitbucket Cloud or Data Center repositories, pull requests, branches, pipelines, permissions, and webhooks with bkt. Use when a request names Bitbucket or bkt; confirm the platform before platform-specific commands.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.9 KB |
| rules/admin.md | markdown | 5.3 KB |
| rules/auth.md | markdown | 8.4 KB |
| rules/branch.md | markdown | 12.6 KB |
| rules/commit.md | markdown | 2.2 KB |
| rules/context.md | markdown | 5.0 KB |
| rules/extension.md | markdown | 5.3 KB |
| rules/guide.md | markdown | 5.8 KB |
| rules/headless.md | markdown | 3.7 KB |
| rules/mcp.md | markdown | 29.1 KB |
| rules/other.md | markdown | 1.2 KB |
| rules/perms.md | markdown | 10.6 KB |
| rules/pipeline.md | markdown | 7.7 KB |
| rules/pr.md | markdown | 47.9 KB |
| rules/project.md | markdown | 4.2 KB |
| rules/repo.md | markdown | 14.0 KB |
| rules/skill.md | markdown | 17.1 KB |
| rules/status.md | markdown | 5.9 KB |
| rules/variable.md | markdown | 7.6 KB |
| rules/webhook.md | markdown | 6.7 KB |
rules/guide.md
View on GitHub# 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:
```bash
bkt --version
```
If not installed:
| Platform | Command |
|----------|---------|
| macOS/Linux | `brew install bitbucket-cli` (Homebrew core) or `brew install avivsinai/tap/bitbucket-cli` (signed release binary); install only one |
| Windows | `winget install AvivSinai.Bitbucket-CLI`, or `scoop bucket add avivsinai https://github.com/avivsinai/scoop-bucket && scoop install bitbucket-cli` |
| Go | `go install github.com/avivsinai/bitbucket-cli/cmd/bkt@latest` |
| Binary | Download from [GitHub Releases](https://github.com/avivsinai/bitbucket-cli/releases) |
**2. Check authentication** — most commands require an active session:
```bash
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 (Admin for `bkt repo create`), Pull requests, Pipelines, Webhooks
For config-free use in containers and CI pipelines, see [headless authentication](headless.md).
If not authenticated, log in:
```bash
# Data Center (PAT-based)
bkt auth login https://bitbucket.example.com --username alice --token <PAT>
# Bitbucket Cloud — OAuth (opens the browser; no setup needed)
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
```
**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:
```bash
# Data Center
bkt context create dc-prod --host bitbucket.example.com --project ABC --set-active
# Cloud
bkt context create cloud-team --host api.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:
| Feature | Data Center | Cloud |
|---------|:-----------:|:-----:|
| Pull requests | yes | yes |
| Repositories | yes | yes |
| Branches (list) | yes | yes |
| Branches (create/delete/protect) | yes | — |
| Issues | — | — (removed by Atlassian; use Jira) |
| Pipelines | — | yes |
| Permissions | yes | — |
| Webhooks | yes | yes |
| Auto-merge, tasks, reactions | yes | — |
| Variables | — | yes |
| Skill search | — | yes |
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
```bash
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
```bash
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
```bash
bkt pr checkout 42 # Creates pr/42 branch
```
### Structured output for scripting
All commands support `--json`, `--yaml`, `--jq`, and `--template`:
```bash
bkt pr list --mine --json | jq '.pull_requests[].title'
```
### Raw API escape hatch
For endpoints without a dedicated command:
```bash
bkt api /rest/api/1.0/projects --param limit=100 --json
```
### Search for Agent Skills in Bitbucket Cloud
```bash
bkt skill search "code review"
bkt skill search "review repo:agent-skills" --workspace myteam --json
```
Search is workspace-scoped and returns only `SKILL.md` files. It is not
available for Bitbucket Data Center because Data Center has no public workspace
code-search API. Atlassian has announced that the [Cloud code-search REST
endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-other-operations/#api-workspaces-workspace-search-code-get)
will be deprecated on November 1, 2026.
## Global Flags
Every command accepts these inherited flags:
| Flag | Short | Purpose |
|------|-------|---------|
| `--context` | `-c` | Use a specific named context |
| `--json` | | JSON output |
| `--yaml` | | YAML output |
| `--jq` | | Apply a jq expression (requires `--json`) |
| `--template` | | Render with Go template |
## References
- [headless / env vars](headless.md) — 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](admin.md) — Administrative operations for Bitbucket *(DC)*
- [auth](auth.md) — Manage Bitbucket authentication credentials
- [branch](branch.md) — Inspect and manage branches
- [commit](commit.md) — Work with commits
- [context](context.md) — Manage Bitbucket CLI contexts
- [extension](extension.md) — Manage bkt CLI extensions
- [mcp](mcp.md) — Model Context Protocol server for agents
- [perms](perms.md) — Manage Bitbucket permissions *(DC)*
- [pipeline](pipeline.md) — Run and inspect Bitbucket Cloud pipelines *(Cloud)*
- [pr](pr.md) — Manage pull requests
- [project](project.md) — Work with Bitbucket projects *(DC)*
- [repo](repo.md) — Work with Bitbucket repositories
- [skill](skill.md) — Install and manage agent skills
- [status](status.md) — Inspect commit and pull request statuses
- [variable](variable.md) — Manage pipeline variables *(Cloud)*
- [webhook](webhook.md) — Manage Bitbucket webhooks
- [other](other.md) — api
<!-- end auto-generated -->
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |