Skip to content

Don't leave exposed .env files laying about. Store environment build values in local keychains. Cross-platform. Also works with cloud secret stores and github actions.

License

Notifications You must be signed in to change notification settings

raminf/enveloper

Repository files navigation

enveloper

CI License: AGPL-3.0-or-later Python 3.10+ Ruff mypy PyPI version PyPI - Python Version

Envelope Services

Manage environment secrets via your system keychain or cloud secret stores. Don't leave exposed .env files laying about your filesystem.

Installation

pip install enveloper            # CLI only
pip install enveloper[sdk]       # CLI + SDK (load_dotenv / dotenv_values)
pip install enveloper[all]       # CLI + SDK + all cloud backends

Quick Start

# Sample .env file

Sample .env file

# Import an existing .env file into the keychain
enveloper import sample.env --domain dev

# List what's stored

enveloper list

Import and list values

# Load local environment settings from keychain

eval "$(enveloper --domain dev export --format unix)"

# Values are loaded into local environment variables. 
# Use in Makefile, shell scripts, etc. 
# 'unix' format works for Linux, Mac, and Windows WSL. 
# For Windows Powershell, use 'win' as format.

# When done, you can use 'unexport' command to remove the set of env variables

eval "$(enveloper --domain dev unexport --format unix)"

Export from keychain to environment then unexport to clear out

# Push to AWS SSM - assume AWS_EXPORT is set or default is configured 

enveloper --service aws --domain dev push

Push all values in doman from keychain to AWS service

# Verify that they got pushed in AWS console for System Store > Parameters

enveloper --service aws list --domain dev

Env values in AWS SSM

# Pull from AWS SSM into local keychain

enveloper --service aws --domain dev pull

# Clear environment settings
enveloper --domain dev clear

Clear settings from keychain

Features

  • Backward compatible with .env files.
  • Store values in local keychains (Mac, Linux, Windows), or cloud service secret stores (see below).
  • Work with individual environment variables or sets.
  • Versioning of environment values using Semantic Versioning.
  • Use in build chains (Make, Gradle, etc.) or CI/CD, including Github Actions.
  • Support for hierarchical settings via domain and project sets.

Supported Backends

Backend Description
Local Keychain MacOS Keychain, Linux Secret Service, Windows Credential Locker
File Plain .env files
AWS SSM AWS Systems Manager Parameter Store
GitHub GitHub Actions secrets
Vault HashiCorp Vault KV v2
GCP Google Cloud Secret Manager
Azure Azure Key Vault
Alibaba Alibaba Cloud KMS Secrets Manager

Documentation

License

GNU AGPL v3.0 or later

About

Don't leave exposed .env files laying about. Store environment build values in local keychains. Cross-platform. Also works with cloud secret stores and github actions.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages