A powerful command-line interface for interacting with the Pipe distributed storage network.
Note: This branch (
cleanup-warnings) is compatible with the pipe-storecleanup-warningsbranch. No API changes were made - only internal server warning cleanup.
- Decentralized Storage: Upload and download files to/from the Pipe network
- Directory Sync: Intelligent sync with
.pipe-syncmetadata tracking and incremental updates - Client-Side Encryption: AES-256-GCM encryption with password-based key derivation
- Quantum-Resistant Encryption: Post-quantum cryptography using Kyber-1024 (ML-KEM) and Dilithium5 (ML-DSA)
- Tiered Upload System: Multiple upload tiers with different performance characteristics
- Directory Operations: Upload entire directories with progress tracking
- Resumable Uploads: Skip already uploaded files with
--skip-uploaded - JWT Authentication: Secure authentication with JWT tokens
- Service Discovery: Automatic selection of optimal storage nodes
- Multiple Account Support: Manage multiple accounts with custom config files
- Local Key Management: Generate and manage encryption keys locally with built-in keyring
- Blake3 File IDs: Every file gets a unique Blake3 hash ID for content-based addressing
- Integrity Verification: Automatic integrity checking using Blake3 hashes
bash <(curl -sSL https://raw.githubusercontent.com/pipenetwork/pipe/main/setup.sh)
To build make sure you have Rust and required system packages installed :
# install dependencies
sudo apt update && sudo apt install -y \
build-essential \
pkg-config \
libssl-dev \
git \
curl
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"Download pre-built binaries for your platform from the latest release:
- Linux:
pipe-linux-amd64(Intel/AMD) orpipe-linux-arm64(ARM) - macOS:
pipe-macos-amd64(Intel) orpipe-macos-arm64(Apple Silicon) - Windows:
pipe-windows-amd64.exe
# Download the binary (replace URL with your platform's binary)
wget https://github.com/PipeNetwork/pipe/releases/latest/download/pipe-linux-amd64
# Make it executable
chmod +x pipe-linux-amd64
# Move to PATH
sudo mv pipe-linux-amd64 /usr/local/bin/pipe
# Verify installation
pipe --version- Download
pipe-windows-amd64.exefrom the releases page - Rename it to
pipe.exe - Add it to your PATH or run it directly from the command prompt
# Clone the repository
git clone https://github.com/PipeNetwork/pipe.git
cd pipe/pipe-cli
# Install pipe-cli globally on your system
cargo install --path .If you already have the source code:
cd /path/to/pipe/pipe-cli
cargo install --path .Note: Commands use kebab-case (e.g., new-user, upload-file)
# Create a new user
pipe new-user <your_username>
# Upload a file
pipe upload-file photo.jpg my-photo
# Check upload cost before uploading (NEW!)
pipe upload-file photo.jpg my-photo --dry-run
# Download a file (now with streaming!)
pipe download-file my-photo downloaded-photo.jpg
# Use legacy download endpoint if needed
pipe download-file my-photo downloaded-photo.jpg --legacy
# Upload a directory
pipe upload-directory /path/to/folder --tier normal
# Download a directory (NEW!)
pipe download-directory folder ~/restored/folder --parallel 10
# Sync directories (NEW!)
pipe sync ./local/folder remote/folder # Upload sync
pipe sync remote/folder ./local/folder # Download sync (limited)Pipe-cli now supports client-side AES-256-GCM encryption for maximum privacy:
# Upload with encryption
pipe upload-file sensitive.pdf secure-doc --encrypt
Enter encryption password: ****
Confirm encryption password: ****
# Download and decrypt
pipe download-file secure-doc decrypted.pdf --decrypt
Enter decryption password: ****
# Encrypt entire directory
pipe upload-directory /sensitive/data --encryptPipe-cli now supports intelligent directory synchronization with metadata tracking:
# Sync a local directory to remote (upload)
pipe sync ./documents docs/backup
# Sync with specific conflict resolution
pipe sync ./photos vacation-photos --conflict newer
# Dry run to see what would be synced
pipe sync ./projects remote/projects --dry-run
# Sync with parallel transfers
pipe sync ./data remote/data --parallel 10- Incremental Sync: Only syncs files that have actually changed
.pipe-syncMetadata: Tracks file states, hashes, and sync history- Conflict Detection: Detects when both local and remote have changed
- Blake3 Verification: Fast hash-based change detection for data integrity
- Multiple Strategies: Choose how to resolve conflicts (newer, larger, local, remote, ask)
- Dry Run Mode: Preview changes before syncing
- Progress Tracking: Visual progress bars for all operations
- First Sync: Creates
.pipe-syncmetadata file tracking all file states - Incremental Syncs: Compares current files against last sync state
- Change Detection: Uses size, modification time, and Blake3 hash
- Smart Conflicts: Only flags files changed on both sides as conflicts
Example .pipe-sync file:
{
"last_sync": "2024-01-15T10:30:00Z",
"files": {
"document.pdf": {
"path": "document.pdf",
"size": 102400,
"modified": "2024-01-15T09:00:00Z",
"hash": "a665a45920422f9d417e4867efdc4fb8...",
"last_synced": "2024-01-15T10:30:00Z",
"sync_version": 1
}
}
}Pipe-cli now supports downloading entire directories based on your upload history:
# Download a directory you previously uploaded
pipe download-directory photos/vacation ~/restored/vacation
# Download with parallel transfers for speed
pipe download-directory documents ~/Documents --parallel 10
# See what would be downloaded without actually downloading
pipe download-directory projects ~/restore --dry-run
# Filter files with regex
pipe download-directory logs ~/logs --filter ".*2024.*\.log$"
# Download and decrypt
pipe download-directory encrypted ~/decrypted --decrypt- Upload Log Based: Uses your local upload history (
~/.pipe-cli-uploads.json) - Preserves Structure: Maintains original directory hierarchy
- Parallel Downloads: Configurable concurrency (default: 5)
- Filtering: Regex pattern matching for selective downloads
- Dry Run: Preview what would be downloaded
- Decryption Support: Decrypt files during download
- AES-256-GCM: Military-grade encryption with authenticated encryption
- Password-Based: Secure key derivation using Argon2id
- Key-Based: Support for managed encryption keys
- Post-Quantum: CRYSTALS-Kyber and Dilithium for quantum resistance (see Quantum Encryption section)
- Streaming: Encrypts large files in chunks for memory efficiency
- Transparent: Encrypted files are marked with
.encextension automatically - Zero-Knowledge: Your data is encrypted before leaving your device
-
When you upload with
--encrypt, pipe-cli:- Prompts for a password (or uses
--passwordif provided) - Derives a 256-bit key using Argon2id with a random salt
- Encrypts your file using AES-256-GCM
- Uploads the encrypted file with
.encextension
- Prompts for a password (or uses
-
When you download with
--decrypt, pipe-cli:- Downloads the encrypted file
- Prompts for the password
- Decrypts the file to your specified output path
-
Encrypted files include a header with:
- Magic bytes ("PIPE-ENC") for identification
- Version information for future compatibility
- Salt for password-based key derivation
- Nonce for AES-GCM encryption
pipe-cli supports post-quantum cryptography to protect against future quantum computer attacks:
# Upload with password encryption
pipe upload-file secret.pdf secure-doc --encrypt
Enter encryption password: ****
Confirm encryption password: ****
# Download and decrypt
pipe download-file secure-doc.enc decrypted.pdf --decrypt
Enter decryption password: ****- Kyber-1024 (ML-KEM): NIST-standardized quantum-resistant key encapsulation mechanism
- Dilithium5 (ML-DSA): NIST-standardized quantum-resistant digital signatures
- Key Management: Quantum keys stored locally in the keyring
- Sign and Verify: Use quantum-resistant signatures for file authenticity
-
Key Generation: Generate quantum-resistant keypairs:
- Kyber keypair for future encryption features
- Dilithium keypair for signing/verification
-
Signing: Sign files with your Dilithium private key for authenticity
-
Verification: Verify signatures using the corresponding public key
- Key Size: Quantum keys are larger than classical keys (stored locally in keyring)
- Future-Proof: Protects against future quantum computer attacks
- Signatures: Dilithium5 provides quantum-resistant digital signatures
| Tier | Upload Speed | Cost | Use Case |
|---|---|---|---|
| Normal | Standard | 1x | Regular files |
| Priority | 2x faster | 2x | Important files |
| Premium | 4x faster | 4x | Time-sensitive |
| Ultra | 8x faster | 8x | Mission critical |
| Enterprise | 16x faster | 16x | Maximum performance |
Configuration is stored in ~/.pipe-cli.json by default:
{
"user_id": "your-user-id",
"user_app_key": "your-app-key",
"api_endpoints": ["https://us-west-01-firestarter.pipenetwork.com"],
"jwt_token": "your-jwt-token"
}pipe-cli now supports managing multiple accounts on the same machine through custom configuration files.
Specify a custom config file with --config:
# Use work account
pipe --config ~/.pipe-cli-work.json upload-file report.pdf
# Use personal account
pipe --config ~/.pipe-cli-personal.json upload-file photo.jpgSet the PIPE_CLI_CONFIG environment variable:
# Set config for current session
export PIPE_CLI_CONFIG=~/.pipe-cli-work.json
pipe upload-file report.pdf
# Or for a single command
PIPE_CLI_CONFIG=~/.pipe-cli-personal.json pipe upload-file photo.jpgCreate convenient aliases in your ~/.bashrc or ~/.zshrc:
alias pipe-work='pipe --config ~/.pipe-cli-work.json'
alias pipe-personal='pipe --config ~/.pipe-cli-personal.json'
# Usage
pipe-work upload-file report.pdf
pipe-personal download-file vacation.jpg- Create separate accounts:
pipe --config ~/.pipe-cli-work.json new-user
# Enter work username...
pipe --config ~/.pipe-cli-personal.json new-user
# Enter personal username...- Each account has its own isolated configuration
- Credentials are never mixed between accounts
Configuration file location is determined in this order:
--configcommand line option (highest priority)PIPE_CLI_CONFIGenvironment variable- Default
~/.pipe-cli.json(lowest priority)
Every uploaded file gets a unique Blake3 hash ID that can be used for:
- Content-based addressing
- Integrity verification
- Deduplication detection
# Upload shows the Blake3 hash
pipe upload-file video.mp4 my-video
# Output: Blake3 hash: 7b3a5e8f9c2d4a1b...
# Output: đź“‹ File ID (Blake3): 7b3a5e8f9c2d4a1b5e3f8c9d2a4b6e8f9c3d5a7b8e1f4c9d3a5b7e9f
# Find uploads by hash or path
pipe find-upload video.mp4 # Find by local path
pipe find-upload 7b3a5e8f --by-hash # Find by Blake3 hash prefix
# Use file ID for operations (coming soon - requires server support)
pipe download-file 7b3a5e8f output.mp4 --file-id
pipe delete-file 7b3a5e8f --file-id
pipe create-public-link 7b3a5e8f --file-id
# Rehash old uploads (adds Blake3 to upload history)
pipe rehash-uploads --verboseCheck upload costs before committing to an upload:
# Estimate cost for a single file upload
pipe upload-file large-video.mp4 my-video --dry-run
# Check cost for priority upload
pipe priority-upload data.zip important-data --dry-run
# Works with different tiers
pipe upload-file dataset.csv my-data --tier ultra --dry-runThe dry run will show:
- File size
- Selected upload tier and rate
- Estimated token cost
- Your current token balance
- Whether you have sufficient tokens
Create shareable public links for your files:
# Create a public link
pipe create-public-link myfile.pdf
# Create with custom preview text for social media
pipe create-public-link myfile.pdf --title "My Document" --description "Important file"
# Delete a public link
pipe delete-public-link <link-hash>
# Download from a public link
pipe public-download <link-hash> output.pdfFor faster transfers with priority lanes:
# Priority upload (single file)
pipe priority-upload large-file.zip important-data
# Priority download
pipe priority-download important-data restored.zipWhen uploading directories, skip files that were successfully uploaded before:
pipe upload-directory /large/dataset --skip-uploaded# Use a different endpoint (default is https://us-west-01-firestarter.pipenetwork.com)
pipe upload-file data.csv mydata --api https://custom-endpoint.pipenetwork.compipe list-uploadsGet detailed information about a file including encryption status:
pipe file-info myfile.pdf
# Shows size, upload date, encryption status, etc.Encrypt or decrypt files locally without uploading/downloading:
# Encrypt a file locally
pipe encrypt-local sensitive.doc sensitive.doc.enc
# Decrypt a file locally
pipe decrypt-local sensitive.doc.enc sensitive.docPipe-cli includes a secure keyring for managing encryption keys:
# Generate an AES-256 key
pipe key-gen --name mydata --algorithm aes256
# Generate a post-quantum Kyber key (for encryption)
pipe key-gen --name quantum-safe --algorithm kyber1024
# Generate a post-quantum Dilithium key (for signatures)
pipe key-gen --name signing-key --algorithm dilithium5
# List all keys
pipe key-list
# Export a key (password protected)
pipe key-export mydata mydata.key
# Delete a key
pipe key-delete old-key
# Migrate legacy keyring to custom password (recommended)
pipe keyring-migrateSecurity Update: The keyring now supports custom master passwords!
- New users: You'll be prompted to set a password when creating your first key
- Existing users: Run
pipe keyring-migrateto upgrade from the default password - Legacy mode: If you see warnings about "legacy keyring", your keys are still using the old hardcoded password
keyring-protection
Protect your data against future quantum computers using NIST-standardized algorithms:
# Generate quantum-resistant keys
pipe key-gen --name quantum-encrypt --algorithm kyber1024
pipe key-gen --name quantum-sign --algorithm dilithium5
# Sign a file with Dilithium5 (ML-DSA)
pipe sign-file document.pdf document.sig --key quantum-sign
# Verify a signature
pipe verify-signature document.pdf document.sig --public-key quantum-sign.pubQuantum Cryptography Support:
- Kyber-1024 (ML-KEM) keys can be generated for future use
- Dilithium5 (ML-DSA) for quantum-resistant digital signatures
- Keys are stored in the local keyring
If you get "File not found" errors:
- For encrypted files: use the
--decryptflag (don't include.encin the filename) - Check exact filename with
pipe list-uploads - Ensure you're logged in as the file owner
If key operations fail with "Decryption failed":
- Use password
keyring-protectionwhen prompted for "keyring password" - Keys generated before v0.1.x may not work due to a bug (regenerate them)
- For new installations, all key operations should work with the default password
Downloads are automatically base64 decoded. If you encounter issues:
- Ensure you're using the latest version
- For binary files, decoding happens automatically
- No manual base64 decoding is needed
- Passwords are never stored: Only the encrypted data is uploaded
- Use strong passwords: Combine uppercase, lowercase, numbers, and symbols
- Backup your passwords: Lost passwords mean lost data
- Local encryption: All encryption happens on your device
- Quantum-safe options: Use
--quantumflag for future-proof encryption - Key storage: All keys are stored locally in an encrypted keyring
- BREAKING: Removed testnet-only features for mainnet deployment
- Removed referral system (no longer available)
- Removed SOL withdrawal commands
- Removed token withdrawal commands
- Removed
check-solcommand
- Added: Prepaid deposit system with one-way PIPE deposits
check-deposit- View deposit balance and storage quotasestimate-cost- Estimate upload costs before uploadingsync-deposits- Manually sync deposits from wallet
- Changed: USD-based pricing model ($10/TB = $0.01/GB)
- Changed: Deposits are burned as storage is used (no withdrawals)
- Important: This is a production mainnet release - all deposits use real PIPE tokens
- Added: Directory sync with
.pipe-syncmetadata tracking - Added: Incremental sync - only sync files that have changed
- Added: Blake3 hash-based change detection
- Added: Conflict detection and resolution strategies
- Added: Sync state tracking with version history
- Improved: Efficient sync operations with progress tracking
- Fixed: Base64 decoding now happens automatically for all downloads
- Fixed: Key export and signing operations (nonce storage bug resolved)
- Added: Quantum-resistant key generation and digital signatures (Kyber-1024 and Dilithium5)
- Added: Multiple account support via
--configoption - Improved: Better error messages for file not found errors
- Note: Keys generated before this version may need to be regenerated
- Added: High-performance streaming downloads (no more base64 encoding overhead!)
- Added: Direct streaming from storage to disk (lower memory usage)
- Added:
--legacyflag for backward compatibility with old download endpoint - Improved: Download speeds significantly improved, especially for large files
- Fixed: No more timeouts on large file downloads
The new streaming download feature provides:
- Direct streaming: Files stream directly from storage to your disk
- Lower memory usage: No need to buffer entire file in memory
- Faster downloads: No base64 encoding/decoding overhead
- Progress tracking: Real-time download progress with accurate speeds
- Backward compatibility: Use
--legacyflag if you encounter issues
# Default: Use new high-performance streaming
pipe download-file large-video.mp4
# Fallback: Use legacy endpoint if needed
pipe download-file large-video.mp4 --legacypipe-cli uses a prepaid deposit system where you deposit PIPE tokens that are burned as you use storage. Deposits are one-way and cannot be withdrawn.
View your deposit balance, available storage across all tiers, and pricing information:
pipe check-depositThis shows:
- Current deposit balance in PIPE and USD
- Live PIPE price from Jupiter
- Available storage for each tier (Normal, Priority, Premium, Ultra, Enterprise)
- Cost per GB in both PIPE and USD
- Your deposit wallet address
- Lifetime deposit and burn statistics
Calculate the cost to upload a file before actually uploading:
# Estimate cost for normal tier
pipe estimate-cost video.mp4
# Estimate cost for premium tier
pipe estimate-cost large-dataset.zip --tier premium
# Estimate cost for enterprise tier
pipe estimate-cost backup.tar.gz --tier enterpriseThe estimate shows:
- File size in GB and bytes
- Selected tier and pricing
- Estimated cost in PIPE and USD
- Your balance before and after upload
- Whether you can afford the upload
Manually trigger a deposit sync from your wallet to your deposit balance:
pipe sync-depositsThe system auto-syncs every 30 seconds, but use this for immediate confirmation after depositing PIPE to your wallet.
- Deposit PIPE: Send PIPE tokens to your deposit wallet address (shown in
pipe check-deposit) - Sync: Run
pipe sync-depositsor wait 30 seconds for automatic sync - Use Storage: Upload files - costs are automatically deducted from your deposit balance
- Monitor: Use
pipe check-depositto track remaining balance and available storage
Important: Deposits are one-way by design. PIPE deposited into the system cannot be withdrawn - it's burned as you use storage.
Storage is priced at $10 USD per 1 TB, which equals $0.01 USD per GB.
The amount of PIPE you need adjusts based on market price:
| PIPE Price | PIPE per GB | For 1 TB |
|---|---|---|
| $0.05 USD | 0.2 PIPE | 200 PIPE |
| $0.10 USD | 0.1 PIPE | 100 PIPE |
| $0.50 USD | 0.02 PIPE | 20 PIPE |
| $1.00 USD | 0.01 PIPE | 10 PIPE |
Tier multipliers:
- Normal: 1x = $0.01/GB
- Priority: 2.5x = $0.025/GB
- Premium: 5x = $0.05/GB
- Ultra: 10x = $0.10/GB
- Enterprise: 25x = $0.25/GB
Check your wallet PIPE token balance:
# Check PIPE token balance (different from deposit balance)
pipe check-tokenNote: This shows your wallet balance, which is different from your deposit balance. Use pipe check-deposit to see your prepaid storage balance.
Apache-2.0