Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stoar/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@stoar/cli
CLI tool for STOAR - decentralized file storage on Arweave.
Installation
npm install -g @stoar/cli
# or
bun add -g @stoar/cliConfiguration
The CLI requires a wallet to interact with Arweave. You can provide it in two ways:
- Command line flag:
--wallet path/to/wallet.json - Environment variable:
STOAR_WALLET_PATH=/path/to/wallet.jsonSTOAR_WALLET=<base64-encoded-wallet-json>
Keeping Up to Date
The CLI will automatically check for updates once every 24 hours and notify you when a new version is available. You can:
# Check for updates manually
stoar update --check
# Update to the latest version
stoar update
# Force update even if on latest version
stoar update --force
# Skip automatic update checks
stoar --skip-update-check <command>
# Or set environment variable
export STOAR_SKIP_UPDATE_CHECK=trueUsage
Wallet Management
# Create a new wallet
stoar wallet create --output my-wallet.json
# Check wallet balance
stoar wallet balance --wallet my-wallet.json
# Show wallet address
stoar wallet address --wallet my-wallet.jsonFile Operations
# Upload a single file
stoar upload file.pdf --wallet wallet.json
# Upload with metadata
stoar upload file.pdf --name "My Document" --tags category=docs,year=2024
# Upload multiple files (automatically uses batch mode)
stoar upload *.jpg --wallet wallet.json
# Download a file
stoar download <transaction-id> --output downloaded-file.pdfQuery Files
# List your uploads
stoar list --wallet wallet.json
# List with filters
stoar list --tags type=image --limit 50Configuration
# Set default gateway
stoar config set gateway https://arweave.net
# View configuration
stoar config get
# Reset configuration
stoar config resetOutput Formats
All commands support different output formats:
--json- Output results in JSON format--quiet- Only output essential information--verbose- Show detailed output
Phase 1 Features (Implemented)
- ✅ Basic upload/download functionality
- ✅ Wallet management (create, balance, address)
- ✅ List/query operations
- ✅ Configuration system
- ✅ Multiple output formats (JSON, quiet, verbose)
- ✅ Automatic update notifications and self-update capability
Upcoming Features
- Phase 2: Batch operations, auto-batching, directory uploads, progress indicators
- Phase 3: S3-compatible commands, static website deployment, monitoring
- Phase 4: Interactive mode, enhanced UI, error recovery
Development
# Install dependencies
bun install
# Build
bun run build
# Run tests
bun run test
# Development mode
bun run devLicense
MIT