remote-files

Crates.ioremote-files
lib.rsremote-files
version0.1.2
sourcesrc
created_at2023-12-15 17:03:42.000463
updated_at2024-10-17 15:40:31.256552
descriptiona cli/lib wrapper of opendal to download/upload and manage remote files on buckets
homepage
repositoryhttps://github.com/amountainram/remote-files
max_upload_size
id1071127
size133,034
Umberto Toniolo (amountainram)

documentation

README

Remote Files

A command line and library wrapper of OpenDAL, which allows managing remote files on buckets, such as download and download them.

Currently supported buckets are:

Remote-files may work also with cloud storage providers that offer an API compatible with GCS or S3, but no guarantees are provided.

Installation

cargo install remote-files

Configuration

In order to use remote-files it is necessary to generate a configuration file that lists all the connection profiles, alongside their credentials details.

The location of this configuration file is governed through environment variable RF_CFG_FILEPATH, whose default value depends on the operating system.

OS OS Configuration Folder Example
Linux $HOME/.config /home/alice/.config/rf/configuration.json
MacOS $HOME/Library/Application Support /Users/Alice/Library/Application Support/rf/configuration.json
Windows {FOLDERID_RoamingAppData} C:\Users\Alice\AppData\Roaming\rf\configuration.json

Examples

Here is provided an example of configuration file that defines two different connection profiles, one for Google Cloud Storage and one for Amazon S3.

{
  "my-gcs-bucket": {
    "type": "gcs",
    "configuration": {
      "name": "my-gcs-bucket",
      "credentialPath": "~/.config/gcloud/application_default_credentials.json"
    }
  },
  "my-aws-bucket": {
    "type": "s3",
    "configuration": {
      "name": "my-aws-bucket",
      "endpoint": null,
      "prefix": null,
      "region": "eu-west-1",
      "accessKeyId": "********************",
      "secretAccessKey": "******************************",
      "defaultStorageClass": null
    }
  }
}

Commands

In the following sections are described which commands can be executed with remote-files.

profiles

Manage connection profiles

list

List files in selected folder

download

Download selected file from source directory

upload

Upload selected file to target directory

Commit count: 52

cargo fmt