ExStorageServiceCli

Hex.pm

A CLI tool (ess) for managing ExStorageService S3-compatible object storage.

Installation

mix escript.install hex ex_storage_service_cli

The ess binary will be installed to ~/.mix/escripts/ess. Make sure ~/.mix/escripts is in your PATH.

Quick Start

# Configure credentials
ess configure
# Create a bucket
ess mb my-bucket
# Upload a file
ess cp ./file.txt s3://my-bucket/file.txt
# List objects
ess ls my-bucket
# Download a file
ess cp s3://my-bucket/file.txt ./downloaded.txt
# Delete an object
ess rm s3://my-bucket/file.txt
# Delete a bucket
ess rb my-bucket

Commands

CommandDescription
ess configureSet up access credentials and endpoint
ess mb <bucket>Make (create) a bucket
ess rb <bucket>Remove (delete) a bucket
ess ls [bucket[/prefix]]List buckets or objects
ess cp <src> <dst>Copy files (upload/download/S3-to-S3)
ess rm s3://bucket/keyRemove an object
ess mv <src> <dst>Move an object (copy + delete)
ess presign s3://bucket/keyGenerate a presigned URL
ess infoShow server health info
ess versionPrint CLI version

Global Options

--endpoint <url> S3 endpoint (default: http://localhost:9000)
--profile <name> Use a named profile
--access-key <id> Override access key ID
--secret-key <key> Override secret access key
--region <region> AWS region (default: us-east-1)
--json Output in JSON format
--no-color Disable colored output
-h, --help Show help

Configuration

Credentials are stored in ~/.config/ess/config.toml:

[default]
endpoint = "http://localhost:9000"
access_key_id = "AKIA..."
secret_access_key = "..."
region = "us-east-1"
[profiles.production]
endpoint = "https://s3.example.com"
access_key_id = "AKIA..."
secret_access_key = "..."
region = "us-east-1"

Use --profile <name> to switch between profiles.

License

MIT — see LICENSE.