Allison is coding...

How to Export .env from Vercel Project

Step 1: Install Vercel CLI

npm i -g vercel

Step 2: Link Vercel

vercel link

Follow the guide to select the certain project.

? Set up “~”? Yes
? Which scope should contain your project? Username's projects
? Link to existing project? Yes
? Which existing project do you want to link? Your-Project
✅  Linked to Username-project/your-selected-project (created .vercel)
? Would you like to pull environment variables now? Yes
Downloading `development` Environment Variables for Username-project/your-selected-project
✅  Created .env. Local file  

The .env file would be saved as .env.local on root directory of current terminal.

You can also use vercel env pull to download the .env file.