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.
Choose the method that works best for your system.
Copy and paste this into your terminal:
curl -fsSL https://raw.githubusercontent.com/kamaravichow/s3hero/main/scripts/install.sh | bashOpen PowerShell as Administrator and run:
Set-ExecutionPolicy Bypass -Scope Process -Force
irm https://raw.githubusercontent.com/kamaravichow/s3hero/main/scripts/install.ps1 | iexIf you already have Python installed:
pip install s3heroFollow these 3 simple steps to start using S3Hero.
Before you can manage files, tell S3Hero about your cloud provider. Run:
s3hero configure addYou 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.
List your buckets to make sure everything is working:
s3hero bucket listIf you don't have a bucket yet, create one:
s3hero bucket create my-first-bucketHere are the most common things you'll want to do.
Upload a single file:
s3hero cp my-photo.jpg s3://my-bucket/my-photo.jpgUpload an entire folder:
# This uploads everything inside 'photos' to the bucket
s3hero cp -r ./photos/ s3://my-bucket/vacation-pics/Download a file:
s3hero cp s3://my-bucket/report.pdf ./downloads/report.pdfDownload a folder:
s3hero cp -r s3://my-bucket/backup-data/ ./restore-folder/List files in a bucket:
s3hero ls s3://my-bucketSee a tree view of your folders (Great for overviews!):
s3hero ls s3://my-bucket --treeUse 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/Generate a temporary link to share a private file with someone (valid for 1 hour by default):
s3hero presign s3://my-bucket/secret-plan.pdfDelete a file:
s3hero rm s3://my-bucket/old-file.txtDelete a folder and everything inside it:
s3hero rm -r s3://my-bucket/trash-folder/Empty a bucket completely:
s3hero bucket empty my-bucketHere is exactly what you need for common providers.
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-1You 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 dashboardYou need your keys and the Endpoint URL.
s3hero configure add
# Choose '3. Other S3-Compatible'
# Enter keys
# Endpoint: https://minio.example.comIf 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 listSet a default profile:
s3hero configure default workSee where S3Hero is saving your settings:
s3hero configure listThis project is licensed under the MIT License.
Made with β€οΈ by Aravind