Guides

Move from Vercel environment variables to Envlet

Keep one ENVLET_TOKEN in Vercel and let your functions pull the rest at boot.

About 15 minutes

  1. 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.

    Terminal
    npm install -g @envlet/cli
    envlet login
  2. 02

    Create a token per Vercel environment

    Create a ci identity named vercel with one token per environment, so a preview deploy can never read production.

  3. 03

    Set the one variable

    Add ENVLET_TOKEN in Vercel for each environment, then remove the rest.

    Terminal
    vercel env add ENVLET_TOKEN production
    vercel env add ENVLET_TOKEN preview
  4. 04

    Inject at boot

    For Next.js, call inject() in instrumentation.ts so it runs once per server start. Edge functions use load() instead, since there is no process.env to fill.

    instrumentation.ts
    import { inject } from "@envlet/sdk";
    
    export async function register() {
      await inject();
    }
  5. 05

    Or say the word

    With the Envlet MCP server in Claude Code, Cursor, or Codex, this whole guide is one sentence: move us to Envlet. The agent does every step above, and no value ever enters the conversation.

    Claude Code
    claude mcp add --scope user envlet -- npx -y @envlet/cli mcp

Stop pasting .env files.

One command. The right values for whoever runs it.