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.

Envless is a sync layer for environment variables. You manage variables in the dashboard; your machines pull them down, decrypted locally. There are three ways to do that pull, and which one you pick depends on where the code runs.

Three ways to sync

https://mintcdn.com/envless-7b88c948/9f3dXE0TchC0LVM7/assets/icons/duotone/code.svg?fit=max&auto=format&n=9f3dXE0TchC0LVM7&q=85&s=fbd6ab5160f56cd28bd3af2bff1550eb

Import in your app

import { env } from '@goenvless/envless' — typed, decrypted at boot, no files on disk.
https://mintcdn.com/envless-7b88c948/nR8RUPgNBtCF5SFI/assets/icons/duotone/arrows-clockwise.svg?fit=max&auto=format&n=nR8RUPgNBtCF5SFI&q=85&s=ff30102213f867347e249a1dad40e5d4

Sync to .env files

envless sync — writes .env.<slug> for tools that expect a file (Docker, Python, Rails, shell).
https://mintcdn.com/envless-7b88c948/9f3dXE0TchC0LVM7/assets/icons/duotone/play.svg?fit=max&auto=format&n=9f3dXE0TchC0LVM7&q=85&s=1b9a1a8808e0e2bb20fdee60c707d2b1

Wrap a process

envless run -- <cmd> — inject variables into a single child process, nothing persisted.

When to pick which

ModeWhere it livesUse when
ImportIn your app codeYou control the runtime and want types + boot-time validation. Best for Node/Bun/Edge/Workers.
SyncFiles on disk (.env.<slug>)Something else needs a file — Docker Compose, python-dotenv, Rails, source .env in a shell.
RunChild process envYou want zero footprint — no files, no imports — for a single command or CI step.

They’re not mutually exclusive. A typical setup uses import in app code, sync for the docker-compose dev stack, and run in CI.

What makes them work

All three modes share the same three pieces underneath:

The .envless file

A small JSON file you commit to your repo. It tells Envless what to fetch — workspace, project, and one or more environments — and contains no secrets.

{
    "workspace": "acme",
    "project": "my-app",
    "environments": ["development", "staging"]
}

Created by envless link. Safe to commit and share.

The workspace key

Envless is end-to-end encrypted. The server stores ciphertext only; decryption happens on your machine with a key derived from a workspace passphrase.

1

Set the passphrase once per workspace

Either in the dashboard or via envless passphrase set.
2

Derived key is cached locally

Saved at ~/.envless/config.json (mode 0600). Used by the CLI, runtime, and SDK alike.
3

Server never sees plaintext

Sync, runtime fetch, and dashboard view all decrypt locally. Rotating the passphrase invalidates every cached key.

Server vs client split

Every variable has a visibility flag — server (default) or client. The runtime ships two entry points:

import { env } from '@goenvless/envless/server';  // all variables
import { env } from '@goenvless/envless/client';  // client-flagged only

Server secrets can’t end up in a client bundle — enforced by types, runtime, bundler, and lint. See Server vs Client.

How a sync actually flows

┌────────────────────────────────────────┐
│  Dashboard (you manage variables here) │
└──────────────────┬─────────────────────┘
                   │  encrypted blobs

┌────────────────────────────────────────┐
│        Envless API (ciphertext only)   │
└──────────────────┬─────────────────────┘
                   │  fetch (auth: token or key)

┌────────────────────────────────────────┐
│  Your machine                          │
│    ~/.envless/config.json  ← key       │
│    .envless                ← binding   │
│                                        │
│    decrypt locally, then:              │
│      • import { env }     (runtime)    │
│      • write .env.<slug>  (sync)       │
│      • inject into child  (run)        │
└────────────────────────────────────────┘

One pipeline above the bottom box; three ways out of it.

Beyond syncing: API and SDK

Envless also ships a REST API and a programmatic SDK — but these aren’t for getting variables into your app. They’re for advanced workflows like building tools on top of Envless: writing custom dashboards, scripting workspace/project/variable management, integrating with internal platforms, or automating bulk operations across many projects.

~99% of apps never need these. If you’re just trying to use your variables — import them, sync them to a file, or wrap a process — stick with the three modes above. Reach for the API or SDK only when you’re building on top of Envless rather than using it.

https://mintcdn.com/envless-7b88c948/9f3dXE0TchC0LVM7/assets/icons/duotone/code.svg?fit=max&auto=format&n=9f3dXE0TchC0LVM7&q=85&s=fbd6ab5160f56cd28bd3af2bff1550eb

API Reference

Raw HTTP endpoints for everything the dashboard does — projects, environments, variables, members.
https://mintcdn.com/envless-7b88c948/nR8RUPgNBtCF5SFI/assets/icons/duotone/terminal-window.svg?fit=max&auto=format&n=nR8RUPgNBtCF5SFI&q=85&s=59666127dd6ae7b6c5dd9fce7bd3e392

SDK

Typed wrapper around the API. Same surface, with auth, retries, and pagination handled for you.

Glossary

Quick reference for the resource model you’ll see in the dashboard and the .envless file:

TermWhat it is
WorkspaceTop-level container. Holds projects, members, and a single encryption key. Usually one per company.
ProjectA single app or service (my-api, marketing-site) inside a workspace. Holds environments.
EnvironmentA named bucket of variables — typically development, staging, production.
VariableA key/value pair. Has a name, encrypted value, type, required flag, and visibility. See Typed Variables.