// Expert on Shelby CLI tool for command-line blob storage operations. Helps with shelby commands, uploads, downloads, account management, context configuration, faucet operations, and CLI troubleshooting. Triggers on keywords shelby cli, shelby upload, shelby download, shelby init, shelby account, shelby context, @shelby-protocol/cli, CLI installation, shelby command.
| name | shelby-cli-assistant |
| description | Expert on Shelby CLI tool for command-line blob storage operations. Helps with shelby commands, uploads, downloads, account management, context configuration, faucet operations, and CLI troubleshooting. Triggers on keywords shelby cli, shelby upload, shelby download, shelby init, shelby account, shelby context, @shelby-protocol/cli, CLI installation, shelby command. |
| allowed-tools | Read, Grep, Glob, Bash |
| model | sonnet |
Provide expert guidance on using the Shelby Protocol CLI tool for managing accounts, uploading/downloading blobs, configuring contexts (networks), and troubleshooting command-line operations.
Auto-invoke when users mention:
Shelby CLI documentation location:
.claude/skills/blockchain/aptos/docs_shelby/
Key files:
tools_cli.md - Getting started, installation, quick starttools_cli_commands_account-management.md - Account operationstools_cli_commands_context-management.md - Network configurationtools_cli_commands_uploads-and-downloads.md - Upload/download commandstools_cli_commands_faucet.md - Token acquisitiontools_cli_management.md - CLI management and updates# npm
npm install -g @shelby-protocol/cli
# pnpm
pnpm add -g @shelby-protocol/cli
# yarn
yarn global add @shelby-protocol/cli
# bun
bun add -g @shelby-protocol/cli
Prerequisite: Node.js and npm must be installed.
shelby init
What it does:
~/.shelby/config.yamlExample config file:
contexts:
shelbynet:
aptos_network:
name: shelbynet
fullnode: https://api.shelbynet.shelby.xyz/v1
faucet: https://faucet.shelbynet.shelby.xyz
indexer: https://api.shelbynet.shelby.xyz/v1/graphql
shelby_network:
rpc_endpoint: https://api.shelbynet.shelby.xyz/shelby
local:
aptos_network:
name: local
fullnode: http://127.0.0.1:8080/v1
faucet: http://127.0.0.1:8081
shelby_network:
rpc_endpoint: http://localhost:9090/
accounts:
alice:
private_key: ed25519-priv-0x8...
address: "0xfcba...a51c"
default_context: shelbynet
default_account: alice
Interactive mode:
shelby account create
Non-interactive mode:
shelby account create \
--name alice \
--scheme ed25519 \
--private-key ed25519-priv-0x... \
--address 0x...
Options:
--name <account-name> - Label for credentials--scheme <signature-scheme> - Currently supports ed25519--private-key <key> - Raw private key (ed25519-priv-0xโฆ format)--address <aptos-address> - Aptos account address (0xโฆ)Note: All four flags required for non-interactive mode.
shelby account list
Output:
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ Name โ Address โ Private Key โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ alice โ 0xfcb......................................0fb โ ed25519-priv-0x8 โ
โ (default) โ c276e3e598938e00a51c โ adf5... โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
shelby account use <ACCOUNT_NAME>
Example:
shelby account use alice
# โ
Now using account 'alice'
shelby account delete <ACCOUNT_NAME>
Example:
shelby account delete bob
# โ
Account 'bob' deleted successfully
shelby account balance
Output:
๐ฐ Balance:
โโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ Token โ Asset โ Balance โ Raw Units โ
โโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโค
โ APT โ 0x1::aptos_coin::AptosCoin โ 9.998885 APT โ 999,888,500 โ
โโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโค
โ ShelbyU โ 0x1b18363a9f1fe5e6ebf247daba5cc1c โ 9.99993056 โ 999,993,056 โ
โ SD โ 18052bb232efdc4c50f556053922d98e1 โ ShelbyUSD โ โ
โโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
Options:
-a, --account <name> - Query specific account-c, --context <name> - Use different context--address <hex> - Query raw Aptos addressshelby account blobs
Output:
๐ฆ Stored Blobs
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Name โ Size โ Expires โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ .gitignore-v1 โ 494 B โ Oct 11, 2025, 4:03 PM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโ
Options:
-a, --account <name> - List blobs for specific accountNote: Requires Shelby indexer endpoint in context configuration.
shelby context list
Output shows:
(default)shelby context create <CONTEXT_NAME>
shelby context update <CONTEXT_NAME>
shelby context use <CONTEXT_NAME>
Option 1: Faucet URL
shelby faucet --no-open # Prints faucet URL
# Or remove --no-open to automatically open in browser
Option 2: Aptos CLI
# First configure aptos CLI
aptos init --profile shelby-alice \
--assume-yes \
--private-key ed25519-priv-0xa... \
--network custom \
--rest-url https://api.shelbynet.aptoslabs.com \
--faucet-url https://faucet.shelbynet.shelby.xyz/
# Fund account
aptos account fund-with-faucet \
--profile shelby-alice \
--amount 1000000000000000000
shelby faucet --no-open
# Visit the provided faucet URL to get ShelbyUSD tokens
Faucet URLs:
shelby faucet or Aptos CLIshelby upload <src> <dst> -e <expiration>
Required:
<src> - Local file path<dst> - Blob name in Shelby (max 1024 chars, no trailing /)-e, --expiration - Expiration timestampExample:
shelby upload local-video.mp4 videos/my-video.mp4 -e tomorrow
shelby upload ./file.txt data/file.txt --expiration "2025-12-31"
shelby upload document.pdf docs/doc.pdf -e 1735689600
Human-readable:
-e "tomorrow"
-e "in 2 days"
-e "next Friday"
-e "next month"
-e "2025-12-31"
Unix timestamp:
-e 1735689600 # Seconds since epoch
ISO date:
-e "2025-01-01T00:00:00Z"
-e "2025-01-01T00:00:00-0500"
Using date command (Unix):
shelby upload file.txt blob.txt -e $(date -d "+1 hour" +%s)
shelby upload file.txt blob.txt -e $(date -d "+30 days" +%s)
| Flag | Alias | Type | Description |
|---|---|---|---|
--expiration <datetime> | -e | string | Expiration timestamp (required) |
--recursive | -r | flag | Upload entire directory |
--assume-yes | flag | Skip cost confirmation (for scripts) | |
--output-commitments <file> | string | Save commitments to file |
shelby upload -r ./my-directory/ remote-dir/ -e "2025-12-31"
shelby upload --recursive ./website/ site/ --expiration tomorrow
Requirements:
<dst> MUST end with / for recursive uploadsExample:
Local structure:
.
โโโ bar
โโโ foo
โโโ baz
โโโ buzz
Uploaded as:
<account>/remote-dir/bar
<account>/remote-dir/foo/baz
<account>/remote-dir/foo/buzz
Note: No directory blobs created (no <account>/remote-dir/foo).
# Skip interactive cost confirmation
shelby upload file.txt blob.txt -e tomorrow --assume-yes
Use case: Automation, CI/CD pipelines, scripts
shelby download <src> <dst>
Example:
shelby download videos/my-video.mp4 ./local-video.mp4
shelby download data/file.txt ./downloaded-file.txt
| Flag | Alias | Description |
|---|---|---|
--recursive | -r | Download directory (src and dst must end with /) |
--force | -f | Overwrite existing files |
shelby download blob.txt ./existing-file.txt --force
shelby download -r remote-dir/ ./local-dir/
shelby download --recursive site/ ./website/
Requirements:
<src> and <dst> MUST end with /Example:
Shelby blobs:
my-files/document.pdf
my-files/images/photo1.jpg
my-files/images/photo2.jpg
Download:
shelby download -r my-files/ ./local-files/
Result:
./local-files/
โโโ document.pdf
โโโ images/
โโโ photo1.jpg
โโโ photo2.jpg
Without --force:
<dst> must exist<dst> file must not exist<dst> directory must be emptyWith --force:
<dst> completely removed before downloadCurrent limitation: CLI only downloads from active account.
Workaround - Use REST API:
curl https://api.shelbynet.shelby.xyz/shelby/v1/blobs/<account>/<blob-name>
Example:
# Download blob 'foo' from account 0x89ca7d...76357
curl https://api.shelbynet.shelby.xyz/shelby/v1/blobs/0x89ca7dfadf5788830b0d5826a56b370ced0d7938c4628f4b57f346ab54f76357/foo
# 1. Install CLI
npm install -g @shelby-protocol/cli
# 2. Initialize
shelby init
# 3. List accounts
shelby account list
# 4. Fund account (get address from list command)
shelby faucet
# 5. Check balance
shelby account balance
# 6. Upload test file
shelby upload test.txt test-blob.txt -e tomorrow --assume-yes
# 7. Verify upload
shelby account blobs
# 8. Download file
shelby download test-blob.txt downloaded-test.txt
# Upload entire website directory
shelby upload -r ./dist/ my-site/ -e "2026-01-01" --assume-yes
# Verify uploaded files
shelby account blobs
# Download for verification
shelby download -r my-site/ ./verify-download/
#!/bin/bash
# Upload multiple files without prompts
for file in *.mp4; do
shelby upload "$file" "videos/$file" \
-e $(date -d "+90 days" +%s) \
--assume-yes
done
# Work with local development network
shelby context use local
shelby upload test.txt dev-test.txt -e tomorrow
# Switch to production
shelby context use shelbynet
shelby upload prod.txt production-data.txt -e "2025-12-31"
Error:
Insufficient Shelby tokens. Please fund your account with Shelby tokens to continue.
Solution:
# Check current balance
shelby account balance
# Get ShelbyUSD from faucet
shelby faucet
# Visit the faucet URL and fund your account
# Verify balance updated
shelby account balance
Solution:
# Option 1: Use shelby faucet
shelby faucet
# Option 2: Use aptos CLI
aptos account fund-with-faucet --profile shelby-alice --amount 1000000000
Error:
Blob name already exists
Solution:
Cause: File modified between listing and upload.
Solution:
--assume-yes and upload atomicallyError on download:
Parent directory of destination must exist
Solution:
# Create parent directory first
mkdir -p ./path/to/parent/
# Then download
shelby download blob.txt ./path/to/parent/file.txt
Solution:
# List contexts to see configuration
shelby context list
# Update context if needed
shelby context update shelbynet
# Or create new context
shelby context create mycontext
Solution:
# Reinstall globally
npm install -g @shelby-protocol/cli
# Or ensure npm global bin is in PATH
npm config get prefix
export PATH="$(npm config get prefix)/bin:$PATH"
# During init, provide API key to avoid rate limits
shelby init
# Enter API key when prompted
# Always use --assume-yes in scripts/automation
shelby upload file.txt blob.txt -e tomorrow --assume-yes
# โ
Use hierarchical paths
shelby upload file.txt users/alice/documents/file.txt
# โ
Organize by type
shelby upload video.mp4 videos/2024/november/video.mp4
# โ Avoid trailing slashes (unless recursive)
shelby upload file.txt path/to/file/ # Invalid
# Check balance first
shelby account balance
# Then upload
shelby upload -r ./large-dir/ remote/ -e "2025-12-31"
# Temporary data
-e "in 7 days"
# Long-term storage
-e "2026-12-31"
# Time-based content
-e $(date -d "+90 days" +%s)
# After upload, always verify
shelby upload file.txt blob.txt -e tomorrow --assume-yes
shelby account blobs # Confirm blob appears
# Optional: Download and compare
shelby download blob.txt verify.txt
diff file.txt verify.txt
Setup Issues:
Funding Issues:
Upload/Download Issues:
Configuration Issues:
# For upload/download issues
Read docs_shelby/tools_cli_commands_uploads-and-downloads.md
# For account issues
Read docs_shelby/tools_cli_commands_account-management.md
# For setup issues
Read docs_shelby/tools_cli.md
Structure:
User: "How do I upload a directory to Shelby?"
Response:
1. Show recursive upload command with all options
2. Explain directory naming requirements (trailing /)
3. Show canonical directory layout example
4. Mention --assume-yes for scripts
5. Suggest verification with `shelby account blobs`
6. Reference: docs_shelby/tools_cli_commands_uploads-and-downloads.md
When helping users, cite specific documentation:
.claude/skills/blockchain/aptos/docs_shelby/tools_cli.md.claude/skills/blockchain/aptos/docs_shelby/tools_cli_commands_*.md~/.shelby/config.yaml