[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Feedback](/c/feedback/8)

# Feature request: "vercel env push"

72 views · 0 likes · 2 posts


Jamesarosen (@jamesarosen) · 2024-09-13

### 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:

```sh
vercel env pull production .env.production
vercel env push preview my-branch .env.production
```
or maybe
```sh
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.


Pauline P. Narvas (@pawlean) · 2024-09-13

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

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