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/pr.md
View on GitHub<!-- auto-generated by cmd/docgen — do not edit -->
# bkt pr
Create, list, review, merge, and manage pull requests on Bitbucket Data Center
and Bitbucket Cloud. Most subcommands work on both platforms; platform-specific
limitations are noted in each subcommand's help.
```
bkt pr <command> [flags]
```
### Examples
```bash
# List open pull requests in the current repository
bkt pr list
# View details of a specific pull request
bkt pr view 42
# Create a pull request from the current branch
bkt pr create --title "Add user authentication"
# Approve and merge a pull request
bkt pr approve 42
bkt pr merge 42
```
## Subcommands
| Subcommand | Description | Key Flags |
|---|---|---|
| [approve](#bkt-pr-approve) | Approve a pull request | `--project`, `--repo`, `--workspace` |
| [auto-merge](#bkt-pr-auto-merge) | Manage pull request auto-merge *(DC)* | — |
| [checkout](#bkt-pr-checkout) | Check out the pull request branch | `--branch`, `--project`, `--remote`, `--repo` |
| [checks](#bkt-pr-checks) | Show build/CI status for a pull request | `--fail-fast`, `--interval`, `--max-interval`, `--project` |
| [comment](#bkt-pr-comment) | Comment on a pull request | `--file`, `--from-line`, `--parent`, `--pending` |
| [comments](#bkt-pr-comments) | List comments on a pull request | `--details`, `--project`, `--repo`, `--state` |
| [create](#bkt-pr-create) | Create a new pull request | `--body`, `--close-source`, `--description`, `--destination` |
| [decline](#bkt-pr-decline) | Decline a pull request | `--body`, `--comment`, `--delete-source`, `--project` |
| [diff](#bkt-pr-diff) | Show the diff for a pull request | `--project`, `--repo`, `--stat`, `--workspace` |
| [edit](#bkt-pr-edit) | Edit a pull request | `--body`, `--description`, `--project`, `--remove-reviewer` |
| [list](#bkt-pr-list) | List pull requests | `--limit`, `--mine`, `--project`, `--repo` |
| [merge](#bkt-pr-merge) | Merge a pull request | `--close-source`, `--message`, `--project`, `--repo` |
| [mergeability](#bkt-pr-mergeability) | Check whether a pull request can be merged *(Cloud)* | `--repo`, `--workspace` |
| [publish](#bkt-pr-publish) | Mark a draft pull request as ready for review | `--project`, `--repo`, `--undo`, `--workspace` |
| [reaction](#bkt-pr-reaction) | Manage comment reactions *(DC)* | — |
| [reopen](#bkt-pr-reopen) | Reopen a declined pull request | `--project`, `--repo`, `--workspace` |
| [reviewer-group](#bkt-pr-reviewer-group) | Manage default reviewer groups *(DC)* | — |
| [suggestion](#bkt-pr-suggestion) | Apply or preview a code suggestion *(DC)* | `--preview`, `--project`, `--repo` |
| [task](#bkt-pr-task) | Manage pull request tasks (DC and Cloud) | — |
| [view](#bkt-pr-view) | Show details for a pull request | `--project`, `--repo`, `--web`, `--workspace` |
## bkt pr approve
Approve a pull request as the authenticated user. This adds your approval to
the pull request, which may satisfy merge checks that require reviewer
approvals.
Works on both Data Center and Cloud.
### Usage
```
bkt pr approve <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Approve a pull request
bkt pr approve 42
# Approve a pull request in a specific repository
bkt pr approve 42 --repo my-service
```
## bkt pr auto-merge
Enable, disable, or check the status of auto-merge for a pull request.
When auto-merge is enabled, the pull request is merged automatically once
all required conditions (approvals, build checks) are met.
Data Center only. Not yet supported on Cloud.
```
bkt pr auto-merge <command> [flags]
```
### Examples
```bash
# Enable auto-merge for a pull request
bkt pr auto-merge enable 42
# Check auto-merge status
bkt pr auto-merge status 42
# Disable auto-merge
bkt pr auto-merge disable 42
```
| Subcommand | Description |
|---|---|
| disable | Disable auto-merge (DC only) |
| enable | Enable auto-merge for a pull request (DC only) |
| status | Show auto-merge configuration (DC only) |
## bkt pr auto-merge disable
Disable auto-merge for a pull request on Data Center. The pull request will no longer merge automatically.
### Usage
```
bkt pr auto-merge disable <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Disable auto-merge
bkt pr auto-merge disable 42
```
## bkt pr auto-merge enable
Enable auto-merge for a pull request on Data Center. The pull request will be
merged automatically when all preconditions are satisfied. You can optionally
specify a merge strategy, a custom merge commit message, and whether the
source branch should be closed after merge.
### Usage
```
bkt pr auto-merge enable <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--close-source` | | Close source branch when auto-merge completes |
| `--message` | | Custom merge commit message |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--strategy` | | Merge strategy ID (leave empty for default) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Enable auto-merge with defaults
bkt pr auto-merge enable 42
# Enable with a specific merge strategy and message
bkt pr auto-merge enable 42 --strategy squash --message "Squash merge feature X"
# Enable but keep the source branch
bkt pr auto-merge enable 42 --close-source=false
```
## bkt pr auto-merge status
Show the current auto-merge configuration for a pull request on Data Center, including whether it is enabled, the merge strategy, commit message, and close-source-branch setting.
### Usage
```
bkt pr auto-merge status <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Check auto-merge status
bkt pr auto-merge status 42
```
## bkt pr checkout
Fetch and check out the source branch of a pull request into a local branch.
By default the local branch is named pr/<id>.
On Data Center, the PR head is fetched via the refs/pull-requests/<id>/from
ref. On Cloud, the source branch name is resolved from the API and fetched
directly. For fork-based Cloud pull requests, a remote is automatically
added (or reused) for the fork repository.
### Usage
```
bkt pr checkout <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--branch` | | Local branch name (defaults to pr/<id>) |
| `--project` | | Bitbucket project key override |
| `--remote` | | Git remote name to fetch from |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Check out pull request #42
bkt pr checkout 42
# Check out into a custom branch name
bkt pr checkout 42 --branch feature-review
# Check out from a specific remote
bkt pr checkout 42 --remote upstream
```
## bkt pr checks
Display CI/build statuses for the head commit of a pull request. Use --wait to
poll until all builds complete, with exponential backoff and jitter. The
--fail-fast flag exits on the first failure. Use --web to open the first
build's URL in your browser.
On Data Center, statuses are fetched from the commit build-status API using
the source branch's latest commit. On Cloud, the source commit hash from the
pull request is used.
Exit codes in --wait mode: 0 = all passed, 1 = a build failed,
8 = timed out with builds still pending, 130 = interrupted.
**Alias:** `builds`
### Usage
```
bkt pr checks <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--fail-fast` | | Exit immediately when a check fails (requires --wait) |
| `--interval` | | Initial polling interval when using --wait |
| `--max-interval` | | Maximum polling interval (backoff cap) |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--timeout` | | Maximum time to wait for builds (0 for no timeout) |
| `--wait` | | Wait for all builds to complete |
| `--web` | | Open the build URL in your browser (first build) |
| `--workspace` | | Bitbucket workspace override (Cloud) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Show current build status
bkt pr checks 42
# Wait for all builds to finish
bkt pr checks 42 --wait
# Wait with fail-fast and a custom timeout
bkt pr checks 42 --wait --fail-fast --timeout 10m
# Open the first build URL in a browser
bkt pr checks 42 --web
```
## bkt pr comment
Add a comment to a pull request. Comments can be general (activity-level),
threaded replies (via --parent), or inline on a specific file and line in the
diff (via --file with --from-line or --to-line). Use --pending to create a
draft review comment that is not visible until submitted.
Works on both Data Center and Cloud.
### Usage
```
bkt pr comment <id> --text <message> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--file` | | File path in the diff (requires --from-line or --to-line) |
| `--from-line` | | Line in the old file (removed/source side) |
| `--parent` | | Parent comment ID for threaded replies |
| `--pending` | | Create the comment as pending (draft review feedback) |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--text` | | Comment text |
| `--to-line` | | Line in the new file (added/destination side) |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Add a general comment
bkt pr comment 42 --text "Looks good to me"
# Reply to an existing comment thread
bkt pr comment 42 --text "Fixed in the latest push" --parent 1001
# Add an inline comment on a specific line in the new file
bkt pr comment 42 --text "Nit: rename this variable" --file src/main.go --to-line 55
# Add a pending (draft) inline comment
bkt pr comment 42 --text "Consider error handling here" --file api.go --to-line 30 --pending
```
## bkt pr comments
List all comments on a pull request. On Cloud, use --state to filter by
resolution status (resolved, unresolved, or deleted). The --state flag is not supported
on Data Center because the DC API does not expose resolution status.
Works on both Data Center and Cloud.
Resolve and reopen subcommands require the top-level thread comment ID, not a
reply ID. Use --details when listing comments to inspect thread structure before
changing thread state.
```
bkt pr comments <id> [flags]
bkt pr comments <command> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--details` | | Show full comment details (file, resolved, task status) |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--state` | | Filter by state: all, resolved, unresolved, deleted (Cloud only) |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# List all comments
bkt pr comments 42
# List only unresolved comments (Cloud only)
bkt pr comments 42 --state unresolved
# List resolved comments (Cloud only)
bkt pr comments 42 --state resolved
# List deleted comments (Cloud only)
bkt pr comments 42 --state deleted
# View one comment thread with its file/line anchor
bkt pr comments view 42 1001
# Delete a comment
bkt pr comments delete 42 1001
# Resolve a comment thread
bkt pr comments resolve 42 1001
# Reopen a resolved comment thread
bkt pr comments reopen 42 1001
```
| Subcommand | Description |
|---|---|
| delete | Delete a pull request comment |
| reopen | Reopen a resolved pull request comment thread |
| resolve | Resolve a pull request comment thread |
| view | View one pull request comment thread |
## bkt pr comments delete
Delete a pull request comment on Bitbucket Cloud or Data Center.
Use bkt pr comments <id> or bkt pr comments <id> --details to find the comment
ID before deleting it. On Bitbucket Cloud, deleted comments can still be listed
with --state deleted when the API returns them. On Data Center, bkt fetches the
current comment version before deleting because the API requires it.
**Alias:** `rm`
### Usage
```
bkt pr comments delete <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Delete comment 1001 from pull request 42
bkt pr comments delete 42 1001
# Delete a comment in a specific repository
bkt pr comments delete 42 1001 --repo platform-api
```
## bkt pr comments reopen
Reopen a resolved pull request comment thread on Bitbucket Cloud or Data Center.
The comment-id must be the top-level comment for the thread. Replies cannot be
reopened directly; pass the parent comment ID instead. Deleted comments cannot
be reopened.
### Usage
```
bkt pr comments reopen <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Reopen thread 1001 on pull request 42
bkt pr comments reopen 42 1001
# Reopen a thread in a specific repository
bkt pr comments reopen 42 1001 --repo platform-api
```
## bkt pr comments resolve
Resolve a pull request comment thread on Bitbucket Cloud or Data Center.
The comment-id must be the top-level comment for the thread. Replies cannot be
resolved directly; pass the parent comment ID instead. Deleted comments cannot
be resolved.
### Usage
```
bkt pr comments resolve <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Resolve thread 1001 on pull request 42
bkt pr comments resolve 42 1001
# Resolve a thread in a specific repository
bkt pr comments resolve 42 1001 --repo platform-api
```
## bkt pr comments view
Show the comment thread that contains a comment: the root comment, its
replies, and the inline anchor (file, line, orphaned). The comment-id can be the
root comment or any reply; the requested comment is marked in the output.
On Data Center, the output also includes a few lines of diff around the
anchored line when Bitbucket returns them. --json returns the root comment as
"thread" with replies nested under "comments" and the diff lines as
"diff_context". On Cloud, --json returns the thread as a flat "comments" list,
root first.
### Usage
```
bkt pr comments view <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# View the thread that contains comment 1001 on pull request 42
bkt pr comments view 42 1001
# Get the thread as JSON
bkt pr comments view 42 1001 --json
```
## bkt pr create
Create a new pull request. The source branch defaults to the current git branch,
and the target branch defaults to the remote's default branch (e.g. main).
The title defaults to the first unique commit subject on the source branch.
Reviewers can be added with repeatable --reviewer flags.
--with-default-reviewers merges the repository's configured default reviewers
into the reviewer list. On Cloud, the current user is automatically excluded.
On Data Center, --source-project and --source-repo select a fork repository for
the source branch. Each defaults to the destination project or repository when
omitted. These flags are rejected on Bitbucket Cloud.
Draft pull requests are supported on Cloud (always) and on Data Center 8.18+
via the --draft flag.
### Usage
```
bkt pr create [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--body` | `-b` | Pull request description (alias for --description) |
| `--close-source` | | Close source branch on merge |
| `--description` | | Pull request description |
| `--destination` | | Target branch (alias for --target) |
| `--draft` | `-d` | Create pull request as a draft (DC 8.18+, Cloud always supported) |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--reviewer` | | Reviewer username or {UUID} (repeatable) |
| `--source` | | Source branch (defaults to the current branch) |
| `--source-project` | | Source project key (Data Center only; defaults to --project) |
| `--source-repo` | | Source repository slug (Data Center only; defaults to --repo) |
| `--target` | | Target branch (defaults to the remote's default branch) |
| `--title` | | Pull request title (defaults to the first unique commit subject) |
| `--with-default-reviewers` | | Add repository default reviewers |
| `--workspace` | | Bitbucket workspace override (Cloud) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Create a pull request with auto-detected title
bkt pr create
# Create with an explicit title and description
bkt pr create --title "Add OAuth2 support" --description "Implements RFC 6749"
# Create with reviewers and close source branch on merge
bkt pr create --title "Fix login bug" --reviewer alice --reviewer bob --close-source
# Create a draft pull request
bkt pr create --title "WIP: new feature" --draft
# Create from a Data Center fork into an upstream repository
bkt pr create --source-project FORK --source-repo contributor-fork \
--project DEST --repo upstream --source feature --target main
```
## bkt pr decline
Decline (close without merging) a pull request. On Data Center, the optional
--delete-source flag also deletes the source branch after declining. This flag
is not supported on Cloud.
Works on both Data Center and Cloud.
**Alias:** `close`
### Usage
```
bkt pr decline <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--body` | | Alias for --comment; use --comment instead |
| `--comment` | `-m` | Comment explaining why the pull request was declined |
| `--delete-source` | | Delete the source branch after declining |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--text` | | Alias for --comment; use --comment instead |
| `--workspace` | | Bitbucket workspace override (Cloud) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Decline a pull request
bkt pr decline 42
# Decline with a comment explaining the reason
bkt pr decline 42 --comment "Needs more work before we can merge"
# Same using the close alias
bkt pr close 42
# Decline and delete the source branch (Data Center only)
bkt pr decline 42 --delete-source
```
## bkt pr diff
Display the full unified diff for a pull request, streamed through the
configured pager when available. Use --stat for a compact summary of changed
files, additions, and deletions instead of the full patch.
Works on both Data Center and Cloud. On Cloud, --stat also lists per-file
change counts.
### Usage
```
bkt pr diff <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--stat` | | Show diff statistics instead of full patch |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Show the full diff
bkt pr diff 42
# Show diff statistics only
bkt pr diff 42 --stat
```
## bkt pr edit
Edit a pull request's title, description, and/or reviewers. Also available as 'pr update'.
**Alias:** `update`
### Usage
```
bkt pr edit <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--body` | `-b` | Set the new body (alias for --description). |
| `--description` | | Set the new description. |
| `--project` | | Bitbucket project key override. |
| `--remove-reviewer` | | Reviewer username or {UUID} to remove (repeatable) |
| `--repo` | | Repository slug override. |
| `--reviewer` | | Reviewer username or {UUID} to add (repeatable) |
| `--title` | `-t` | Set the new title. |
| `--with-default-reviewers` | | Add repository default reviewers |
| `--workspace` | | Bitbucket workspace override (Cloud). |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Update pull request title
bkt pr edit 123 --title "New feature: user authentication"
# Update pull request description
bkt pr edit 123 --body "This PR adds OAuth2 support"
# Update both title and description
bkt pr edit 123 -t "Fix login bug" -b "Resolves issue with session timeout"
# Add reviewers
bkt pr edit 123 --reviewer alice --reviewer bob
# Remove a reviewer
bkt pr edit 123 --remove-reviewer alice
# Add repository default reviewers
bkt pr edit 123 --with-default-reviewers
# Add and remove reviewers in one call
bkt pr edit 123 --reviewer charlie --remove-reviewer alice
```
## bkt pr list
List pull requests for a repository, filtered by state. On Data Center, the
project and repo are resolved from the active context (or --project/--repo).
On Cloud, the workspace and repo are used instead.
When --mine is set without a specific repository, the command lists pull
requests authored by the authenticated user across all repositories. On Data
Center this uses the dashboard API; on Cloud it queries the workspace.
--reviewer is the reviewer-facing counterpart: it shows pull requests where the
authenticated user is a requested reviewer. Without a repository, Data Center
lists them across all repositories via the dashboard API; Bitbucket Cloud has
no workspace-wide reviewer endpoint, so --reviewer there requires a repository.
--mine and --reviewer cannot be combined.
**Alias:** `ls`
### Usage
```
bkt pr list [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--limit` | | Maximum pull requests to list (0 for all) |
| `--mine` | | Show pull requests authored by the authenticated user |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--reviewer` | | Show pull requests where the authenticated user is a requested reviewer |
| `--state` | | Filter by state (OPEN, MERGED, DECLINED) |
| `--workspace` | | Bitbucket workspace override (Cloud) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# List open pull requests
bkt pr list
# List merged pull requests
bkt pr list --state MERGED
# List your own pull requests across all repositories
bkt pr list --mine
# List pull requests awaiting your review (Data Center: across all
# repositories; Bitbucket Cloud: add --repo)
bkt pr list --reviewer
# List pull requests awaiting your review in a specific repository
bkt pr list --reviewer --repo my-repo
# List pull requests with a limit
bkt pr list --limit 50 --state OPEN
```
## bkt pr merge
Merge a pull request. The source branch is closed by default (use
--close-source=false to keep it). An optional merge strategy can be specified
(e.g. fast_forward, squash) and a custom merge commit message can be provided.
Works on both Data Center and Cloud. On Data Center, the current PR version
is used for optimistic locking.
### Usage
```
bkt pr merge <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--close-source` | | Close source branch on merge |
| `--message` | | Merge commit message override |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--strategy` | | Merge strategy ID (e.g., rebase_fast_forward) |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Merge a pull request
bkt pr merge 42
# Merge with a custom commit message
bkt pr merge 42 --message "Release v1.2.0"
# Merge using rebase fast-forward strategy and keep source branch
bkt pr merge 42 --strategy rebase_fast_forward --close-source=false
```
## bkt pr mergeability
Simulate Bitbucket Cloud's merge checks without attempting a merge.
Mergeable is MERGEABLE, CONFLICTING, or UNKNOWN. Merge state is CLEAN,
DIRTY (conflicts), BLOCKED (a blocking check), or UNKNOWN (incomplete checks).
Structured output includes the complete checks and their blocking flags.
CLEAN describes the checks available now; Bitbucket cannot evaluate every
condition without an actual merge attempt. API failures print UNKNOWN and
exit nonzero. Data Center is not supported.
### Usage
```
bkt pr mergeability <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
bkt pr mergeability 42
bkt pr mergeability 42 --json
bkt pr mergeability 42 --json --jq '{mergeable, mergeStateStatus}'
```
## bkt pr publish
Toggle a pull request between draft and published states. By default, this
command publishes a draft pull request so it is visible for review. Use --undo
to convert a published pull request back to draft.
Works on both Data Center (8.18+) and Cloud. If the pull request is already
in the desired state, the command prints a warning and exits without error.
**Alias:** `ready`
### Usage
```
bkt pr publish <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--undo` | | Convert a pull request back to draft |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Publish a draft pull request
bkt pr publish 42
# Convert a pull request back to draft
bkt pr publish 42 --undo
```
## bkt pr reaction
List, add, or remove emoji reactions on pull request comments.
Data Center only. Not yet supported on Cloud.
```
bkt pr reaction <command> [flags]
```
### Examples
```bash
# List reactions on a comment
bkt pr reaction list 42 1001
# Add a thumbs-up reaction
bkt pr reaction add 42 1001 --emoji :thumbsup:
# Remove a reaction
bkt pr reaction remove 42 1001 --emoji :thumbsup:
```
| Subcommand | Description |
|---|---|
| add | Add a reaction to a comment (DC only) |
| list | List comment reactions (DC only) |
| remove | Remove a reaction (DC only) |
## bkt pr reaction add
Add an emoji reaction to a pull request comment. Data Center only.
### Usage
```
bkt pr reaction add <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--emoji` | | Emoji to add (e.g. :thumbsup:) |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Add a thumbs-up reaction to comment 1001
bkt pr reaction add 42 1001 --emoji :thumbsup:
```
## bkt pr reaction list
List all emoji reactions on a specific pull request comment. Shows each emoji and its count. Data Center only.
### Usage
```
bkt pr reaction list <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# List reactions on comment 1001 of PR #42
bkt pr reaction list 42 1001
```
## bkt pr reaction remove
Remove an emoji reaction from a pull request comment. Data Center only.
### Usage
```
bkt pr reaction remove <id> <comment-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--emoji` | | Emoji to remove |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Remove a thumbs-up reaction from comment 1001
bkt pr reaction remove 42 1001 --emoji :thumbsup:
```
## bkt pr reopen
Reopen a previously declined pull request, returning it to the OPEN state.
Works on both Data Center and Cloud. On Data Center, the current PR version
is used for optimistic locking.
### Usage
```
bkt pr reopen <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket workspace override (Cloud) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Reopen a declined pull request
bkt pr reopen 42
```
## bkt pr reviewer-group
List, add, or remove default reviewer groups for a repository.
Data Center only. Not yet supported on Cloud.
```
bkt pr reviewer-group <command> [flags]
```
### Examples
```bash
# List configured reviewer groups
bkt pr reviewer-group list
# Add a reviewer group
bkt pr reviewer-group add backend-team
# Remove a reviewer group
bkt pr reviewer-group remove backend-team
```
| Subcommand | Description |
|---|---|
| add | Add a default reviewer group (DC only) |
| list | List default reviewer groups (DC only) |
| remove | Remove a default reviewer group (DC only) |
## bkt pr reviewer-group add
Add a default reviewer group to the repository. Data Center only.
### Usage
```
bkt pr reviewer-group add <group> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Add a reviewer group
bkt pr reviewer-group add backend-team
```
## bkt pr reviewer-group list
List the default reviewer groups configured for a repository. Data Center only.
### Usage
```
bkt pr reviewer-group list [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# List reviewer groups
bkt pr reviewer-group list
```
## bkt pr reviewer-group remove
Remove a default reviewer group from the repository. Data Center only.
### Usage
```
bkt pr reviewer-group remove <group> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Remove a reviewer group
bkt pr reviewer-group remove backend-team
```
## bkt pr suggestion
Apply or preview a code suggestion attached to a pull request comment. By
default, the suggestion is applied directly. Use --preview to see the
suggested change without applying it.
Data Center only. Not yet supported on Cloud.
### Usage
```
bkt pr suggestion <id> <comment-id> <suggestion-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--preview` | | Preview suggestion without applying |
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# Apply a code suggestion
bkt pr suggestion 42 1001 1
# Preview a suggestion without applying
bkt pr suggestion 42 1001 1 --preview
```
## bkt pr task
List, create, complete, or reopen tasks on a pull request.
On Bitbucket Data Center, pull request tasks are implemented as blocker comments
(Data Center 7.2+). "bkt pr comments --details" surfaces them in review context,
while "bkt pr task" is the focused task workflow; the two overlap by design. On
Bitbucket Cloud, tasks are a separate first-class pull request resource.
```
bkt pr task <command> [flags]
```
### Examples
```bash
# List tasks on a pull request
bkt pr task list 42
# Create a task
bkt pr task create 42 --text "Update the changelog"
# Complete / reopen a task
bkt pr task complete 42 99
bkt pr task reopen 42 99
```
| Subcommand | Description |
|---|---|
| complete | Complete (resolve) a pull request task |
| create | Create a task on a pull request |
| list | List tasks for a pull request |
| reopen | Reopen a resolved pull request task |
## bkt pr task complete
Complete (resolve) a pull request task
### Usage
```
bkt pr task complete <id> <task-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override (DC) |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
bkt pr task complete 42 99
```
## bkt pr task create
Create a task on a pull request
### Usage
```
bkt pr task create <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override (DC) |
| `--repo` | | Repository slug override |
| `--text` | | Task text |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
bkt pr task create 42 --text "Add unit tests"
```
## bkt pr task list
List tasks for a pull request
### Usage
```
bkt pr task list <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override (DC) |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
bkt pr task list 42
```
## bkt pr task reopen
Reopen a resolved pull request task
### Usage
```
bkt pr task reopen <id> <task-id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override (DC) |
| `--repo` | | Repository slug override |
| `--workspace` | | Bitbucket Cloud workspace override |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
bkt pr task reopen 42 99
```
## bkt pr view
Display the title, state, author, source and target branches, description, and
reviewers for a pull request. Use --web to open the pull request in your
default browser instead of printing to the terminal.
Works on both Data Center and Cloud.
### Usage
```
bkt pr view <id> [flags]
```
### Flags
| Flag | Short | Description |
|---|---|---|
| `--project` | | Bitbucket project key override |
| `--repo` | | Repository slug override |
| `--web` | | Open the pull request in your browser |
| `--workspace` | | Bitbucket workspace override (Cloud) |
### Inherited Flags
| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` | | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` | | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` | | Output in JSON format when supported |
| `--template` | | Render output using Go templates |
| `--yaml` | | Output in YAML format when supported |
### Examples
```bash
# View pull request details
bkt pr view 42
# Open the pull request in a browser
bkt pr view 42 --web
# View a pull request in a different repository
bkt pr view 10 --repo my-other-repo
```
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 |