Skip to content

bb browse

Open repository pages in a web browser

bb browse [<number> | <path> | <commit-sha>] [flags]
# Open the repository of the current checkout
bb browse

# A pull request, a commit, or a file at a line on the current branch
bb browse 42
bb browse a1b2c3d
bb browse src/main.go:120

# A file on another branch, with who changed each line
bb browse src/main.go --branch release/1.2 --blame

# Print the URL instead of opening it, here of the repository's settings
bb browse --settings --repo PROJ/repo --no-browser
--blame
Open blame view for a file
-b, --branch string
Select another branch
-c, --commit string
Select another commit
-n, --no-browser
Print destination URL instead of opening the browser
-r, --releases
Open repository tags/releases view
-R, --repo string
Repository as [HOST/]PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
-s, --settings
Open repository settings

Also takes the global flags.

Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back

Output with --json, where ? marks a field that can be absent
data
  url           string                                           The Bitbucket URL the command resolved to.
  repository    object
    projectKey  string                                           Project key the repository belongs to.
    slug        string                                           Repository slug.
  target        object
    kind        home|settings|releases|pull_request|commit|path  What was addressed: home, settings, releases,
                                                                 pull_request, commit or path.
    arg         string                                           The positional argument as it was typed, empty when
                                                                 none was given.
    number      integer                                          Pull request number.
    path        string                                           Repository path.
    line        integer                                          Line within that path.
    branch      string                                           Branch the path is browsed on, when --branch was given.
    commit      string                                           Commit addressed, or the commit a path is browsed at.
    blame       boolean                                          Whether the URL opens the blame view.