Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Bitbucket Issues API - command-line interface

about

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

installation

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+https://bitbucket.org/jsmits/bitbucket-issues-cli#egg=bbi

or

hg clone https://bitbucket.org/jsmits/bitbucket-issues-cli
cd bitbucket-issues-cli
python setup.py install

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

configuration

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

usage

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]

Examples:
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
                                    browser
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
                                    for)
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

Options:
  -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
                        editor
  -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

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.