/ Search - type / Modes - type M Star on GitHub - 5.7k

CLI

Run

Inject env at runtime. Use --redact for runtime leak protection and log redaction.

Usage

Given you have an app with environment variables:

console.log(`Hello ${process.env.HELLO}`)

Encrypt your .env file. Your secrets stay safely encrypted at rest.

$ dotenvx encrypt
◈ encrypted (.env)

And then decrypt and inject them at runtime - just in time.

$ dotenvx run -- node index.js
⟐ injected env (14) from .env

This works cross-platform across plaintext and encrypted .env files.