45 releases (21 breaking)

0.41.0 Oct 16, 2023
0.39.0 Jul 31, 2023
0.30.5 Mar 31, 2023
0.19.6 Oct 25, 2022
0.11.3 Jul 26, 2022

#513 in Filesystem

Download history 44/week @ 2023-08-14 1/week @ 2023-08-21 87/week @ 2023-08-28 51/week @ 2023-09-04 1/week @ 2023-09-11 25/week @ 2023-09-18 6/week @ 2023-09-25 2/week @ 2023-10-02 34/week @ 2023-10-16 19/week @ 2023-10-23 57/week @ 2023-10-30 51/week @ 2023-11-13 52/week @ 2023-11-20 139/week @ 2023-11-27

242 downloads per month

Apache-2.0

2.5MB
48K SLoC

oli

What oli is

oli stands for OpenDAL Command Line Interface. It aims to provide a unified and user-friendly way to manipulate data stored in various storage services such as Object storage services(s3, azblob, gcs, minio, etc.), Key-Value services(Redis, etcd, TiKV, etc.), Filesystem-like service(HDFS, Azdls, etc.), and also all the other supported services.

How to use oli

oli provide basic sub-commands like oli ls, oli cat, oli stat, oli cp and oli rm, just like what you use on your local filesystem.

Install oli

oli could be installed by cargo:

cargo install oli --all-features

cargo is the Rust package manager. cargo could be installed by following the Installation from Rust official website.

Configure oli Profile

oli requires a config file to work, it should be:

  • ~/.config/oli/config.toml on Linux
  • ~/Library/Application Support/oli/config.toml on macOS
  • C:\Users\<UserName>\AppData\Roaming\oli\config.toml on Windows

The content of config.toml should be follow these pattern:

[profiles.<profile_name>]
configuration_key1 = "value1"
configuration_key2 = "value2"

[profiles.<another_profile_name>]
configuration_key3 = "value3"
configuration_key4 = "value4"

Here is an example of config.toml:

[profiles.s3]
type = "s3"
root = "/assets"
bucket = "<bucket>"
region = "<region>"
endpoint = "https://s3.amazonaws.com"
access_key_id = "<access_key_id>"
secret_access_key = "<secret_access_key>"

[profiles.r2]
type = "s3"
root = "/assets"
bucket = "<bucket>"
region = "auto"
endpoint = "https://<account_id>.r2.cloudflarestorage.com"
access_key_id = "<access_key_id>"
secret_access_key = "<secret_access_key>"

For different services, you could find the configuration keys in the corresponding service document.

Example: use oli to upload file to AWS S3

$ oli cp ./update-ecs-loadbalancer.json s3://update-ecs-loadbalancer.json
$ oli ls s3://                                                           
fleet.png
update-ecs-loadbalancer.json

Example: use oli copy file from S3 to R2

$ oli cp s3://fleet.png r2://fleet.png
$ oli ls r2://
fleet.png

Contribute to oli

Contribution is not only about code, but also about documentation, examples, and so on! 🚀

If you have any questions or suggestions about oli, please feel free to open an issue on GitHub.

As oli is a part of Apache OpenDAL, you should follow the CONTRIBUTION documentation. There are still lots works to do with oli, you could track them on this GitHub Issue.

Dependencies

~14–36MB
~616K SLoC