Problem
Modern projects maintain multiple environment files (e.g. .env.local, .env.staging, .env.test, .env.production). Switching between active configurations or comparing drift between environments is currently done manually.
Proposed Solution
Add subcommands to manage and switch active .env profiles and display side-by-side terminal diffs between environment files.
Expected Behavior
exenv switch staging: Sets active .env by copying/linking from .env.staging (with automatic backup of current .env).
exenv diff .env.staging .env.production: Renders a side-by-side terminal diff highlighting differences in variable keys, missing keys, and masked values between two environment files.
Acceptance Criteria
- Switching safely manages backups to prevent losing unstaged local edits.
- Diff view supports masking sensitive secrets by default with an option (
--show-secrets) to reveal values.
Problem
Modern projects maintain multiple environment files (e.g.
.env.local,.env.staging,.env.test,.env.production). Switching between active configurations or comparing drift between environments is currently done manually.Proposed Solution
Add subcommands to manage and switch active
.envprofiles and display side-by-side terminal diffs between environment files.Expected Behavior
exenv switch staging: Sets active.envby copying/linking from.env.staging(with automatic backup of current.env).exenv diff .env.staging .env.production: Renders a side-by-side terminal diff highlighting differences in variable keys, missing keys, and masked values between two environment files.Acceptance Criteria
--show-secrets) to reveal values.