Skip to main content
Use the Vercel CLI to pull a project’s environment variables into a .env file, then upload that file to Enkryptify with ek import.

Prerequisites

  • The Enkryptify CLI installed and signed in with ek login
  • A Vercel account with access to the target project
  • Node.js so you can install the Vercel CLI
1

Install the Vercel CLI

npm i -g vercel
Check it installed with vercel --version.
2

Sign in to Vercel

vercel login
3

Link the directory to your Vercel project

Run this from your project directory then pick the scope and project at the prompts:
vercel link
This writes a .vercel/ folder so the next command knows which project to read.
4

Pull the environment into a .env file

Pull the environment you want into a file named .env:
vercel env pull .env --environment=production --yes
Pass the filename and the environment explicitly. A bare vercel env pull writes to .env.local and pulls the development environment. Use --environment=preview --git-branch=<branch> for a preview branch, or pass a custom environment name such as --environment=staging.
5

Import into Enkryptify

ek import .env
ek import parses the file, lets you choose the target workspace, project and environment then uploads the secrets. Accept the prompt to delete the .env afterward so no plaintext copy is left on disk.

Notes

  • The pulled file holds real secret values, including Vercel’s sensitive variables. Keep it out of git and delete it after importing.
  • vercel env pull writes standard KEY="value" lines that ek import reads as is, so no extra conversion step is needed.

Next steps