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.
Install
Wire up the build plugin
next.config.mjs
withEnvless does two things:
- Loads the encrypted bundle during
next buildandnext devconfig evaluation so client-flagged variables can be inlined into client chunks. - Registers the runtime loader so
process.envandenvare populated before any of your code runs.
Use it
app/api/checkout/route.ts
app/page.tsx
App Router rules
| File / directive | Import from |
|---|---|
| Server Components (default) | @goenvless/envless/server |
| Route Handlers | @goenvless/envless/server |
| Server Actions | @goenvless/envless/server |
middleware.ts | @goenvless/envless/server |
'use client' files | @goenvless/envless/client |
/server from a 'use client' file fails at lint and at build.
Edge runtime
When a route opts into the Edge runtime (export const runtime = 'edge'), the build plugin pre-resolves all referenced variables at build time and inlines them. No runtime fetch on the edge, no extra latency.
Dev mode
Innext dev, the loader watches .envless and the API. When a variable changes in the dashboard, Next’s fast refresh picks it up — no manual restart.