Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.envless.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Edge runtimes have no filesystem and limited network at cold start. envless pre-resolves every referenced variable at build time and inlines them — there is no runtime fetch.

Cloudflare Workers

wrangler.toml
[build]
command = "envless build wrangler -- wrangler deploy"
envless build wraps the build command, decrypts the bundle, and inlines values into the worker bundle.
src/index.ts
import { env } from '@goenvless/envless/server';

export default {
    async fetch(req: Request) {
        return new Response(env.GREETING);
    },
};

Vercel Edge Functions

Same setup as the Next.js guide. Mark a route as edge:
app/api/hello/route.ts
export const runtime = 'edge';

import { env } from '@goenvless/envless/server';
export async function GET() {
    return Response.json({ msg: env.GREETING });
}
The Next.js plugin detects edge routes and inlines their variables at build time.

Netlify Edge Functions

netlify.toml
[build]
command = "envless build netlify -- netlify build"

Limitations

Node / BunEdge / Workers
Runtime fetch of variables✅ live❌ build-time only
Rotate without redeploy❌ — rotation requires new deploy
Variable countunlimitedlimited by your platform’s env size cap
Decryption key on the runtime✅ cached❌ never present
If you need live rotation at the edge, run a Node sidecar that exposes variables over a signed endpoint. For most apps, build-time inlining is fine — it matches how Vercel and Cloudflare handle their native env vars.