Manage Bitbucket repositories.
Global options available on all repo commands: --json, --no-color, -w, --workspace, -r, --repo.
Clone a Bitbucket repository.
bb repo clone <repository> [options]
Argument Description repositoryRepository to clone (workspace/repo or full URL)
Option Description -d, --directory <dir>Directory to clone into --jsonOutput as JSON
# Clone using workspace/repo format
bb repo clone myworkspace/myrepo
# Clone into a specific directory
bb repo clone myworkspace/myrepo -d my-local-dir
bb repo clone git@bitbucket.org:myworkspace/myrepo.git
Create a new repository.
bb repo create <name> [options]
Argument Description nameName for the new repository
Option Description -w, --workspace <workspace>Workspace to create repository in -d, --description <description>Repository description --privateCreate a private repository (default) --publicCreate a public repository -p, --project <project>Project key --jsonOutput as JSON
# Create a private repository
bb repo create my-new-repo -w myworkspace
# Create a public repository with description
bb repo create my-new-repo -w myworkspace --public -d " My awesome project "
# Create in a specific project
bb repo create my-new-repo -w myworkspace -p PROJ
List repositories in a workspace.
Option Description -w, --workspace <workspace>Workspace to list repositories from --limit <number>Maximum number of repositories (default: 25) --jsonOutput as JSON
# List repositories in a workspace
bb repo list -w myworkspace
bb repo list -w myworkspace --limit 50
# List with JSON output for scripting
bb repo list -w myworkspace --json
--limit is enforced across paginated repository responses
View repository details.
bb repo view [repository] [options]
Argument Description repositoryRepository to view in workspace/repo format (optional if in a repo directory)
Option Description -w, --workspace <workspace>Workspace --jsonOutput as JSON
# View current repository (from within repo directory)
# View specific repository using workspace/repo format
bb repo view myworkspace/myrepo
# View with explicit workspace option
bb repo view myrepo -w myworkspace
# Get repository details as JSON
The positional [repository] argument is the primary way to specify the repo (e.g., bb repo view myworkspace/myrepo). The global -w and -r flags also work as an alternative.
The command will automatically detect the repository from your current directory’s git remote if you don’t specify one.
Delete a repository. This action is permanent and cannot be undone.
bb repo delete <repository> [options]
Argument Description repositoryRepository to delete in workspace/repo format
Option Description -w, --workspace <workspace>Workspace -y, --yesConfirm deletion (required) --jsonOutput as JSON
# Delete a repository (--yes is required to confirm)
bb repo delete myworkspace/myrepo --yes
# Delete using explicit workspace option
bb repo delete myrepo -w myworkspace --yes
Danger
This action is permanent and cannot be undone! All repository data, including code, issues, and pull requests will be deleted.