Bitbucket CLI (bkt)
Use bkt for Bitbucket Cloud and Data Center operations. Prefer structured
--json, --yaml, --jq, or --template output for automation.
Start with the requested operation
Run bkt --version only when installation or compatibility is uncertain. Run
bkt auth status when the command needs authentication or the active platform
and context are unknown. Do not make setup a prerequisite for an already
configured read-only request.
Cloud and Data Center have different feature sets. Determine the platform from
the active context or ask when it cannot be inferred. Do not suggest a Cloud-only
command for Data Center, or the reverse.
Read setup and common workflows when installing, authenticating,
creating a context, or learning the main command patterns. For config-free CI or
containers, read headless authentication.
Route to the command reference
Read only the reference for the requested command group:
- pull requests, repositories,
branches, commits, or
statuses
- Cloud issues, pipelines, or
variables
- Data Center administration,
projects, or permissions
- authentication, contexts,
webhooks, extensions,
MCP, skills, or raw API
Mutation and credential boundaries
- Listing, viewing, status, and checks are read-only. Create, edit, approve,
merge, delete, rerun, or permission changes modify Bitbucket; perform them
only when the user requested that change.
- Never place tokens, OAuth secrets, or passwords in commands that could enter
logs or committed files. Use the CLI's supported credential flow or environment
variables described in the auth references.
- Official release binaries embed the Cloud browser-OAuth consumer credentials.
Do not remove that behavior as generic hardening. Source and Nix builds may
require
BKT_OAUTH_CLIENT_ID and BKT_OAUTH_CLIENT_SECRET.
- Before a merge or other consequential write, inspect the exact target,
repository, and current checks. Report the resulting URL or identifier.
References
- 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)
- mcp — Model Context Protocol server for agents
- 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
- skill — Install and manage agent skills
- status — Inspect commit and pull request statuses
- variable — Manage pipeline variables (Cloud)
- webhook — Manage Bitbucket webhooks
- other — api
1---
2name: bkt
3version: 0.32.1
4description: Operate Bitbucket Cloud or Data Center repositories, pull requests, branches, issues, pipelines, permissions, and webhooks with bkt. Use when a request names Bitbucket or bkt; confirm the platform before platform-specific commands.
5metadata:
6 source: https://skillmd.com/skills/avivsinai/bkt
7 short-description: Bitbucket CLI for repos, PRs, branches
8 compatibility: claude-code, codex-cli
9---
10
11# Bitbucket CLI (`bkt`)
12
13Use `bkt` for Bitbucket Cloud and Data Center operations. Prefer structured
14`--json`, `--yaml`, `--jq`, or `--template` output for automation.
15
16## Start with the requested operation
17
18Run `bkt --version` only when installation or compatibility is uncertain. Run
19`bkt auth status` when the command needs authentication or the active platform
20and context are unknown. Do not make setup a prerequisite for an already
21configured read-only request.
22
23Cloud and Data Center have different feature sets. Determine the platform from
24the active context or ask when it cannot be inferred. Do not suggest a Cloud-only
25command for Data Center, or the reverse.
26
27Read [setup and common workflows](rules/guide.md) when installing, authenticating,
28creating a context, or learning the main command patterns. For config-free CI or
29containers, read [headless authentication](rules/headless.md).
30
31## Route to the command reference
32
33Read only the reference for the requested command group:
34
35- [pull requests](rules/pr.md), [repositories](rules/repo.md),
36 [branches](rules/branch.md), [commits](rules/commit.md), or
37 [statuses](rules/status.md)
38- [Cloud issues](rules/issue.md), [pipelines](rules/pipeline.md), or
39 [variables](rules/variable.md)
40- [Data Center administration](rules/admin.md),
41 [projects](rules/project.md), or [permissions](rules/perms.md)
42- [authentication](rules/auth.md), [contexts](rules/context.md),
43 [webhooks](rules/webhook.md), [extensions](rules/extension.md),
44 [MCP](rules/mcp.md), [skills](rules/skill.md), or [raw API](rules/other.md)
45
46## Mutation and credential boundaries
47
48- Listing, viewing, status, and checks are read-only. Create, edit, approve,
49 merge, delete, rerun, or permission changes modify Bitbucket; perform them
50 only when the user requested that change.
51- Never place tokens, OAuth secrets, or passwords in commands that could enter
52 logs or committed files. Use the CLI's supported credential flow or environment
53 variables described in the auth references.
54- Official release binaries embed the Cloud browser-OAuth consumer credentials.
55 Do not remove that behavior as generic hardening. Source and Nix builds may
56 require `BKT_OAUTH_CLIENT_ID` and `BKT_OAUTH_CLIENT_SECRET`.
57- Before a merge or other consequential write, inspect the exact target,
58 repository, and current checks. Report the resulting URL or identifier.
59
60## References
61
62<!-- auto-generated by cmd/docgen — do not edit below this line -->
63
64- [admin](rules/admin.md) — Administrative operations for Bitbucket *(DC)*
65- [auth](rules/auth.md) — Manage Bitbucket authentication credentials
66- [branch](rules/branch.md) — Inspect and manage branches
67- [commit](rules/commit.md) — Work with commits
68- [context](rules/context.md) — Manage Bitbucket CLI contexts
69- [extension](rules/extension.md) — Manage bkt CLI extensions
70- [issue](rules/issue.md) — Work with Bitbucket Cloud issues *(Cloud)*
71- [mcp](rules/mcp.md) — Model Context Protocol server for agents
72- [perms](rules/perms.md) — Manage Bitbucket permissions *(DC)*
73- [pipeline](rules/pipeline.md) — Run and inspect Bitbucket Cloud pipelines *(Cloud)*
74- [pr](rules/pr.md) — Manage pull requests
75- [project](rules/project.md) — Work with Bitbucket projects *(DC)*
76- [repo](rules/repo.md) — Work with Bitbucket repositories
77- [skill](rules/skill.md) — Install and manage agent skills
78- [status](rules/status.md) — Inspect commit and pull request statuses
79- [variable](rules/variable.md) — Manage pipeline variables *(Cloud)*
80- [webhook](rules/webhook.md) — Manage Bitbucket webhooks
81- [other](rules/other.md) — api
82
83<!-- end auto-generated -->