Skip to content

kamaravichow/s3hero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

S3Hero πŸ¦Έβ€β™‚οΈ

Python 3.8+ License: MIT

The friendly command-line tool for managing your files in the cloud.

S3Hero helps you easily upload, download, and manage files on AWS S3, Cloudflare R2, MinIO, and other similar services without needing to be a cloud expert.


πŸ“¦ Installation

Choose the method that works best for your system.

Mac & Linux (Recommended)

Copy and paste this into your terminal:

curl -fsSL https://raw.githubusercontent.com/kamaravichow/s3hero/main/scripts/install.sh | bash

Windows

Open PowerShell as Administrator and run:

Set-ExecutionPolicy Bypass -Scope Process -Force
irm https://raw.githubusercontent.com/kamaravichow/s3hero/main/scripts/install.ps1 | iex

Using Python (pip)

If you already have Python installed:

pip install s3hero

πŸš€ Getting Started

Follow these 3 simple steps to start using S3Hero.

1. Connect your Cloud Account

Before you can manage files, tell S3Hero about your cloud provider. Run:

s3hero configure add

You will be asked a few questions:

  • Profile Name: A nickname for this account (e.g., my-website, personal-backup).
  • Provider: Choose AWS, Cloudflare, etc.
  • Keys: Paste your Access Key and Secret Key when prompted.

2. Check Connection

List your buckets to make sure everything is working:

s3hero bucket list

3. Create a Bucket (Optional)

If you don't have a bucket yet, create one:

s3hero bucket create my-first-bucket

πŸ’‘ Common Tasks

Here are the most common things you'll want to do.

πŸ“€ Uploading Files

Upload a single file:

s3hero cp my-photo.jpg s3://my-bucket/my-photo.jpg

Upload an entire folder:

# This uploads everything inside 'photos' to the bucket
s3hero cp -r ./photos/ s3://my-bucket/vacation-pics/

πŸ“₯ Downloading Files

Download a file:

s3hero cp s3://my-bucket/report.pdf ./downloads/report.pdf

Download a folder:

s3hero cp -r s3://my-bucket/backup-data/ ./restore-folder/

πŸ”Ž Exploring Files

List files in a bucket:

s3hero ls s3://my-bucket

See a tree view of your folders (Great for overviews!):

s3hero ls s3://my-bucket --tree

πŸ”„ Backing Up & Syncing

Use sync to make the destination look exactly like the source. This is great for backups.

Backup local folder to cloud:

s3hero sync ./important-docs/ s3://my-bucket/backup-docs/

Restore cloud backup to local computer:

s3hero sync s3://my-bucket/backup-docs/ ./restored-docs/

πŸ”— Sharing Files

Generate a temporary link to share a private file with someone (valid for 1 hour by default):

s3hero presign s3://my-bucket/secret-plan.pdf

πŸ—‘οΈ Cleaning Up

Delete a file:

s3hero rm s3://my-bucket/old-file.txt

Delete a folder and everything inside it:

s3hero rm -r s3://my-bucket/trash-folder/

Empty a bucket completely:

s3hero bucket empty my-bucket

☁️ Provider Setup Examples

Here is exactly what you need for common providers.

AWS S3

You need an Access Key ID and Secret Access Key.

s3hero configure add
# Choose '1. AWS S3'
# Enter your keys
# Region: e.g., us-east-1

Cloudflare R2

You need an Access Key, Secret Key, and Account ID.

s3hero configure add --provider cloudflare_r2
# It will ask for your keys and Account ID found in R2 dashboard

MinIO / Custom

You need your keys and the Endpoint URL.

s3hero configure add
# Choose '3. Other S3-Compatible'
# Enter keys
# Endpoint: https://minio.example.com

πŸ”§ Pro Tips

Switching Profiles

If you have multiple accounts (e.g., work and personal), you can switch between them easily.

Run a single command as a different user:

s3hero -p work bucket list

Set a default profile:

s3hero configure default work

Viewing Configuration

See where S3Hero is saving your settings:

s3hero configure list

πŸ“„ License

This project is licensed under the MIT License.

Made with ❀️ by Aravind

About

The friendly command-line tool for managing your files in the cloud.

Topics

Resources

License

Stars

Watchers

Forks

Contributors