import type { EnvField } from "../introspect.js"; import type { SettingsLoader } from "../define-settings.js"; import type { z } from "zod"; export interface EnvExampleOptions { /** Header banner placed at the top of the file. */ header?: string; /** Group secret variables under a separate `# Secrets` section. Default: true. */ groupSecrets?: boolean; /** Mask secret default values rather than emitting them. Default: true. */ maskSecretDefaults?: boolean; /** * Pre-fill specific env vars with concrete values. Useful for * generating per-environment samples where `APP_ENV` is set to a * known branch name. Secret keys still respect `maskSecretDefaults` * unless explicitly listed here. */ values?: Record; /** End-of-line. Default: `"\n"`. */ eol?: string; } /** * Generate the contents of a `.env.example` file from introspected env * field metadata. * * Each entry includes a comment summarising the type, requiredness, * allowed values (for enums), and the field description. The line itself * is left blank for required fields or pre-filled with the schema default * (or with `options.values[key]` if supplied). */ export declare function generateEnvExample(fields: readonly EnvField[], options?: EnvExampleOptions): string; export interface PerEnvExamplesOptions extends Omit { /** * Restrict to a subset of `perEnv` branches. Defaults to every branch. */ envs?: readonly string[]; /** * If true (default), prepend a comment block summarising the layered * config the branch will resolve to at runtime. */ includeConfigSummary?: boolean; } /** * Generate one `.env` example per `perEnv` branch, with the loader's * `envKey` (e.g. `APP_ENV`) pre-filled with the branch name. Pairs * cleanly with the `node-settings generate envs` CLI subcommand. * * @example * ```ts * const examples = generatePerEnvExamples(settings); * // { * // local: "# .env example for APP_ENV=local ...", * // dev: "# .env example for APP_ENV=dev ...", * // prod: "# .env example for APP_ENV=prod ...", * // } * ``` */ export declare function generatePerEnvExamples, TConfig extends object, TSettings extends object>(loader: SettingsLoader, options?: PerEnvExamplesOptions): Record; //# sourceMappingURL=env-example.d.ts.map