Skip to content

scorpiondefense/durianmarket-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

durianmarket-cli

A command-line tool for durian.market — encrypted file sharing with secure drops, folder management, and cryptocurrency payments.

Features

  • File management — upload, download, list, delete, and share files
  • Anonymous uploads — no account needed (10MB limit, 1-hour expiry)
  • Folder organization — create, list, rename, move, and delete folders
  • Secure drops — end-to-end encrypted file sharing with X25519 + AES-256-GCM
  • API key management — create and revoke API keys for programmatic access
  • Storage subscriptions — purchase storage with ETH, ZEC, or XMR
  • Progress bars — visual feedback for uploads and downloads

Installation

From source

Requires Rust 1.70+.

git clone https://github.com/scorpiondefense/durianmarket-cli.git
cd durianmarket-cli
cargo build --release

The binary will be at target/release/durian.

# Install system-wide
sudo cp target/release/durian /usr/local/bin/

Using the build script

./build.sh

Quick Start

# Check connection
durian status

# Upload anonymously (no account needed)
durian upload --anonymous photo.jpg

# Create an account and login
durian register
durian login

# Upload with your account
durian upload document.pdf

# Or use an API key
durian config set-key fs_your_api_key_here
durian upload document.pdf

Commands

Authentication

durian login                    # Login with email/password
durian login -e user@email.com  # Login with email flag
durian register                 # Create a new account
durian logout                   # Logout and clear tokens

File Operations

durian upload myfile.txt                   # Upload a file
durian upload myfile.txt -f <FOLDER_ID>    # Upload to a folder
durian upload myfile.txt --anonymous       # Anonymous upload (10MB, 1hr)
durian list                                # List all files
durian ls -f <FOLDER_ID>                   # List files in a folder
durian download <FILE_ID>                  # Download a file
durian download <FILE_ID> -o output.txt    # Download to specific path
durian share <FILE_ID>                     # Generate a share link
durian delete <FILE_ID>                    # Delete a file

Folder Management

durian mkdir "My Folder"                   # Create a folder
durian mkdir "Sub" -p <PARENT_ID>          # Create nested folder
durian folders                             # List all folders
durian folders -p <PARENT_ID>              # List subfolders
durian mv-folder <ID> -n "New Name"        # Rename a folder
durian mv-folder <ID> -p <NEW_PARENT>      # Move a folder
durian rmdir <ID>                          # Delete a folder

API Keys

durian keys list                # List your API keys
durian keys create "my-key"     # Create a new key (shown once!)
durian keys revoke <KEY_ID>     # Revoke a key

Secure Drops (E2E Encrypted)

Secure drops use X25519 ECDH key exchange with AES-256-GCM encryption. Files are encrypted client-side before upload.

# Create a drop (prompts for password)
durian drop create
durian drop create --expires 24    # Expires in 24 hours

# Get drop info
durian drop info <CODE>

# Upload a file (auto-encrypts with drop's public key)
durian drop upload <CODE> secret.pdf

# List files in a drop
durian drop files <CODE>

# Download and decrypt (prompts for password)
durian drop download <CODE> <FILE_ID>
durian drop download <CODE> <FILE_ID> -o decrypted.pdf

Storage & Payments

durian storage                  # Show storage usage
durian purchase ETH 100         # Purchase 100 GB with ETH
durian purchase XMR 50          # Purchase 50 GB with XMR
durian payments                 # View payment history
durian addresses                # Show payment addresses

Platform

durian stats                    # Show platform statistics
durian status                   # Check connection and auth

Configuration

durian config show              # Show current settings
durian config set-key <KEY>     # Set API key
durian config set-url <URL>     # Set custom base URL

Configuration

Config file location:

  • macOS: ~/Library/Application Support/durianmarket/config.toml
  • Linux: ~/.config/durianmarket/config.toml

Environment variables (override config file):

  • DURIAN_API_KEY — API key for authentication
  • DURIAN_BASE_URL — Custom base URL
  • DURIAN_CONFIG_PATH — Custom config file path

Secure Drops — How It Works

  1. Create: Server generates an X25519 keypair. The private key is encrypted with your password using Argon2 + AES-256-GCM.
  2. Upload: The CLI generates an ephemeral X25519 keypair, performs ECDH with the drop's public key, derives an AES-256-GCM key via HKDF-SHA256, and encrypts the file before uploading.
  3. Download: The CLI authenticates with your password, decrypts the drop's private key, performs ECDH with each file's ephemeral public key, and decrypts the downloaded files.

All encryption happens client-side. The server never sees plaintext files or passwords.

Building

Cross-platform

The CI workflow builds on both macOS and Ubuntu 24.04 LTS.

cargo build --release
cargo test --release

License

MIT

About

Durian Market Fileserver CLI for Agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors