Skip to content

feat: add environment profile switching and visual diffing #5

Description

@hammadmajid

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions