1.0.5 • Published 11 months ago

@shdwdrive/cli v1.0.5

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
11 months ago

shdwDrive CLI

A command-line interface for interacting with shdwDrive storage.

Features

  • 📤 File uploads (supports both small and large files)
  • 📁 Folder support (create, delete, and manage files in folders)
  • 📥 File and folder deletion
  • 📋 File listing
  • 📊 Bucket usage statistics
  • 🔐 Secure message signing
  • 🔄 Multipart upload support for large files

Installation

You can install the CLI globally using npm:

npm install -g @shdwdrive/cli

Or use it directly from the repository:

git clone https://github.com/genesysgo/shdwdrive-v2-cli.git
cd shdwdrive-v2-cli
npm install
npm run build
npm link

Configuration

The CLI uses environment variables for configuration:

Usage

Upload a file

shdw-drive upload \
  --keypair ~/.config/solana/id.json \
  --bucket your-bucket-identifier \
  --file path/to/your/file.txt \
  --folder optional/folder/path

Delete a file

# Delete a file from root of bucket
shdw-drive delete \
  --keypair ~/.config/solana/id.json \
  --bucket your-bucket-identifier \
  --file filename.txt

# Delete a file from a folder
shdw-drive delete \
  --keypair ~/.config/solana/id.json \
  --bucket your-bucket-identifier \
  --file folder/subfolder/filename.jpg

Create a folder

shdw-drive create-folder \
  --keypair ~/.config/solana/id.json \
  --bucket your-bucket-identifier \
  --name my-folder/subfolder

List files in a bucket

shdw-drive list \
  --keypair ~/.config/solana/id.json \
  --bucket your-bucket-identifier

Check bucket storage usage

shdw-drive usage \
  --keypair ~/.config/solana/id.json \
  --bucket your-bucket-identifier

Command Options

Upload Options

  • -k, --keypair - Path to your Solana keypair file
  • -b, --bucket - Your bucket identifier
  • -f, --file - Path to the file you want to upload
  • -F, --folder - (Optional) Folder path within the bucket

Delete Options

  • -k, --keypair - Path to your Solana keypair file
  • -b, --bucket - Your bucket identifier
  • -f, --file - URL or path of the file to delete

Create Folder Options

  • -k, --keypair - Path to your Solana keypair file
  • -b, --bucket - Your bucket identifier
  • -n, --name - Name/path of the folder to create

Delete Folder Options

  • -k, --keypair - Path to your Solana keypair file
  • -b, --bucket - Your bucket identifier
  • -p, --path - Path of the folder to delete

Development

  1. Clone the repository:
git clone https://github.com/genesysgo/shdwdrive-v2-cli.git
  1. Install dependencies:
cd shdwdrive-v2-cli
npm install
  1. Build the project:
npm run build
  1. Link the CLI locally:
npm link

License

See the LICENSE file for details.

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago