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.

On-disk cache

After the first successful load, the decrypted bundle is written to:
~/.envless/cache/<workspaceId>/<environmentId>.json
The cache file is encrypted with the same workspace key that decrypted it, so it’s safe at rest. Mode 0600. On subsequent boots the loader reads this file first (~0ms), then revalidates against the API in the background. If the server has a newer version, the cache is updated for the next boot.

Cache lifecycle

EventBehavior
First bootFetch from API, decrypt, write cache. Blocking.
Subsequent bootsRead cache (instant). Revalidate in background.
Cache miss in CIFetch from API. No cache write (ephemeral runner).
Passphrase rotatedCache fails to decrypt, falls back to fresh fetch.
load({ revalidate: true })Skips cache, refetches.
Variable changed in dashboardPicked up on next boot, or via dev-mode watcher.

Dev mode

Framework adapters (@goenvless/envless/next, @goenvless/envless/vite) open a long-lived connection to the Envless API in development. When a variable changes in the dashboard:
  1. The server pushes the diff.
  2. The loader updates process.env and the env proxy in place.
  3. The framework’s HMR kicks in for any module that imported a changed key.
No restart, no manual sync.

Production

In production the cache is read once at boot and never revalidated automatically. Rotate a variable, restart the process, done. If you need live updates without restart, call load({ revalidate: true }) from a SIGHUP handler or a webhook.
import { load } from '@goenvless/envless/server';

process.on('SIGHUP', () => load({ revalidate: true }));

Cold-start cost

ScenarioTime
Cache hit (Node)~1ms
Cache hit (Bun)<1ms
Cache miss, fetch + decrypt50–150ms
Edge (build-time inlined)0ms — values are literals

Clearing the cache

envless cache clear
envless cache clear --workspace acme
envless cache clear --all
Or just delete ~/.envless/cache/. Next boot rebuilds it.