BackBlaze CLI
This is a unofficial simple backblaze CLI for CRUD based actions.
Install
npm i backblaze-cli -g
Authorization
All commands require being authenticated to backblaze:
Getting auth information
- On your backblaze account dashboard go to the section "App Keys"
- Create an application key
- Copy down your keyID (key id) and applicationKey (key)
- Put this into the cli in one of the methods below
Passing in auth information
-
CLI Flags:
--bucket <bucket> The bucket to make requests to
--key-id <key-id> The key id to use
--key <key> The application key to use
-
You can also use environment variables:
BACKBLAZE_BUCKET= # The bucket name
BACKBLAZE_KEY_ID= # The key id
BACKBLAZE_KEY= # The application key
Usage
Usage: backblaze [options] [command]
A simple unofficial cli to interact with the Backblaze B2 API
Options:
-h, --help display help for command
Commands:
download [options] <file> [output] Download a file from backblaze
remove [options] <file> Remove file from bucket
upload [options] <file> Uploads a file to backblaze
exists [options] <file> Check if a file exists in bucket
count [options] Count the number of files in a bucket
info [options] Get information about bucket
list [options] List the files in a bucket
read [options] <file> Read a file from backblaze
help [command] display help for command
Output
Currently the CLI outputs what it recieves from the api wrapper, if you have a better way of formatting this for use in scripts but also for readability please make a issue or contact me
Support