.env Files
aixyz loads environment variables from .env files in the following order (later files take precedence):
.env— Shared defaults.env.local— Local overrides (gitignored).env.$(NODE_ENV)— e.g.,.env.production.env.$(NODE_ENV).local— e.g.,.env.production.local
.env.local is always gitignored. Use it for API keys and secrets during development.Common Variables
Using in Config
Reference environment variables directly inaixyz.config.ts:
aixyz.config.ts
Testing Environment
For tests,loadEnv from aixyz/test loads .env.test.local (where your OPENAI_API_KEY lives for tests). .env.local is ignored during testing:
Built-in Environment Variables
The CLI automatically sets these environment variables based on the command:Build-Time Resolution
Environment variables referenced inaixyz.config.ts are resolved and baked into the bundle at build time. The config file itself is not included in the output — only the resolved values.