Skip to content

Repo Commands

Manage Bitbucket repositories.

bb repo clone

Clone a Bitbucket repository.

Terminal window
bb repo clone <repository> [options]

Arguments

ArgumentDescription
repositoryRepository to clone (workspace/repo or full URL)

Options

OptionDescription
-d, --directory <dir>Directory to clone into
--jsonOutput as JSON

Examples

Terminal window
# Clone using workspace/repo format
bb repo clone myworkspace/myrepo
# Clone into a specific directory
bb repo clone myworkspace/myrepo -d my-local-dir
# Clone using full URL
bb repo clone git@bitbucket.org:myworkspace/myrepo.git

bb repo create

Create a new repository.

Terminal window
bb repo create <name> [options]

Arguments

ArgumentDescription
nameName for the new repository

Options

OptionDescription
-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

Examples

Terminal window
# 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

bb repo list

List repositories in a workspace.

Terminal window
bb repo list [options]

Options

OptionDescription
-w, --workspace <workspace>Workspace to list repositories from
--limit <number>Maximum number of repositories (default: 25)
--jsonOutput as JSON

Examples

Terminal window
# List repositories in a workspace
bb repo list -w myworkspace
# List more repositories
bb repo list -w myworkspace --limit 50
# List with JSON output for scripting
bb repo list -w myworkspace --json

bb repo view

View repository details.

Terminal window
bb repo view [repository] [options]

Arguments

ArgumentDescription
repositoryRepository to view in workspace/repo format (optional if in a repo directory)

Options

OptionDescription
-w, --workspace <workspace>Workspace
--jsonOutput as JSON

Examples

Terminal window
# View current repository (from within repo directory)
bb repo view
# 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
bb repo view --json

Notes

The command will automatically detect the repository from your current directory’s git remote if you don’t specify one.


bb repo delete

Delete a repository. This action is permanent and cannot be undone.

Terminal window
bb repo delete <repository> [options]

Arguments

ArgumentDescription
repositoryRepository to delete in workspace/repo format

Options

OptionDescription
-w, --workspace <workspace>Workspace
-y, --yesSkip confirmation prompt
--jsonOutput as JSON

Examples

Terminal window
# Delete with confirmation prompt
bb repo delete myworkspace/myrepo
# Delete without confirmation (use with caution!)
bb repo delete myworkspace/myrepo --yes
# Delete using explicit workspace option
bb repo delete myrepo -w myworkspace --yes