[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › Config

Strict configuration Types with explicit application policy.

Decode configuration at startup, then pass validated values to constructors
or Tasks. The application decides how to load configuration, combine sources,
and apply defaults. Declare defaults with [withDefault](https://evolu.dev/docs/api-reference/common/Type/functions/withDefault), or use `??`
where a value is consumed. Invalid supplied values still fail decoding.

Resolve source precedence before replacing absence with defaults. If a source
Type already provides defaults and later composition needs to distinguish
them from supplied values, use `strategy: "preserve"` and inspect
`defaultUsed` explicitly. Preserving this evidence does not choose a merging
policy: the application still decides which source wins.

[env](https://evolu.dev/docs/api-reference/common/Config/functions/env) creates a pure, reversible codec. It does not read global state,
load files, merge sources, or introduce a Run dependency. Tests can pass
ordinary objects; a Node.js entry point can pass `process.env`.

## Functions

| Function                                                   | Description                                                                 |
| ---------------------------------------------------------- | --------------------------------------------------------------------------- |
| [env](https://evolu.dev/docs/api-reference/common/Config/functions/env) | Creates a reversible environment-variable codec with a flat decoded output. |

## Interfaces

| Interface                                                           | Description                                                                                     |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [EnvType](https://evolu.dev/docs/api-reference/common/Config/interfaces/EnvType) | The configuration codec returned by [env](https://evolu.dev/docs/api-reference/common/Config/functions/env). |

## Type Aliases

| Type Alias                                                              | Description                                                                                                                 |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [EnvName](https://evolu.dev/docs/api-reference/common/Config/type-aliases/EnvName)   | An environment variable name in Evolu's configuration convention.                                                           |
| [EnvProps](https://evolu.dev/docs/api-reference/common/Config/type-aliases/EnvProps) | Fields and one-level namespace groups used to construct an [env](https://evolu.dev/docs/api-reference/common/Config/functions/env) Type. |

## Variables

| Variable                                                           | Description                                                       |
| ------------------------------------------------------------------ | ----------------------------------------------------------------- |
| [EnvName](https://evolu.dev/docs/api-reference/common/Config/variables/EnvName) | An environment variable name in Evolu's configuration convention. |