Official Backblaze B2 CLI for bucket, file, sync, replication, and application-key operations.
$brew install b2-tools
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
Backblaze B2 CLI is the official command line client for Backblaze B2 Cloud Storage. It covers account authorization, bucket and file operations, bulk sync, application keys, replication, and notification rules for object storage workflows.
What It Enables
- Authorize against a B2 account, inspect buckets or files, and create, update, or delete buckets, keys, and object metadata from the shell.
- Sync local folders to B2, download or copy objects between local paths and buckets, and automate recurring backup or transfer jobs.
- Manage replication and notification rules, generate download authorization tokens or URLs, and script follow-up storage operations around those results.
Agent Fit
- List and info commands expose real
--jsonoutput, and the code explicitly recommends JSON for scripts because human-readable output can change across minor releases. - The CLI is usable in unattended flows with env-based credentials, non-interactive subcommands, and dry-run support on
syncandrm. - For long-lived automation, Backblaze recommends the version-pinned
b2v4interface instead of floatingb2, which fits durable agent workflows better.
Caveats
- Useful operation starts with B2 credentials;
account authorizeprompts by default unless keys are supplied through environment variables or arguments. - Some high-impact commands are intentionally sharp, especially
sync --delete, so agents should stage changes with--dry-runand explicit scopes.