Skip to content

Workspace Folders

Workspace folders map local paths to secret paths.

{
"workspaceFolders": [
{
"path": ".",
"secretPath": "/",
"envFile": ".env.example",
"keys": ["DATABASE_URL"]
},
{
"path": "apps/web",
"secretPath": "/apps/web",
"envFile": "apps/web/.env.example",
"keys": ["NEXT_PUBLIC_API_URL"]
}
]
}
  • path: local path relative to project root
  • secretPath: secret path (or prefix)
  • envFile: path to .env.example
  • keys: keys defined in this folder

lazyenv scans for .env.example files:

my-project/
├── .env.example # path: ".", secretPath: "/"
├── apps/
│ ├── web/
│ │ └── .env.example # path: "apps/web", secretPath: "/apps/web"
│ └── api/
│ └── .env.example # path: "apps/api", secretPath: "/apps/api"

Edit .lazyenv/config.json to customize paths:

{
"path": "apps/api",
"secretPath": "/api", // Shorter custom path
"envFile": "apps/api/.env.example"
}