b2
Command Line Tool for Backblaze B2
What it is and what it does
B2 is a command-line tool that provides direct access to Backblaze B2 Cloud Storage capabilities. It lets you manage accounts, create and configure buckets, upload and download files, sync directories, and set up replication rules—all from the terminal or scripts. The tool uses the b2sdk library as its foundation and includes helpers like argcomplete for shell integration, tqdm for progress display, and tabulate for formatted output.
The package supports multiple installation methods (pip, Homebrew, Docker, standalone binaries) and uses an ApiVer versioning scheme to maintain backward compatibility. You can invoke it as `b2` for the latest interface or `b2v4` in scripts for a stable, long-term-support version. It requires Python 3.10 or later and stores authentication details locally in an SQLite file by default.
Use it for:
- Automate backup and sync of local directories to B2 buckets in shell scripts or CI/CD pipelines.
- Manage B2 application keys and account permissions from the command line without a web interface.
- Upload or download individual files and monitor progress with built-in progress bars.
- Set up and manage replication rules between B2 buckets for disaster recovery.
- Integrate B2 storage operations into custom tooling via the CLI with shell autocomplete support.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Command-line interface for managing files, buckets, and accounts on Backblaze B2 Cloud Storage, with support for uploading, downloading, syncing, and replication.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It is production-stable and well-suited for developers who need programmatic or scripted access to B2 Cloud Storage. Install it if you use Backblaze B2 and want command-line control; skip it if you only need the web console or have no B2 account.
Install
b2 on PyPI
pip
pip install b2uv
uv add b2poetry
poetry add b2Installing b2
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and no known vulnerabilities. Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for both personal and enterprise deployments.
Quickstart
pip install b2
b2 account authorize
b2 bucket list
Requires Python 3.10 or later; B2 account credentials needed for authorization.
Verify before relying
- Whether the 9 runtime dependencies (argcomplete, arrow, b2sdk, docutils, idna, platformdirs, rst2ansi, tabulate, tqdm) are all required for basic CLI operation or only for optional features.
- Performance characteristics and scalability limits for large-scale sync or replication operations.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — argcomplete, arrow, b2sdk, docutils, idna, platformdirs, rst2ansi, tabulate, tqdm |
| Maintenance | actively maintained — 67 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 170,669/month — #10,389 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: b2-4.7.1-py3-none-any.whl
Keywords: backblaze, b2, cloud, storage
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
b2sdkB2SDK is a Python client library for Backblaze…
permissive · top 15,000 on PyPI
gsutilgsutil is a command-line tool for managing…
permissive · top 5,000 on PyPI
cloudsmith-cliA command-line interface to the Cloudsmith…
permissive · top 15,000 on PyPI
storage3Async Python client library for uploading,…
permissive · top 1,000 on PyPI
snowflake-cliSnowflake CLI is a command-line tool for…
permissive · top 5,000 on PyPI
ddadda is a command-line tool for developing on…
permissive · top 15,000 on PyPI
alibabacloud-oss-v2Uploads, downloads, and manages files on…
permissive · top 5,000 on PyPI
minioProvides high-level Python APIs to connect to…
permissive · top 5,000 on PyPI
coscmdCOSCMD is a command-line tool for managing…
permissive · top 15,000 on PyPI
awscurlA curl-like command-line tool that…
permissive · top 15,000 on PyPI