view

View the decrypted value of a specific environment variable.

The view command displays the current decrypted value of a single secret, with automatic reference expansion.

Usage#

redenv view <key>

Arguments#

NameRequiredDescription
keyYesThe environment variable name to view

Options#

FlagDescription
-p, --project <name>Project name
-e, --env <env>Environment name

Examples#

# View a secret interactively
redenv view API_KEY

# View in specific environment
redenv view DATABASE_URL --env production

# View from specific project
redenv view SECRET_KEY --project my-app --env staging

Interactive Flow#

$ redenv view API_KEY

? Enter your Master Password: ********
 Fetching value for API_KEY in my-app...
 Found key in my-app (development)

API_KEY

└─ sk_test_abc123xyz

If no environment is specified and no local config exists, you'll be prompted to select one:

$ redenv view API_KEY --project my-app

? Enter your Master Password: ********
? Select environment:
 development
  staging
  production

Variable Expansion#

If the secret contains references, both the raw and expanded values are shown:

$ redenv view AUTH_URL

AUTH_URL

└─ ${BASE_URL}/auth (https://api.example.com/auth)

The value in parentheses is the fully expanded result after resolving all references.

Multiline Values#

Multiline secrets display with proper formatting:

$ redenv view PRIVATE_KEY

PRIVATE_KEY

└─ -----BEGIN RSA PRIVATE KEY-----
   MIIEowIBAAKCAQEA...
   -----END RSA PRIVATE KEY-----

Info

Keys starting with __ are reserved for internal metadata and cannot be viewed. Use list to see all available keys.