This is a fork

This fork does a few simple fixes
  • Makes the code compatible for Bitbucket's git repositories, not just Mercurial
  • Gets more than 15 issues with the list command

Bitbucket Issues API - command-line interface


bbi provides an executable called bbi, that can be used to access Bitbucket's Issues API from your command-line


on most UNIX-like systems, you'll probably need to run the following `install` commands as root or by using sudo

from source

pip install -e hg+


hg clone
cd bitbucket-issues-cli
python install

as a result, the bbi executable will be installed into a system bin directory


put your Bitbucket username and password in a file named $HOME/.bbi, like this:

username = <your Bitbucket username>
password = <your Bitbucket password>

for security reasons, you are advised to restrict access to the config file:

chmod 600 ~/.bbi


from within a working directory with a remote that is hosted on Bitbucket (remote named either default or bitbucket, you can do this (note: with the -r option, commands can be invoked from anywhere):

(bbi)[jsmits@imac:~]$ bbi --help
Usage: bbi command [args] [options]

bbi                                 show all open issues
bbi -v                              same as above, but with issue details
bbi -w                              show issues' Bitbucket page in web browser
bbi <nr>                            show issue <nr>
bbi <nr> -w                         show issue <nr>'s Bitbucket page in web
bbi new (n)                         create a new issue (with $EDITOR)
bbi new (n) -m <msg>                create a new issue with <msg> content
                                    (optionally, use \n for new lines; first
                                    line will be the issue title)
bbi edit (e) <nr>                   edit issue <nr> (with $EDITOR)
bbi close (c) <nr>                  close issue <nr> (closing status is asked
bbi open (o) <nr>                   (re)open issue <nr>
bbi remove (rm) <nr>                remove issue <nr>
bbi search (s) <term>               search for <term>
bbi -r <user>/<repo>                specify a repository (can be used for
                                    all commands)
bbi -r <repo>                       specify a repository (gets user from
                                    $HOME/.bbi config file)

Description: command-line interface to Bitbucket's Issues API

  -h, --help            show this help message and exit
  -v, --verbose         show issue details [default: False]
  -m MESSAGE, --message=MESSAGE
                        message content for opening an issue without using the
  -r REPO, --repo=REPO, --repository=REPO
                        specify a repository (format: `user/repo` or just
                        `repo` (latter will get the user from the $HOME/.bbi
                        config file))
  -w, --web, --webbrowser
                        show issue(s) Bitbucket page in web browser (only for
                        list and show commands) [default: False]
  -V, --version         show program's version number and exit