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.
The schema lives in Envless
Every variable in the dashboard has a type, a required/optional flag, and a visibility. envless reads that schema and generates a TypeScript declaration file. You don’t repeat it in code.
| Dashboard field | Effect in code |
|---|---|
| Name | Becomes a property on env |
Type (string, number, boolean) | Becomes the property type and triggers coercion |
| Required | Required-ness in the type, throws if missing |
| Default | Used when the value isn’t set |
Visibility (server / client) | Determines which import surface includes it |
Generate types
envless-env.d.ts next to your package.json:
Keep types in sync
Runenvless types whenever you add or rename a variable in the dashboard. Or wire it up so it runs automatically:
Coercion
Values are stored as strings in the encrypted bundle. The proxy coerces them on read based on the schema type:Number(env.PORT) ceremony.
Missing variables throw loudly
undefined is the single worst thing about process.env. If you genuinely want optional, mark the variable optional in the dashboard and the type becomes string | undefined.
Test overrides
For tests, you can override values without mutating global state:using declaration scopes the override to the block — no cleanup needed.
Why this beats t3-env / hand-rolled Zod
| Hand-rolled validation | envless | |
|---|---|---|
| Schema location | Lives in code, drifts from .env | Lives in the dashboard, single source |
| Add a variable | Edit env.ts, edit .env, edit .env.example, commit | Add it in the dashboard, run envless types |
| Required/default | Re-declared in Zod | Already in the schema |
| Client/server split | Manual client: / server: blocks | Visibility flag in dashboard |
| Runtime values | Manually mapped via runtimeEnv: { ... } | Automatic |