Feature request: "vercel env push"

Idea

What I’m Trying to Do

I have environment variables set up for my production, preview, and development environments. I want to create a single-branch preview that uses the production values, except for a couple of tweaks.

What I’d Like

I’d like to be able to do this:

vercel env pull production .env.production
vercel env push preview my-branch .env.production

or maybe

cat .env.production > vercel env push preview my-branch

Workaround

I wrote a script that

  1. downloads the variables from environment A
  2. for each pair
    1. deletes the existing env variable from environment/branch B
    2. writes the new value to environment/branch B

But the script is error-prone. It doesn’t work well for environment variables that come from Vercel itself, including plugins and shared environments.

Hi, @jamesarosen! Welcome to the Vercel Community :raised_hands:

Thanks for sharing this suggestion, I’ll share it internally. :smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.