A CLI tool for find-and-replace across multiple Bitbucket Cloud repositories. Search for a string across your workspace, pick which repos to update, and bbme will clone them, make the changes, push new branches, and open PRs — all in one interactive session.
Requires Python 3.12+ and uv.
uv syncOptionally, install bbme as a global command so you can run it from anywhere:
uv tool install .Copy the example config and fill in your Bitbucket credentials:
cp bbme.toml.example bbme.tomlbbme.toml
[bitbucket]
workspace = "your-workspace"
# App password (most common) — set both username and token
username = "your-bitbucket-username"
token = "your-app-password"
# OAuth / workspace access token — set only token, remove username
# token = "your-oauth-or-workspace-token"You can also place this file at ~/.config/bbme/bbme.toml to keep it out of your project directory.
Note: Git clone and push use HTTPS, so make sure your git credential helper is configured for Bitbucket (or that your app password is stored in your system keychain).
uv run bbmeThe tool walks you through each step interactively:
- Enter a search string and its replacement
- bbme searches the Bitbucket code search API across your workspace
- Select which repositories to update
- Choose the base branch and a new branch name
- Write a commit message
- Review changes, push, and optionally create pull requests
All cloned repos are placed in a local workspace/ directory.
For a detailed walkthrough with sample TUI output for every step, see FLOW.md.
Search Bitbucket API → Select repos → Clone → Branch → Find & replace → Commit → Push → Create PRs
- Exact string matching (not regex) across all text files in each repo
- Binary files are automatically skipped
- Each repo is tracked independently — if one fails, the rest continue
- A summary table is printed at the end showing the status of every repo
- Go to Bitbucket → Personal settings → App passwords
- Click Create app password
- Grant these permissions:
- Repositories: Read, Write
- Pull requests: Read, Write
- Copy the generated password into
bbme.toml