Config File Wiki

.env config guide

Local environment variables for development and build tooling.

Field explanations

  • Top-level settings define the tool behavior
  • Environment-specific blocks override defaults
  • Paths are usually relative to the config file or project root
  • Secrets should be referenced, not committed

Minimal template

APP_ENV=development
API_BASE_URL=http://localhost:3000
# SECRET_TOKEN=replace_me_locally

Common usage patterns

  • Keep .env small and reviewable
  • Use comments only when the format supports them
  • Commit example files with placeholder values
  • Validate locally before deploying

Common errors

  • Quotes included in value unexpectedly
  • Variable not loaded by IDE
  • Production platform ignores local file
  • Secret committed by accident

Online validation

Validate syntax first, then compare behavior against your deploy target. For JSON-based configs, use the JSON formatter before debugging tool-specific behavior.

Related tools