Bash Bucket is a command line interface to open repositories, branches, and pull requests in the default browswer for both Bitbucket and Github with either Mecurial or Git as the version control system (VCS).
The purpose of bash-bucket is to efficiently open up current branch details through the terminal window:
$ bb
- open repo in browser$ bb branch
- open current branch$ bb commits
- open branch commit history$ bb compare [branch]
- open and compare current branch to optional argument$ bb issues
- go to issues in browser$ bb info
- get branch and repo information about current directory$ bb pr
- open a pull request from current branch$ bb repo
- open repo in browser
Installation on NPM
$ npm i bash-bucket -g # installs as global CLI
Boom, now you can use all the bash-bucket commands! 💥
All commands are fully explained below ⬇️
Open current branch in browser
$ cd directory/to/current-project
$ bb branch [branch] # open specific branch as optional parameter rather than current
Open current branch commit history in browser
$ cd directory/to/current-project
$ bb commits
Compare current branch as source to a destination branch
$ cd directory/to/current-project
# Replace 'branch' with branch you want to compare current branch to
$ bb compare [branch]
# -- OR --
# By default, this function will compare current branch to 'develop'
$ bb compare
Get branch/repo information returned in terminal window
$ cd directory/to/current-project
$ bb info
Opens browser to current issues
$ cd directory/to/current-project
$ bb issues
Opens browser to create a pull request in Bitbucket
$ cd directory/to/current-project
$ bb pr
Open current branch in Bitbucket
$ cd directory/to/current-project
$ bb
# -- OR --
$ bb repo
- Open Bitbucket from Bash by Steve Posh
- An introduction to useful bash aliases and functions by Justin Ellingwood @ DigitalOcean
- gh-home by Sindre Sorhus