#amazon-s3 #file-sharing #s3 #aws #command-line-tool

bin+lib shuk

A command line tool that uploads files to Amazon S3 buckets, and generates presigned URLs for easy sharing

8 releases

new 0.4.7 Dec 11, 2024
0.4.6 Nov 18, 2024
0.4.4 Jul 31, 2024
0.4.1 Jun 11, 2024

#1767 in Command line utilities

Download history 28/week @ 2024-09-16 24/week @ 2024-09-30 280/week @ 2024-11-18 64/week @ 2024-12-02 230/week @ 2024-12-09

574 downloads per month

MIT/Apache

690KB
1K SLoC

Shuk 💾 ➡️ 🪣

screenshot of shuk

⚠️BETA SOFTWARE⚠️

Shuk is used to upload files of any size to Amazon S3 and have them shared with others via a presigned URL. If the same file already exists at the same location, it will only presign it.

Installation 💾

To install this tool, make sure you have rust and cargo installed and run:

cargo install shuk

NOTE: Whenever installing a new version, run shuk --init for best results. Sometimes new configuration options are added.

Usage 🚀

Usage: shuk [OPTIONS] [FILENAME]

Arguments:
  [FILENAME]

Options:
      --init
  -v, --verbose  Enable verbose logging
  -h, --help     Print help
  -V, --version  Print version

Just pass the filename as the argument to shuk:

shuk filename.bla

Configuration 🔧

All the configuration is located in the $HOME/.config/shuk.shuk.toml file.

# The bucket name where the files will be uploaded
bucket_name = "alan-ford-bucket"
# The prefix (folder) for the uploads. Leave blank "" for the root of the bucket
bucket_prefix = "shuk"
# Length of time in seconds on how long will the presigned URL be valid for
presigned_time = 86400
# The AWS profile shuk will use
aws_profile = "default"
# Should the presigned URL be stored directly to the clipboard or not
use_clipboard = false
# Set the fallback region
fallback_region = "us-east-1"

To automatically configure this file just run shuk --init

Build Notes

Check the BUILDING.md file in this repo.

Troubleshooting

This project uses the log crate. To get different levels of logging set the SHUK_LOG environment variable to either trace, warn, info, debug, or error. By default it is using the warn level.

Or better yet, just pass the --verbose flag, as this will run the trace level output. Be careful, there will be a lot of stuff on your screen.

Dependencies

~34–46MB
~635K SLoC