A powerful command-line interface for Bitbucket Cloud. Manage repositories, pull requests, issues, and pipelines directly from your terminal.
- π Repository Management - List, view, clone, create, and manage repositories
- π Pull Requests - Create, review, merge, approve, and manage PRs
- π Issue Tracking - Create, view, comment on, and manage issues
- β‘ Pipelines - Trigger, monitor, and manage CI/CD pipelines
- π₯οΈ Interactive TUI - Beautiful terminal UI for browsing and managing resources
- π Secure Authentication - OAuth 2.0 preferred, API key fallback, with secure keyring storage
cargo install bitbucket-cli# Download the .deb package from releases
wget https://github.com/pegasusheavy/bitbucket-cli/releases/latest/download/bitbucket-cli_amd64.deb
sudo dpkg -i bitbucket-cli_amd64.deb# Download the .rpm package from releases
wget https://github.com/pegasusheavy/bitbucket-cli/releases/latest/download/bitbucket-cli.x86_64.rpm
sudo rpm -i bitbucket-cli.x86_64.rpm
# or with dnf
sudo dnf install bitbucket-cli.x86_64.rpm# Download the package from releases
wget https://github.com/pegasusheavy/bitbucket-cli/releases/latest/download/bitbucket-cli-vX.X.X-x86_64.pkg.tar.zst
sudo pacman -U bitbucket-cli-vX.X.X-x86_64.pkg.tar.zst
# Or build from PKGBUILD
git clone https://github.com/pegasusheavy/bitbucket-cli.git
cd bitbucket-cli/packaging/arch
makepkg -si# Download the tarball from releases
wget https://github.com/pegasusheavy/bitbucket-cli/releases/latest/download/bitbucket-cli-vX.X.X-alpine-x86_64.tar.gz
tar -xzf bitbucket-cli-vX.X.X-alpine-x86_64.tar.gz
sudo mv bitbucket /usr/local/bin/Download the MSI installer from the Releases page and run it.
git clone https://github.com/pegasusheavy/bitbucket-cli.git
cd bitbucket-cli
cargo install --path .Download pre-built binaries for your platform from the Releases page.
Option A: OAuth 2.0 (Recommended)
bitbucket auth login --oauthYou'll need to create an OAuth consumer first:
- Go to your Bitbucket workspace settings
- Set callback URL to ONE of these (the CLI will use the first available):
http://127.0.0.1:8080/callbackhttp://127.0.0.1:3000/callbackhttp://127.0.0.1:8888/callbackhttp://127.0.0.1:9000/callback
- Select permissions:
- Account (Read)
- Repositories (Read)
- Pull requests (Read, Write)
- Issues (Read, Write)
- Pipelines (Read, Write)
- Copy the Key (Client ID) and Secret when prompted
Option B: API Key (For CI/Automation)
bitbucket auth login --api-keyYou'll need to create an HTTP access token:
- Go to Personal settings β HTTP access tokens
- Create a new token with required permissions
- Enter your username and token when prompted
Note: App passwords are deprecated by Atlassian. OAuth 2.0 is the preferred method.
# List repositories
bitbucket repo list myworkspace
# View a repository
bitbucket repo view myworkspace/myrepo
# List pull requests
bitbucket pr list myworkspace/myrepo
# Create a pull request
bitbucket pr create myworkspace/myrepo --title "My PR" --source feature-branch
# Launch interactive TUI
bitbucket tui --workspace myworkspace| Command | Description |
|---|---|
bitbucket auth |
Manage authentication (login, logout, status) |
bitbucket repo |
Manage repositories (list, view, clone, create, fork, delete) |
bitbucket pr |
Manage pull requests (list, view, create, merge, approve, decline) |
bitbucket issue |
Manage issues (list, view, create, comment, close, reopen) |
bitbucket pipeline |
Manage pipelines (list, view, trigger, stop) |
bitbucket tui |
Launch interactive terminal UI |
Launch the interactive terminal UI for a visual way to browse and manage your Bitbucket resources:
bitbucket tuiKeyboard shortcuts:
q- Quit1-5- Switch views (Dashboard, Repos, PRs, Issues, Pipelines)j/korβ/β- NavigateEnter- Select/Openr- Refresh
Configuration is stored in ~/.config/bitbucket/config.toml:
[auth]
username = "your-username"
default_workspace = "your-workspace"
[defaults]
branch = "main"
[display]
color = true
pager = trueFull documentation is available at pegasusheavy.github.io/bitbucket-cli
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project useful, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting features
- π° Supporting on Patreon
Made with β€οΈ by Pegasus Heavy Industries