GuidesMigrate
Move from Vercel environment variables to Envlet
Keep one ENVLET_TOKEN in Vercel and let your functions pull the rest at boot.
15 min5 steps
Steps
- 01
Sign in once
Install the CLI and sign in. It shows a URL and a code; approve in the browser and you are in.
Terminalnpm install -g @envlet/cli envlet login - 02
Create a token per Vercel environment
Add Vercel under Access with one token per environment, so a preview deploy can never read production.
ci/vercelciIts own token, separate from your login.- token
- envlet_•••••••• shown once
- opens
- one project, one environment
- expires
- always
- 03
Set the one variable
Add ENVLET_TOKEN in Vercel for each environment, then remove the rest.
Terminalvercel env add ENVLET_TOKEN production vercel env add ENVLET_TOKEN preview - 04
Inject at boot
For Next.js, call inject() in instrumentation.ts. Edge functions use load().
instrumentation.tsimport { inject } from "@envlet/sdk"; export async function register() { await inject(); } - 05
Or run the migrate prompt
With the Envlet MCP server in Claude Code, Cursor, or Codex, the migrate prompt does every step above. Values never enter the conversation.
Claude Codeclaude mcp add --scope user envlet -- npx -y @envlet/cli mcp