# Install b2-tools with Homebrew, apk, scoop

B2 Cloud Storage Command-Line Tools. Version 4.7.1 via Homebrew; verified 2026-06-09. Also installable with apk: sudo apk add b2-tools.

## Install

```sh
sudo av install brew:b2-tools
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install b2-tools
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add b2-tools
```

  Evidence: Alpine Linux edge package indexes: b2-tools from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/b2
```

  Evidence: Scoop official bucket manifest trees: bucket/b2.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:b2-tools
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/b2-tools>
- **Version:** 4.7.1
- **Source summary:** B2 Cloud Storage Command-Line Tools
- **Homepage:** <https://github.com/Backblaze/B2_Command_Line_Tool>
- **Repository:** <https://github.com/Backblaze/B2_Command_Line_Tool>
- **License:** MIT
- **Source archive:** <https://files.pythonhosted.org/packages/c9/81/d53f7f6826032f4a0e2e360de105d62b0be0a1a2ec6b69b7f7329caf7b0e/b2-4.7.1.tar.gz>
- **Last updated:** 2026-06-09T19:24:01Z
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- b2 (cli)
- b2v3 (cli)
- b2v4 (cli)
- b2 (alias)
- b2v3 (alias)
- b2v4 (alias)

## Dependencies

- certifi
- python@3.14

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 4.7.1
- Package-manager updated: 2026-06-09
- Local data: ok
- Upstream repository: https://github.com/Backblaze/B2_Command_Line_Tool
- info: No cached GitHub release or tag data was available.
## Project history and usage

B2 Command Line Tool is Backblaze's official `b2` CLI for B2 Cloud Storage. It gives shell access to account, bucket, file, key, replication, listing, removal, and sync operations.

### Project history

Backblaze maintains the tool in the Backblaze/B2_Command_Line_Tool repository and publishes it as a Python package, standalone binaries, Docker image, and Homebrew package. The README describes it as command-line access to all capabilities of the B2 service.

The CLI has evolved across API-versioned command surfaces. The README documents the current guidance: use `b2` for the latest stable interactive interface, and use version-bound commands such as `b2v4` for long-running scripts that need stable behavior.

### Adoption history

B2 users adopted the CLI because object storage needs scriptable upload, download, sync, lifecycle, and key-management workflows. Backblaze's official docs recommend Homebrew as the quickest setup path for Mac users, while the input package facts also list apk and Scoop packages.

The tool is common in backup scripts and CI jobs because B2 is frequently used as low-cost object storage. Its versioned command aliases are especially package-nerdy: they let a package ship a newer implementation while preserving an older command contract for scripts.

### How it is used

Typical usage starts with account authorization, then commands such as `b2 bucket list`, `b2 file upload`, `b2 ls`, `b2 sync`, and `b2 key create`. The official README and Backblaze docs state that `B2_ACCOUNT_INFO` selects the SQLite cache file for authentication information and that the default is `~/.b2_account_info`.

For containers, the README shows either passing `B2_APPLICATION_KEY` and `B2_APPLICATION_KEY_ID` each run or persisting authorization state in a mounted volume.

### Why package nerds care

For package nerds, `b2-tools` is a neat collision between package name, executable name, and API-versioned command names: Homebrew installs `b2-tools`, users run `b2`, and scripts may choose `b2v4` for compatibility.

It is also a Python CLI with official binary and Docker distribution, so packaging choices affect startup time, dependencies, credential cache placement, and whether users get the newest API surface or a stable alias.

### Timeline

- 2020: Backblaze/B2_Command_Line_Tool GitHub Releases include the 2.x release line.
- 2020s: The README documents Homebrew, PyPI, standalone binaries, Docker, and source installs.
- 2020s: Version-bound commands such as `b2v3` and `b2v4` become part of the CLI compatibility model.

### Related projects

- Backblaze B2 Cloud Storage is the object-storage service managed by the CLI.
- The B2 Native API and S3-compatible API are related service interfaces.
- Backblaze's Docker image packages the same CLI for container workflows.

### Sources

- Backblaze official cloud storage command-line tools docs
- Backblaze/B2_Command_Line_Tool README and releases
- source_facts.package-manager


## Security Notes

infrastructure mutation or orchestration signal.

- **Geiger risk:** orange / medium
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Credential files

- Unix: ~/.b2_account_info
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** b2-tools
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** boost-build
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- apk - b2-tools - 4.6.0-r1: normalized package name match | Alpine Linux edge package indexes: b2-tools from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Command-line tool for Backblaze B2 | https://github.com/Backblaze/B2_Command_Line_Tool
- apk - b2-tools-pyc - 4.6.0-r1: normalized package name match | Alpine Linux edge package indexes: b2-tools-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for b2-tools | https://github.com/Backblaze/B2_Command_Line_Tool
- Scoop - main/b2: installed executable or alias match | Scoop official bucket manifest trees: bucket/b2.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Cloud CLI packages](https://pkg.so/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [python@3.14](https://pkg.so/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [qshell](https://pkg.so/brew/qshell/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage.
- [minio](https://pkg.so/brew/minio/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage, object-storage.
- [storj-uplink](https://pkg.so/brew/storj-uplink/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage, object-storage.
- [gcsfuse](https://pkg.so/brew/gcsfuse/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage, object-storage.
- [geesefs](https://pkg.so/brew/geesefs/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage, object-storage.
- [s5cmd](https://pkg.so/brew/s5cmd/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage.
- [garage](https://pkg.so/brew/garage/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, object-storage.
- [filen-cli](https://pkg.so/brew/filen-cli/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, cloud-storage.
- [s3ql](https://pkg.so/brew/s3ql/) - Both packages touch the same language runtime or ecosystem. Shared terms: certifi, cli, cloud, cloud-infrastructure, infrastructure.
- [s4cmd](https://pkg.so/brew/s4cmd/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, cloud, cloud-infrastructure, cloud-storage, command-line.

## Combined YAML source

View the package source record on GitHub. [combined/b2-tools.yml](https://github.com/mxcl/pkgdb/blob/main/combined/b2-tools.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
