A secure CLI tool to encrypt and upload/download environment files to/from AWS S3 using AES-256-CBC encryption with PBKDF2 key derivation.
TypeScriptNode.jsAWS S3AES-256-CBCCLI Tool
envput
A secure CLI tool to encrypt and upload/download environment files to/from AWS S3 using AES-256-CBC encryption with PBKDF2 key derivation.
π οΈ Technology Stack
β¨ Key Features
.envputrc file manages AWS credentials and
environmentsnpx envputπ Quick Start
envput init,
immediately backup your .envputrc file!
If you lose it, you'll lose access to all your encrypted environment files permanently.1. Initialize Configuration
2. Add to .gitignore
3. BACKUP YOUR CONFIG FILE!
cp .envputrc ~/secure-backups/myproject-envputrc.backup
4. Upload/Download Environments
π¦ Installation
Use without Installation (Recommended)
Global Installation
π Security
If you lose your .envputrc file
or the encryptionKey inside it, you
will PERMANENTLY lose access to ALL your encrypted environment files in S3. There is NO
way to recover them.
envput initConfiguration & Usage
Configuration File (.envputrc)
The .envputrc file contains your AWS credentials and
environment definitions:
{
"projectName": "myapp",
"encryptionKey": "generated-encryption-key-here",
"aws": {
"accessKeyId": "your-access-key-id",
"secretAccessKey": "your-secret-access-key",
"region": "us-east-1",
"bucket": "your-s3-bucket",
"bucketPath": "/"
},
"environments": [
{
"name": "development",
"file": ".env.development"
},
{
"name": "production",
"file": ".env.production"
}
]
}Available Commands
envput init
Creates a new .envputrc configuration file
interactively.
envput upload
Uploads an environment file to S3.
envput download
Downloads an environment file from S3.
envput list
Lists all configured environments.
AWS Setup
You need an AWS account with S3 access. Create an IAM user with the following policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BucketAccess",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::your-bucket-name"
},
{
"Sid": "ObjectAccess",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:HeadObject"
],
"Resource": "arn:aws:s3:::your-bucket-name/*"
}
]
}Team Development Workflow
Project Lead Setup:
Team Members:
Webmentions
Loading mentionsβ¦