Env Inheritance
Env Inheritance keeps your .env files DRY. Instead of copy-pasting CLIENT_VERSION = 2.1.0 across dev.env, staging.env, and prod.env, define it once in base.env and extend. For more advanced cases, .profile files compose multiple envs into a single selectable profile.
@extends — inherit from a base env
Section titled “@extends — inherit from a base env”CLIENT_VERSION = 2.1.0TIMEOUT = 30000LOG_LEVEL = info@extends base.env
BASE_URL = https://api.dev.example.comAPI_TOKEN = dev-tokenLOG_LEVEL = debug # override base.env@extends base.env
BASE_URL = https://api.prod.example.comTIMEOUT = 15000 # override base.envRuntime resolution: child keys override parent keys. LOG_LEVEL in dev.env is debug, inherited everywhere else as info.
Multiple extends
Section titled “Multiple extends”Multiple @extends chain in order. Later extends win:
@extends base.env@extends defaults.env
BASE_URL = https://api.dev.example.comResolution (highest-priority last):
base.envdefaults.env(overridesbase.env)dev.env(overrides both)
.profile — compose multiple envs
Section titled “.profile — compose multiple envs”When inheritance isn’t enough — you need region + role + tenant overlays — a .profile file stacks envs:
@env envs/base.env@env envs/dev.env@env envs/mobile-overrides.env@env envs/tenant-acme.envSelect dev-mobile-acme from the env dropdown; all four files merge with last-wins ordering.
See the .profile reference for syntax details.
Env tooltip shows sources
Section titled “Env tooltip shows sources”Hover the env pill in the header — the tooltip shows every resolved key with its source file. You always know which env contributed which value.
dev.env (extends base.env)─────────────────────────CLIENT_VERSION = 2.1.0 (base.env)TIMEOUT = 30000 (base.env)LOG_LEVEL = debug (dev.env)BASE_URL = https://… (dev.env)API_TOKEN = dev-token (dev.env)Diagnostics
Section titled “Diagnostics”Settings → Envs panel shows the inheritance tree for your workspace:
- Broken
@extendspointing to a missing file - Circular extends chains
- Keys defined in multiple extended envs (conflict warnings)
Free vs Pro
Section titled “Free vs Pro”| Capability | Free | Pro |
|---|---|---|
Editor highlights @extends / .profile | ✓ | ✓ |
| Runtime inheritance resolution | — | ✓ |
.profile files selectable | — | ✓ |
| Envs Manager diagnostics | — | ✓ |