Skip to content

Folder Mapping

lazyenv maps local paths to secret paths using workspace folders.

Each .env.example file becomes a workspace folder:

{
"workspaceFolders": [
{
"path": ".",
"secretPath": "/",
"envFile": ".env.example",
"keys": ["DATABASE_URL", "API_KEY"]
},
{
"path": "apps/web",
"secretPath": "/apps/web",
"envFile": "apps/web/.env.example",
"keys": ["NEXT_PUBLIC_API_URL"]
}
]
}
Local PathSecret PathPurpose
./Root folder
apps/web/apps/webWeb app
apps/api/apiAPI service (custom)
packages/shared/packages/sharedShared package

lazyenv automatically detects your current folder:

Terminal window
cd apps/web
lazyenv sync # Automatically uses /apps/web folder

You can edit .lazyenv/config.json to customize secret paths:

{
"path": "apps/api",
"secretPath": "/api", // Custom path (shorter)
"envFile": "apps/api/.env.example"
}