Skip to content

CLI Reference

The bbkt CLI provides an interactive, terminal-native experience for managing Bitbucket workspaces, repositories, pipelines, issues, and pull requests.

Manage local authentication profiles and APIs tokens.

Terminal window
# List all active credentials and their scopes
bbkt profile list
# Delete a profile from the local keychain
bbkt profile delete <name>
# Force refresh the cached accessible workspaces list
bbkt profile refresh

Interact with Bitbucket Workspaces.

Terminal window
# List all accessible workspaces
bbkt workspaces list
# Get details about a specific workspace
bbkt workspaces get [workspace_slug]

Manage Git repositories.

Terminal window
# List all repositories in a workspace
bbkt repos list [workspace_slug]
# Get details for a specific repository
bbkt repos get [workspace_slug] [repo_slug]
# Create a new repository
bbkt repos create [workspace_slug]
# Delete a repository
bbkt repos delete [workspace_slug] [repo_slug]

Manage Pull Requests.

Terminal window
# List open pull requests
bbkt prs list [workspace_slug] [repo_slug]
# Get a specific pull request
bbkt prs get [workspace_slug] [repo_slug] [pr_id]
# Create a new pull request (prompts for title/branch)
bbkt prs create [workspace_slug] [repo_slug]
# Approve or decline a pull request
bbkt prs approve [workspace_slug] [repo_slug] [pr_id]
bbkt prs decline [workspace_slug] [repo_slug] [pr_id]
# Merge a pull request
bbkt prs merge [workspace_slug] [repo_slug] [pr_id]

Manage comments on Pull Requests.

Terminal window
# List comments on a PR
bbkt prs comments list [workspace_slug] [repo_slug] [pr_id]
# Add a new comment
bbkt prs comments add [workspace_slug] [repo_slug] [pr_id]
# Resolve an existing comment thread
bbkt prs comments resolve [workspace_slug] [repo_slug] [pr_id] [comment_id]

Trigger and monitor CI/CD pipelines.

Terminal window
# List recent pipeline runs
bbkt pipelines list [workspace_slug] [repo_slug]
# Trigger a new pipeline run manually
bbkt pipelines trigger [workspace_slug] [repo_slug]
# Stop a running pipeline
bbkt pipelines stop [workspace_slug] [repo_slug] [pipeline_uuid]
# Stream live step logs to stdout
bbkt pipelines logs [workspace_slug] [repo_slug] [pipeline_uuid] [step_uuid]

Interact with the repository Issue Tracker.

Terminal window
# List open issues
bbkt issues list [workspace_slug] [repo_slug]
# Create a new issue
bbkt issues create [workspace_slug] [repo_slug]

Directly interact with remote source code without a local Git clone.

Terminal window
# View file contents
bbkt source read [workspace_slug] [repo_slug] [filepath]
# Browse repository tree structure
bbkt source tree [workspace_slug] [repo_slug]
# Search codebase natively
bbkt source search [workspace_slug] [repo_slug]
# Commit a new file or modification directly
bbkt source write [workspace_slug] [repo_slug] [filepath]