BB CLI is a command-line interface tool for interacting with Bitbucket. It provides a set of commands for performing operations such as creating projects, creating repositories, adding users to repositories, and more.
- Python 3.10 or above
- Make installed
- Poetry (Python dependency management tool)
-
If you are using Debian/Ubuntu based OS, run the installer
. install.sh
and jump to step 7. -
Make sure you have Python 3.12 installed. You can check your Python version by running
python --version
in your terminal. -
Install Poetry by following the instructions on the official Poetry website.
-
Navigate to the project directory and install the project dependencies with Poetry:
poetry install
-
Set alias for the python execution in linux with:
alias bbcli="python main.py"
-
Configure the file config.yaml with your
CLIENT_ID
andCLIENT_SECRET
from Bitbucket OAuth Consumer
Here are the available commands in BB CLI using with the created alias:
bbcli create-project -n project_name -w workspace
bbcli create-repository -p project -r repo_name -w workspace
bbcli add-user -r repository -e user_email -w workspace
bbcli remove-user -r repository -u user_name -w workspace -a admin_username -p password
bbcli allow-users-merge -r firstjohn -w johnatas-upwork -b main
Please replace the arguments with your actual values. For example, replace project_name with the name of your project.
bash make tests
- For running all unit tests
bash make lint
- For lint all project
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the terms of the MIT license.