/** * Env Loader Utility * Loads known AI provider API keys from .ralph/.env.local into process.env */ /** * Parse dotenv-style content into a key-value map. * - Ignores empty lines and comments (lines starting with #). * - Ignores malformed lines without `=`. * - Treats everything after the first `=` as the value. * - Trims whitespace around keys and values. * - Strips matching surrounding quotes (single or double) from values. */ export declare function parseEnvContent(content: string): Record; /** * Write API keys to an env file, preserving existing content. * * - Merges keys into existing file content (preserves other keys). * - Replaces existing key values if the key already exists. * - Creates parent directories if they don't exist. * - Creates the file if it doesn't exist. * - Skips empty values (keys with empty strings are ignored). * * @param filePath - Absolute path to the .env.local file * @param keys - Record of environment variable names to values */ export declare function writeKeysToEnvFile(filePath: string, keys: Record): void; /** * Load known AI provider API keys from .ralph/.env.local into process.env. * * - Prefers .ralph/.env.local as the canonical source (if it exists). * - Falls back to root .env.local if .ralph/.env.local does not exist (backward compatibility). * - Only keys in KNOWN_API_KEYS are loaded; all others are ignored. * - File values override existing process.env values (file takes precedence). * - If neither file exists or cannot be read, this is a silent no-op. * - Malformed lines are skipped without aborting. */ export declare function loadApiKeysFromEnvLocal(): void;