Skip to Content
LanguageEnvironments

Environments

An environment is declared as target.environment. The environment name is an identifier. development, production, staging, preview, qa, and test are not reserved keywords. default is special only because of the file it maps to.

Output files

This mapping is designed Vidro semantics. The current CLI does not generate these files.

default        → .env
<environment>  → .env.<environment>
target.default       → <target PATH>/.env
target.environment   → <target PATH>/.env.<environment>

Examples:

website.default      → apps/website/.env
website.development  → apps/website/.env.development
website.production   → apps/website/.env.production
website.preview      → apps/website/.env.preview
website.qa           → apps/website/.env.qa
api.integration      → <api PATH>/.env.integration

Example

project: "langdrift";
 
website {
  PATH: "apps/website/";
}
 
website.default {
  RESEND_API_KEY: $RESEND_API_KEY;
}
 
website.development {
  API_URL: "http://localhost:8080";
}

That source controls:

apps/website/.env
apps/website/.env.development

Whether default is also merged into other environments at runtime is a separate, unresolved question. The filename mapping above does not decide that.

Last updated on