/** * Env Utilities — Shared helpers for reading and merging .env files. * * Consolidates the three scattered env-loading implementations: * - MemoireEngine._loadEnvFile() * - connect.ts findExistingEnvValue() * - setup.ts readEnvValue() * * All functions are pure and safe to call from any command. */ /** * Read a single `.env`-style file and merge KEY=VALUE pairs into `process.env`. * Existing keys are never overwritten. Absent files are silently skipped. */ export declare function loadEnvFile(root: string, filename: string): Promise; /** * Load `.env.local` then `.env` from `root` into `process.env`. * Existing keys are never overwritten. */ export declare function loadEnvFiles(root: string): Promise; export type EnvSource = "process" | ".env.local" | ".env" | "missing"; export interface EnvValue { value: string | null; source: EnvSource; } /** * Find a config value by checking process.env first, then `.env.local` and `.env` * in the given project root. Returns the value and the source it was found in. */ export declare function readEnvValue(root: string, key: string): Promise; /** * Shorthand that returns only the value string (or null). * Use when you don't need the source metadata. */ export declare function readEnvValueRaw(root: string, key: string): Promise;