| Crates.io | sdrive |
| lib.rs | sdrive |
| version | 1.6.3 |
| created_at | 2024-03-18 10:16:32.332064+00 |
| updated_at | 2025-04-07 21:26:01.270329+00 |
| description | Command line tool for uploading and managing files on SDrive. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1177539 |
| size | 2,998,158 |
Secure, encrypted file sharing with P2P capabilities
SDRIVE CLI is a powerful command-line tool designed for secure file sharing with end-to-end encryption and per-file key sharing capabilities. Built with security and ease of use in mind, it allows you to share files with others while maintaining complete control over access and ensuring your data remains private and secure.
cargo install sdrive
First, set up your SDrive configuration with your API credentials and sync folder:
sdrive config create
This will prompt you for:
Create your personal encryption key for end-to-end encryption:
sdrive config generate-key
This key will be:
Test your configuration by uploading a file:
sdrive upload ./test.txt
sdrive config export-keysdrive config import-key# Upload a file
sdrive upload ./myfile.txt
# Share a file via P2P
sdrive share ./video.mp4
# Download a file P2P
sdrive download blobacahvuqj... --output video.mp4
# Download a file IPFS
sdrive download https://ipfs.sdrive.pro...
# Decrypt a file
sdrive decrypt encrypted.bin --output decrypted.txt
sdrive config create [--config-path <path>] [--sync-dir <path>] [--user-guid <guid>] [--api-key <key>]
This command sets up your SDrive environment with:
The configuration is stored securely in your local system and is required for all other operations.
sdrive config generate-key [--config-path <path>]
Creates a secure master encryption key that is stored in your system's keyring. This key is used for:
The key is never stored in plain text and is protected by your system's security mechanisms.
sdrive config export-key
Exports your master encryption key in base64 format. This is useful for:
⚠️ Security Warning: Store the exported key securely and never share it with unauthorized parties.
sdrive config import-key <base64-key>
Imports a previously exported master encryption key from base64 format. This allows you to:
sdrive upload <filepath> [--config-path <path>] [--unencrypted] [--overwrite]
Uploads a file to SDrive with multiple layers of security:
Options:
--unencrypted: Skip encryption for public files--overwrite: Replace existing file--config-path: Use custom configuration filesdrive share <filepath>
Share files directly using Iroh's P2P protocol:
sdrive download <url> [--output <filepath>] [--key <base64-key>]
Downloads and decrypts files from SDrive with flexible options:
--output: Specify a custom location for the decrypted file--key: Use a per-file sharing key for decryption (optional)Supports multiple download sources:
sdrive decrypt <filepath> [--output <filepath>]
Decrypts locally stored encrypted files using your keyring:
Control the verbosity of logging output with the --log-level flag:
sdrive --log-level debug <command>
Available log levels:
error: Only show critical errorswarn: Show warnings and errorsinfo: Show general information (default)debug: Show detailed debugging informationtrace: Show extremely detailed debugging informationIf you encounter any issues, follow these steps:
Key Management
File Sharing
Configuration
This project is licensed under the MIT License, allowing for:
See the LICENSE file for full details.
For support, please: