Configuration File
Typenv delivers the .envx standard — a typed, validated, and expressive replacement for legacy .env files.
Configuration File · envx.config.json
Typenv supports a project-level configuration file named envx.config.json
.
This file helps you centralize CLI options such as input/output paths and overwrite behavior.
Example
{
"input": "./.envx",
"outputs": {
"env": "./.env",
"types": "./types/envx.ts",
"metaFilePath": "."
},
"overwrite": true
}
Fields
Key | Type | Description |
---|---|---|
input | string | Path to your .envx file |
outputs.env | string | Output path for the generated .env file |
outputs.types | string | Output path for generated TypeScript definitions |
outputs.metaFilePath | string | Directory to write envx.meta.json file |
overwrite | boolean | Whether to overwrite existing output files (default: false ) |
CLI arguments will always take precedence over values in the config file.
When to use it?
The config file is ideal when:
- You use Typenv across multiple scripts
- You want consistent paths across environments
- You integrate Typenv in CI/CD or editor tooling
Keep it at your project root and version it with Git for team consistency.