OptionalclientClient-safe environment variables. Keys must use clientPrefix when a
prefix is provided.
OptionalclientPrefix required for client variables, e.g. NEXT_PUBLIC_.
OptionalemptyTreat empty strings as missing values before validation.
Defaults to true for createEnv because it keeps defaults ergonomic in
framework starters.
OptionalisOverride server detection. Defaults to checking for window on globalThis.
OptionalonCalled when a server-only variable is read from a client runtime.
OptionalonCalled when validation fails. Throw from this hook to customize the error.
OptionalruntimeRuntime environment object. Defaults to process.env when available.
OptionalruntimeStrict runtime environment object. Every declared key must be present on the
object, even if the value is undefined. This catches framework bundling
mistakes where an env var was not explicitly accessed.
OptionalserverServer-only environment variables. These throw if accessed from a client runtime through the returned env object.
OptionalskipSkip validation and return raw values. Use sparingly for build phases where deployment secrets are unavailable.
Options for
createEnv(...).