blossom-cli-0.4.1 is not a library.
blossom-cli
CLI client for Blossom blob storage servers, built on blossom-rs.
Quick Start
# Generate a keypair
# Upload a file
# Download a blob
# Check server status
Commands
blossom-cli <COMMAND>
Commands:
keygen Generate a new BIP-340 keypair
upload <FILE> [--content-type <MIME>] Upload a file (auto-detects MIME type)
media <FILE> Upload with server-side processing (BUD-05)
download <SHA256> [OUTPUT] Download a blob (to file or stdout)
exists <SHA256> Check if a blob exists (exit 0 = yes, 1 = no)
delete <SHA256> [--yes] Delete a blob (requires auth, prompts for confirmation)
list <PUBKEY> List blobs uploaded by a pubkey
mirror <URL> Mirror a remote blob to the server (requires auth)
status Get server status
admin <SUBCOMMAND> Admin commands (stats, get-user, set-quota, list-blobs, delete-blob)
resolve <PUBLIC_KEY> Resolve a PKARR public key to blossom endpoints
Global Options:
-s, --server <URL> Server URL or iroh://node-id [default: http://localhost:3000]
-k, --key <KEY> Secret key — hex or nsec1 bech32 [env: BLOSSOM_SECRET_KEY]
-f, --format <FORMAT> Output format: json or text [default: text]
Key Formats
The --key option accepts both formats:
# Hex (64 characters)
# nsec1 bech32
# Or via environment variable
The keygen command outputs both formats:
Secret key (hex): 7c3fb2c976bce406b095a13dae24990661b32a6d1d38c9509041ed3c34959791
Secret key (nsec): nsec10slm9jtkhnjqdvy45y76ufyeqesmx2ndr5uvj5ysg8kncdy4j7gs66zq5r
Public key (hex): bea809c847e78732159417625dfe17c16dd36493919467c9b69c5e9eb3227450
Examples
# Upload and capture the SHA256
SHA=
# Check it exists
# Mirror a blob from another server
# List all blobs by a pubkey
# Download to stdout and pipe
|
# Upload via iroh P2P (no DNS/IP needed)
# Resolve a PKARR public key to endpoints
# JSON output for scripting