Orion Env is a utility for managing a collection of secrets in source control.
.env
files that must be excluded from repositories, Orion Env allows you to safely commit your configuration to your codebase using public key, elliptic curve cryptography.
This package works as a standalone package. It does not depend on any other Orion.js packages.
env
objectORION_ENV_FILE_PATH
: Path to your Orion Env configuration fileORION_ENV_SECRET_KEY
: The password to decrypt encrypted variablesloadEnv()
function accepts the following options:
readFromSecret
section that maps environment variable names to arrays of variable keys:
readFromSecret
object (e.g., AWS_SECRETS
).DATABASE_URL
), it looks for corresponding properties in the parsed JSON.env
object alongside your other variables.ORION_ENV_SECRET_KEY
property, Orion Env will use that value as the secret key for decrypting your encrypted variables. This allows you to store your decryption password in the secret manager as well.
Example JSON in process.env.AWS_SECRETS
: