/**
 * Result of writing credentials to file
 */
export interface CredentialsWriteResult {
    file_path: string;
    keys_written: string[];
    file_created: boolean;
}
/**
 * Options for writing credentials
 */
export interface WriteCredentialsOptions {
    /** Full or relative path to the env file. Defaults to `.env.local` in the current working directory. */
    filePath?: string;
    /** Whether to add the env file to .gitignore. Defaults to true. */
    createGitignore?: boolean;
    /** Directory the resolved file path must stay within. Defaults to the current working directory. */
    allowedDir?: string;
}
/**
 * Writes Auth0 credentials to an environment file (default: .env.local)
 *
 * File behavior:
 * - If the file does NOT exist: creates a new file with the credentials
 * - If the file DOES exist: comments out any lines whose keys conflict with
 *   the incoming credentials, preserves all other content (comments, blank
 *   lines, unrelated variables), and appends the new credentials at the end.
 *
 * Additional behavior:
 * - Sets restrictive file permissions (chmod 600 — owner read/write only)
 * - Ensures .gitignore includes the env file (unless createGitignore is false)
 * - Prevents credentials from appearing in MCP client logs
 *
 * @param credentials - The credentials to write
 * @param options - Optional configuration for file path and gitignore creation
 * @returns Information about where credentials were written, including whether the file was created or updated
 */
export declare function writeCredentialsToEnv(credentials: Record<string, string>, options?: WriteCredentialsOptions): Promise<CredentialsWriteResult>;
/**
 * Ensures the .gitignore file includes the specified env file pattern
 *
 * @param cwd - Current working directory
 * @param envFileName - Name of the env file to add to .gitignore
 */
export declare function ensureGitignore(cwd: string, envFileName: string): boolean;
/**
 * Parses an env file into a key/value map.
 *
 * @param filePath - Path to the env file
 * @returns Map of key/value pairs from the file, or an empty object if the file does not exist
 */
export declare function parseEnvFile(filePath: string): Record<string, string>;
/**
 * Detects existing environment files in the current directory
 *
 * @returns Path to the first found env file, or null if none exist
 */
export declare function detectExistingEnvFile(dir?: string): string | null;
