diff

Compare environment variables between two environments.

The diff command shows differences between any two environments in a project.

Usage#

redenv diff

Options#

FlagDescription
-p, --project <name>Project name
--skip-configIgnore local project config

Examples#

# Compare interactively
redenv diff

# Compare specific project
redenv diff --project my-app

Interactive Flow#

$ redenv diff

? Select project: my-app
? Enter your Master Password: ********
? Pick two environments to compare:
 development
 production
 staging

 Fetching and decrypting variables...
 Loaded and decrypted both environments

🔍 Comparing "development" "production" for project "my-app"

🔸 Only in development
 DEBUG="true"

🔹 Only in production
 SENTRY_DSN="https://xyz@sentry.io"

🟡 Changed
 API_KEY
      development: "sk_test_abc123"
      production: "sk_live_xyz789"

🟢 Same
 BASE_URL
 DATABASE_URL

 Diff complete.

Info

If your project has only two environments, they are automatically selected for comparison.

Output Categories#

SymbolMeaning
🔸 Only in AKeys that exist only in the first environment
🔹 Only in BKeys that exist only in the second environment
🟡 ChangedKeys with different values
🟢 SameKeys with identical values
  • sync - Apply changes between environments
  • clone - Copy missing keys