vercel env add defaults Production and Preview variables to sensitive
Introduced 2026-04-20 · score 0.96
HOW TO USE IT
When adding a variable to Production or Preview, run `vercel env add` and it defaults to sensitive; pass `--no-sensitive` to request the prior encrypted behavior. For Development, add it separately and omit `--sensitive`.
vercel env add <NAME> <production|preview>vercel env add <NAME> <development>vercel env add <NAME> <production|preview> --no-sensitiveWHY THIS HELPS
Add an environment variable to a Vercel Production or Preview target, or to Development when that target is selected.
BEFORE THIS CHANGE
Production and Preview variables defaulted to encrypted and remained readable later; `--sensitive` could request sensitive storage. For Development, `--sensitive` silently fell back to encrypted, and a mixed target selection could not share a record type.
REQUIREMENTS AND LIMITATIONS
- Version: 51.8.0
- <NAME> (required): Environment variable name; positional argument.
- <production|preview|development> (required): Target environment; positional argument. Add Development separately from Production or Preview.
- --sensitive: Marks a variable sensitive; release note says it errors when Development is selected.
- --no-sensitive: New flag to request encrypted behavior for Production or Preview; on a team enforcing sensitive variables it is a no-op with a warning.
- Prerequisite: Run from a Vercel project context; the documentation describes adding variables to a Vercel Project.
- Prerequisite: Enter the variable value when prompted, or provide it through stdin using the documented command form.
- Sensitive values are encrypted at rest and cannot be retrieved later via the dashboard or CLI; they are still resolved for builds, deployments, `vercel env pull`, and runtime.
- Development is always stored as encrypted; sensitive is not supported by the Vercel API for Development.
- A mixed Development and Production/Preview selection errors; add Development separately.
- Passing `--sensitive` with Development errors up-front.
- Passing `--sensitive` and `--no-sensitive` together errors.
- On teams with the Enforce Sensitive Environment Variables policy enabled, `--no-sensitive` is a no-op for Production/Preview because the server promotes the variable regardless.
FIRST-PARTY EVIDENCE
Check the installed version and the source before using it. Entry JSON